Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2860


Ignore:
Timestamp:
02/24/10 14:34:07 (15 years ago)
Author:
gkronber
Message:
  • replaced column ContactInformation with ContactName and ContactEmail in DB-schema and updated WCF deployment service
  • regenerated proxy classes
  • made PluginDescription from data contract implement IPluginDescription from plugin infrastructure
  • updated GUI on request by swagner (icons)
  • fixed problems in the upload plugins control.

#860 (Deployment server for plugin installation from web locations)

Files:
4 added
6 deleted
17 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/HeuristicLab.DeploymentService.AdminClient.csproj

    r2816 r2860  
    7474  </ItemGroup>
    7575  <ItemGroup>
    76     <Compile Include="ServerPluginView.cs">
     76    <Compile Include="PluginComparisonView.cs">
    7777      <SubType>UserControl</SubType>
    7878    </Compile>
    79     <Compile Include="ServerPluginView.Designer.cs">
    80       <DependentUpon>ServerPluginView.cs</DependentUpon>
     79    <Compile Include="PluginComparisonView.Designer.cs">
     80      <DependentUpon>PluginComparisonView.cs</DependentUpon>
    8181    </Compile>
    8282    <Compile Include="PluginView.cs">
     
    9191    <Compile Include="LicenseView.Designer.cs">
    9292      <DependentUpon>LicenseView.cs</DependentUpon>
    93     </Compile>
    94     <Compile Include="LocalPluginView.cs">
    95       <SubType>UserControl</SubType>
    96     </Compile>
    97     <Compile Include="LocalPluginView.Designer.cs">
    98       <DependentUpon>LocalPluginView.cs</DependentUpon>
    9993    </Compile>
    10094    <Compile Include="ProductEditor.cs">
     
    121115  </ItemGroup>
    122116  <ItemGroup>
     117    <ProjectReference Include="..\HeuristicLab.Common.Resources\3.2\HeuristicLab.Common.Resources-3.2.csproj">
     118      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
     119      <Name>HeuristicLab.Common.Resources-3.2</Name>
     120    </ProjectReference>
    123121    <ProjectReference Include="..\HeuristicLab.MainForm.WindowsForms\3.2\HeuristicLab.MainForm.WindowsForms-3.2.csproj">
    124122      <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
     
    140138  </ItemGroup>
    141139  <ItemGroup>
    142     <EmbeddedResource Include="ServerPluginView.resx">
    143       <DependentUpon>ServerPluginView.cs</DependentUpon>
     140    <EmbeddedResource Include="MainForm.resx">
     141      <DependentUpon>MainForm.cs</DependentUpon>
     142    </EmbeddedResource>
     143    <EmbeddedResource Include="PluginComparisonView.resx">
     144      <DependentUpon>PluginComparisonView.cs</DependentUpon>
    144145    </EmbeddedResource>
    145146    <EmbeddedResource Include="PluginView.resx">
     
    148149    <EmbeddedResource Include="LicenseView.resx">
    149150      <DependentUpon>LicenseView.cs</DependentUpon>
    150     </EmbeddedResource>
    151     <EmbeddedResource Include="LocalPluginView.resx">
    152       <DependentUpon>LocalPluginView.cs</DependentUpon>
    153151    </EmbeddedResource>
    154152    <EmbeddedResource Include="ProductEditor.resx">
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/MainForm.cs

    r2802 r2860  
    77namespace HeuristicLab.DeploymentService.AdminClient {
    88  class MainForm : DockingMainForm {
    9     public MainForm(Type type) : base(type) { }
     9    private System.Windows.Forms.ProgressBar progressBar;
     10
     11    public MainForm(Type type)
     12      : base(type) {
     13      InitializeComponent();
     14    }
    1015
    1116    protected override void OnInitialized(EventArgs e) {
     
    1318      (new PluginListView()).Show();
    1419    }
     20
     21    private void InitializeComponent() {
     22      this.progressBar = new System.Windows.Forms.ProgressBar();
     23      this.SuspendLayout();
     24      //
     25      // progressBar
     26      //
     27      this.progressBar.Location = new System.Drawing.Point(0, 528);
     28      this.progressBar.Name = "progressBar";
     29      this.progressBar.Size = new System.Drawing.Size(129, 23);
     30      this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
     31      this.progressBar.TabIndex = 7;
     32      this.progressBar.Visible = false;
     33      //
     34      // MainForm
     35      //
     36      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     37      this.ClientSize = new System.Drawing.Size(770, 550);
     38      this.Controls.Add(this.progressBar);
     39      this.Name = "MainForm";
     40      this.Controls.SetChildIndex(this.progressBar, 0);
     41      this.ResumeLayout(false);
     42      this.PerformLayout();
     43
     44    }
     45
     46    public void ShowProgressBar() {
     47      progressBar.Visible = true;
     48    }
     49
     50    public void HideProgressBar() {
     51      progressBar.Visible = false;
     52    }
    1553  }
    1654}
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/PluginListView.Designer.cs

    r2816 r2860  
    2424    /// </summary>
    2525    private void InitializeComponent() {
     26      this.components = new System.ComponentModel.Container();
    2627      this.listView = new System.Windows.Forms.ListView();
    2728      this.nameHeader = new System.Windows.Forms.ColumnHeader();
    2829      this.localVersion = new System.Windows.Forms.ColumnHeader();
    29       this.uploadButton = new System.Windows.Forms.Button();
    30       this.splitContainer = new System.Windows.Forms.SplitContainer();
    31       this.label1 = new System.Windows.Forms.Label();
     30      this.serverVersion = new System.Windows.Forms.ColumnHeader();
     31      this.imageList = new System.Windows.Forms.ImageList(this.components);
     32      this.serverUrlLabel = new System.Windows.Forms.Label();
    3233      this.serverUrlTextBox = new System.Windows.Forms.TextBox();
    3334      this.connectButton = new System.Windows.Forms.Button();
    34       this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
    35       this.serverPluginDetailsGroupBox = new System.Windows.Forms.GroupBox();
    36       this.localPluginDetailsGroupBox = new System.Windows.Forms.GroupBox();
    37       this.localPluginDetailsPanel = new System.Windows.Forms.Panel();
    38       this.serverVersion = new System.Windows.Forms.ColumnHeader();
    39       this.splitContainer.Panel1.SuspendLayout();
    40       this.splitContainer.Panel2.SuspendLayout();
    41       this.splitContainer.SuspendLayout();
    42       this.tableLayoutPanel.SuspendLayout();
    43       this.localPluginDetailsGroupBox.SuspendLayout();
     35      this.refreshButton = new System.Windows.Forms.Button();
     36      this.uploadButton = new System.Windows.Forms.Button();
    4437      this.SuspendLayout();
    4538      //
    4639      // listView
    4740      //
     41      this.listView.Activation = System.Windows.Forms.ItemActivation.TwoClick;
    4842      this.listView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    4943                  | System.Windows.Forms.AnchorStyles.Left)
    5044                  | System.Windows.Forms.AnchorStyles.Right)));
     45      this.listView.CheckBoxes = true;
    5146      this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
    5247            this.nameHeader,
     
    5449            this.serverVersion});
    5550      this.listView.Enabled = false;
    56       this.listView.Location = new System.Drawing.Point(3, 32);
    57       this.listView.MultiSelect = false;
     51      this.listView.FullRowSelect = true;
     52      this.listView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
     53      this.listView.Location = new System.Drawing.Point(0, 30);
    5854      this.listView.Name = "listView";
    5955      this.listView.ShowGroups = false;
    60       this.listView.Size = new System.Drawing.Size(392, 459);
     56      this.listView.Size = new System.Drawing.Size(536, 446);
     57      this.listView.StateImageList = this.imageList;
    6158      this.listView.TabIndex = 0;
    6259      this.listView.UseCompatibleStateImageBehavior = false;
    6360      this.listView.View = System.Windows.Forms.View.Details;
    64       this.listView.SelectedIndexChanged += new System.EventHandler(this.listView_SelectedIndexChanged);
     61      this.listView.ItemActivate += new System.EventHandler(this.listView_ItemActivate);
     62      this.listView.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.listView_ItemChecked);
    6563      //
    6664      // nameHeader
     
    7472      this.localVersion.Width = 100;
    7573      //
    76       // uploadButton
     74      // serverVersion
    7775      //
    78       this.uploadButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    79       this.uploadButton.Enabled = false;
    80       this.uploadButton.Location = new System.Drawing.Point(6, 459);
    81       this.uploadButton.Name = "uploadButton";
    82       this.uploadButton.Size = new System.Drawing.Size(110, 23);
    83       this.uploadButton.TabIndex = 2;
    84       this.uploadButton.Text = "Upload plugin";
    85       this.uploadButton.UseVisualStyleBackColor = true;
    86       this.uploadButton.Click += new System.EventHandler(this.uploadButton_Click);
     76      this.serverVersion.Text = "Server version";
     77      this.serverVersion.Width = 100;
    8778      //
    88       // splitContainer
     79      // imageList
    8980      //
    90       this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
    91       this.splitContainer.Location = new System.Drawing.Point(0, 0);
    92       this.splitContainer.Name = "splitContainer";
     81      this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
     82      this.imageList.ImageSize = new System.Drawing.Size(16, 16);
     83      this.imageList.TransparentColor = System.Drawing.Color.Transparent;
    9384      //
    94       // splitContainer.Panel1
     85      // serverUrlLabel
    9586      //
    96       this.splitContainer.Panel1.Controls.Add(this.label1);
    97       this.splitContainer.Panel1.Controls.Add(this.serverUrlTextBox);
    98       this.splitContainer.Panel1.Controls.Add(this.connectButton);
    99       this.splitContainer.Panel1.Controls.Add(this.listView);
    100       //
    101       // splitContainer.Panel2
    102       //
    103       this.splitContainer.Panel2.Controls.Add(this.tableLayoutPanel);
    104       this.splitContainer.Size = new System.Drawing.Size(852, 494);
    105       this.splitContainer.SplitterDistance = 398;
    106       this.splitContainer.TabIndex = 3;
    107       //
    108       // label1
    109       //
    110       this.label1.AutoSize = true;
    111       this.label1.Location = new System.Drawing.Point(3, 8);
    112       this.label1.Name = "label1";
    113       this.label1.Size = new System.Drawing.Size(98, 13);
    114       this.label1.TabIndex = 5;
    115       this.label1.Text = "Deployment server:";
     87      this.serverUrlLabel.AutoSize = true;
     88      this.serverUrlLabel.Location = new System.Drawing.Point(3, 6);
     89      this.serverUrlLabel.Name = "serverUrlLabel";
     90      this.serverUrlLabel.Size = new System.Drawing.Size(98, 13);
     91      this.serverUrlLabel.TabIndex = 5;
     92      this.serverUrlLabel.Text = "Deployment server:";
    11693      //
    11794      // serverUrlTextBox
    11895      //
    119       this.serverUrlTextBox.Location = new System.Drawing.Point(107, 5);
     96      this.serverUrlTextBox.Location = new System.Drawing.Point(107, 3);
    12097      this.serverUrlTextBox.Name = "serverUrlTextBox";
    121       this.serverUrlTextBox.Size = new System.Drawing.Size(107, 20);
     98      this.serverUrlTextBox.Size = new System.Drawing.Size(246, 20);
    12299      this.serverUrlTextBox.TabIndex = 4;
    123100      //
    124101      // connectButton
    125102      //
    126       this.connectButton.Location = new System.Drawing.Point(220, 3);
     103      this.connectButton.Location = new System.Drawing.Point(359, 1);
    127104      this.connectButton.Name = "connectButton";
    128105      this.connectButton.Size = new System.Drawing.Size(75, 23);
     
    132109      this.connectButton.Click += new System.EventHandler(this.connectButton_Click);
    133110      //
    134       // tableLayoutPanel
     111      // refreshButton
    135112      //
    136       this.tableLayoutPanel.ColumnCount = 2;
    137       this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
    138       this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
    139       this.tableLayoutPanel.Controls.Add(this.serverPluginDetailsGroupBox, 1, 0);
    140       this.tableLayoutPanel.Controls.Add(this.localPluginDetailsGroupBox, 0, 0);
    141       this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
    142       this.tableLayoutPanel.Location = new System.Drawing.Point(0, 0);
    143       this.tableLayoutPanel.Name = "tableLayoutPanel";
    144       this.tableLayoutPanel.RowCount = 1;
    145       this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
    146       this.tableLayoutPanel.Size = new System.Drawing.Size(450, 494);
    147       this.tableLayoutPanel.TabIndex = 3;
     113      this.refreshButton.Location = new System.Drawing.Point(440, 1);
     114      this.refreshButton.Name = "refreshButton";
     115      this.refreshButton.Size = new System.Drawing.Size(75, 23);
     116      this.refreshButton.TabIndex = 6;
     117      this.refreshButton.Text = "Refresh";
     118      this.refreshButton.UseVisualStyleBackColor = true;
     119      this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
    148120      //
    149       // serverPluginDetailsGroupBox
     121      // uploadButton
    150122      //
    151       this.serverPluginDetailsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
    152       this.serverPluginDetailsGroupBox.Location = new System.Drawing.Point(228, 3);
    153       this.serverPluginDetailsGroupBox.Name = "serverPluginDetailsGroupBox";
    154       this.serverPluginDetailsGroupBox.Size = new System.Drawing.Size(219, 488);
    155       this.serverPluginDetailsGroupBox.TabIndex = 3;
    156       this.serverPluginDetailsGroupBox.TabStop = false;
    157       this.serverPluginDetailsGroupBox.Text = "Server plugin information";
    158       //
    159       // localPluginDetailsGroupBox
    160       //
    161       this.localPluginDetailsGroupBox.Controls.Add(this.localPluginDetailsPanel);
    162       this.localPluginDetailsGroupBox.Controls.Add(this.uploadButton);
    163       this.localPluginDetailsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
    164       this.localPluginDetailsGroupBox.Location = new System.Drawing.Point(3, 3);
    165       this.localPluginDetailsGroupBox.Name = "localPluginDetailsGroupBox";
    166       this.localPluginDetailsGroupBox.Size = new System.Drawing.Size(219, 488);
    167       this.localPluginDetailsGroupBox.TabIndex = 4;
    168       this.localPluginDetailsGroupBox.TabStop = false;
    169       this.localPluginDetailsGroupBox.Text = "Local plugin information";
    170       //
    171       // localPluginDetailsPanel
    172       //
    173       this.localPluginDetailsPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    174                   | System.Windows.Forms.AnchorStyles.Left)
    175                   | System.Windows.Forms.AnchorStyles.Right)));
    176       this.localPluginDetailsPanel.Location = new System.Drawing.Point(6, 19);
    177       this.localPluginDetailsPanel.Name = "localPluginDetailsPanel";
    178       this.localPluginDetailsPanel.Size = new System.Drawing.Size(207, 434);
    179       this.localPluginDetailsPanel.TabIndex = 3;
    180       //
    181       // serverVersion
    182       //
    183       this.serverVersion.Text = "Server version";
    184       this.serverVersion.Width = 100;
     123      this.uploadButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     124      this.uploadButton.Location = new System.Drawing.Point(3, 482);
     125      this.uploadButton.Name = "uploadButton";
     126      this.uploadButton.Size = new System.Drawing.Size(75, 23);
     127      this.uploadButton.TabIndex = 7;
     128      this.uploadButton.Text = "Upload";
     129      this.uploadButton.UseVisualStyleBackColor = true;
     130      this.uploadButton.Click += new System.EventHandler(this.uploadButton_Click);
    185131      //
    186132      // PluginListView
     
    188134      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    189135      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    190       this.Controls.Add(this.splitContainer);
     136      this.Controls.Add(this.uploadButton);
     137      this.Controls.Add(this.refreshButton);
     138      this.Controls.Add(this.connectButton);
     139      this.Controls.Add(this.serverUrlTextBox);
     140      this.Controls.Add(this.serverUrlLabel);
     141      this.Controls.Add(this.listView);
    191142      this.Name = "PluginListView";
    192       this.Size = new System.Drawing.Size(852, 494);
    193       this.splitContainer.Panel1.ResumeLayout(false);
    194       this.splitContainer.Panel1.PerformLayout();
    195       this.splitContainer.Panel2.ResumeLayout(false);
    196       this.splitContainer.ResumeLayout(false);
    197       this.tableLayoutPanel.ResumeLayout(false);
    198       this.localPluginDetailsGroupBox.ResumeLayout(false);
     143      this.Size = new System.Drawing.Size(539, 508);
    199144      this.ResumeLayout(false);
     145      this.PerformLayout();
    200146
    201147    }
     
    206152    private System.Windows.Forms.ColumnHeader nameHeader;
    207153    private System.Windows.Forms.ColumnHeader localVersion;
     154    private System.Windows.Forms.Button connectButton;
     155    private System.Windows.Forms.Label serverUrlLabel;
     156    private System.Windows.Forms.TextBox serverUrlTextBox;
     157    private System.Windows.Forms.ColumnHeader serverVersion;
     158    private System.Windows.Forms.Button refreshButton;
    208159    private System.Windows.Forms.Button uploadButton;
    209     private System.Windows.Forms.SplitContainer splitContainer;
    210     private System.Windows.Forms.Button connectButton;
    211     private System.Windows.Forms.Label label1;
    212     private System.Windows.Forms.TextBox serverUrlTextBox;
    213     private System.Windows.Forms.TableLayoutPanel tableLayoutPanel;
    214     private System.Windows.Forms.GroupBox serverPluginDetailsGroupBox;
    215     private System.Windows.Forms.GroupBox localPluginDetailsGroupBox;
    216     private System.Windows.Forms.Panel localPluginDetailsPanel;
    217     private System.Windows.Forms.ColumnHeader serverVersion;
     160    private System.Windows.Forms.ImageList imageList;
    218161  }
    219162}
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/PluginListView.cs

    r2816 r2860  
    2323    public PluginListView() {
    2424      InitializeComponent();
     25      imageList.Images.Add(HeuristicLab.Common.Resources.VS2008ImageLibrary.Assembly);
     26      imageList.Images.Add(HeuristicLab.Common.Resources.VS2008ImageLibrary.ArrowUp);
    2527      Caption = "Plugins";
    2628
     
    3133      localAndServerPlugins = new Dictionary<IPluginDescription, PluginDeploymentService.PluginDescription>();
    3234
     35      #region initialize backgroundworkers
    3336      pluginUploadWorker = new BackgroundWorker();
    3437      pluginUploadWorker.DoWork += new DoWorkEventHandler(pluginUploadWorker_DoWork);
     
    3841      updateServerPluginsWorker.DoWork += new DoWorkEventHandler(updateServerPluginsWorker_DoWork);
    3942      updateServerPluginsWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(updateServerPluginsWorker_RunWorkerCompleted);
    40     }
    41 
     43      #endregion
     44    }
     45
     46    #region refresh plugins from server backgroundworker
    4247    void updateServerPluginsWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
    4348      if (!e.Cancelled && e.Result != null) {
    44         UpdateLocalPlugins();
     49        // refresh local plugins
     50        localAndServerPlugins.Clear();
     51        foreach (var plugin in ApplicationManager.Manager.Plugins) {
     52          localAndServerPlugins.Add(plugin, null);
     53        }
     54        // refresh server plugins (find matching local plugins)
    4555        var plugins = (PluginDeploymentService.PluginDescription[])e.Result;
    4656        foreach (var plugin in plugins) {
     
    5363          }
    5464        }
    55         UpdatePluginList();
    56         OnConnected();
    57       } else {
    58         OnDisconnected();
    59       }
     65        // refresh the list view with plugins
     66        listView.Items.Clear();
     67        foreach (var pair in localAndServerPlugins) {
     68          var item = MakeListViewItem(pair.Key);
     69          listView.Items.Add(item);
     70        }
     71        UpdateControlsConnectedState();
     72      } else {
     73        UpdateControlsDisconnectedState();
     74      }
     75      // make sure cursor is set correctly
    6076      Cursor = Cursors.Default;
    61     }
    62 
    63     private void UpdatePluginList() {
    64       listView.Items.Clear();
    65       foreach (var pair in localAndServerPlugins) {
    66         var item = MakeListViewItem(pair.Key);
    67         listView.Items.Add(item);
    68       }
    6977    }
    7078
     
    7684        }
    7785      }
    78       catch (EndpointNotFoundException ex) {
     86      catch (EndpointNotFoundException) {
    7987        e.Result = null;
    8088        e.Cancel = true;
    8189      }
    82       catch (FaultException ex) {
     90      catch (FaultException) {
    8391        e.Result = null;
    8492        e.Cancel = true;
    8593      }
    8694    }
    87 
     95    #endregion
     96
     97    #region upload plugins to server backgroundworker
    8898    void pluginUploadWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
    89       this.Enabled = true;
     99      Cursor = Cursors.Default;
     100      if (e.Cancelled) {
     101        UpdateControlsDisconnectedState();
     102      } else {
     103        UpdateControlsConnectedState();
     104        // start another async call to refresh plugin information from server
     105        RefreshPluginsAsync();
     106      }
    90107    }
    91108
    92109    void pluginUploadWorker_DoWork(object sender, DoWorkEventArgs e) {
    93       var selectedPlugins = (IEnumerable<IPluginDescription>)e.Argument;
    94       using (PluginDeploymentService.AdminClient adminClient = new PluginDeploymentService.AdminClient()) {
    95 
    96         foreach (var plugin in IteratePlugins(selectedPlugins)) {
    97           adminClient.DeployPlugin(MakePluginDescription(plugin), CreateZipPackage(plugin));
    98         }
    99       }
    100     }
    101 
     110      try {
     111        var selectedPlugins = (IEnumerable<IPluginDescription>)e.Argument;
     112        using (PluginDeploymentService.AdminClient adminClient = new PluginDeploymentService.AdminClient()) {
     113
     114          foreach (var plugin in IteratePlugins(selectedPlugins)) {
     115            adminClient.DeployPlugin(MakePluginDescription(plugin), CreateZipPackage(plugin));
     116          }
     117        }
     118        e.Cancel = false;
     119      }
     120      catch (EndpointNotFoundException) {
     121        e.Cancel = true;
     122      }
     123      catch (FaultException) {
     124        e.Cancel = true;
     125      }
     126    }
     127    #endregion
     128
     129
     130    #region button events
     131    private void uploadButton_Click(object sender, EventArgs e) {
     132      var selectedPlugins = from item in listView.Items.Cast<ListViewItem>()
     133                            where item.Checked
     134                            where item.Tag is IPluginDescription
     135                            select item.Tag as IPluginDescription;
     136      if (selectedPlugins.Count() > 0) {
     137        Cursor = Cursors.AppStarting;
     138        DisableControl();
     139        pluginUploadWorker.RunWorkerAsync(selectedPlugins.ToList());
     140      }
     141    }
     142
     143    private void connectButton_Click(object sender, EventArgs e) {
     144      if (connectButton.Text == "Connect") {
     145        DisableControl();
     146        RefreshPluginsAsync();
     147      } else {
     148        UpdateControlsDisconnectedState();
     149      }
     150    }
     151
     152    private void refreshButton_Click(object sender, EventArgs e) {
     153      DisableControl();
     154      RefreshPluginsAsync();
     155    }
     156
     157    #endregion
     158
     159    #region item list events
     160    private void listView_ItemActivate(object sender, EventArgs e) {
     161      foreach (var item in listView.SelectedItems) {
     162        var plugin = (IPluginDescription)((ListViewItem)item).Tag;
     163        var compView = new PluginComparisonView(plugin, localAndServerPlugins[plugin]);
     164        compView.Show();
     165      }
     166    }
     167
     168    private void listView_ItemChecked(object sender, ItemCheckedEventArgs e) {
     169      // also check all dependencies
     170      if (e.Item.Checked) {
     171        uploadButton.Enabled = true;
     172        var plugin = (IPluginDescription)e.Item.Tag;
     173        foreach (var dep in plugin.Dependencies) {
     174          var depItem = FindItemForPlugin(dep);
     175          if (!depItem.Checked) depItem.Checked = true;
     176        }
     177      } else {
     178        uploadButton.Enabled = (from i in listView.Items.Cast<ListViewItem>()
     179                                where i.Checked
     180                                select i).Any();
     181        // also uncheck all dependent plugins
     182        var plugin = (IPluginDescription)e.Item.Tag;
     183        foreach (ListViewItem item in listView.Items) {
     184          var dep = (IPluginDescription)item.Tag;
     185          if (dep.Dependencies.Contains(plugin) && item.Checked) {
     186            item.Checked = false;
     187          }
     188        }
     189      }
     190    }
     191    #endregion
     192
     193    #region helper methods
    102194    private byte[] CreateZipPackage(IPluginDescription plugin) {
    103195      using (MemoryStream stream = new MemoryStream()) {
     
    113205    }
    114206
     207    private ListViewItem MakeListViewItem(IPluginDescription plugin) {
     208      ListViewItem item;
     209      if (localAndServerPlugins[plugin] != null) {
     210        item = new ListViewItem(new string[] { plugin.Name, plugin.Version.ToString(), localAndServerPlugins[plugin].Version.ToString() });
     211      } else {
     212        item = new ListViewItem(new string[] { plugin.Name, plugin.Version.ToString(), string.Empty });
     213      }
     214      item.Tag = plugin;
     215      item.Checked = false;
     216      return item;
     217    }
     218
     219    private ListViewItem FindItemForPlugin(IPluginDescription dep) {
     220      return (from i in listView.Items.Cast<ListViewItem>()
     221              where i.Tag == dep
     222              select i).Single();
     223    }
     224
    115225    private PluginDeploymentService.PluginDescription MakePluginDescription(IPluginDescription plugin) {
    116226      var dependencies = from dep in plugin.Dependencies
     
    118228      if (string.IsNullOrEmpty(plugin.ContactName) || string.IsNullOrEmpty(plugin.ContactEmail)) {
    119229        return new PluginDeploymentService.PluginDescription(plugin.Name, plugin.Version, dependencies);
    120       } else return new PluginDeploymentService.PluginDescription(plugin.Name, plugin.Version, dependencies, plugin.ContactName + ", " + plugin.ContactEmail, plugin.LicenseText);
     230      } else return new PluginDeploymentService.PluginDescription(plugin.Name, plugin.Version, dependencies, plugin.ContactName, plugin.ContactEmail, plugin.LicenseText);
    121231    }
    122232
     
    130240    }
    131241
    132     public void UpdateLocalPlugins() {
    133       localAndServerPlugins.Clear();
    134 
    135       foreach (var plugin in ApplicationManager.Manager.Plugins) {
    136         localAndServerPlugins.Add(plugin, null);
    137       }
    138     }
    139 
    140 
    141     private ListViewItem MakeListViewItem(IPluginDescription plugin) {
    142       ListViewItem item;
    143       if (localAndServerPlugins[plugin] != null) {
    144         item = new ListViewItem(new string[] { plugin.Name, plugin.Version.ToString(), localAndServerPlugins[plugin].Version.ToString() });
    145       } else {
    146         item = new ListViewItem(new string[] { plugin.Name, plugin.Version.ToString(), string.Empty });
    147       }
    148       item.Tag = plugin;
    149       return item;
    150     }
    151 
    152     private void listView_SelectedIndexChanged(object sender, EventArgs e) {
    153       localPluginDetailsPanel.Controls.Clear();
    154       serverPluginDetailsGroupBox.Controls.Clear();
    155 
    156       if (listView.SelectedItems.Count > 0) {
    157         var plugin = (IPluginDescription)listView.SelectedItems[0].Tag;
    158         ShowPluginDetails(plugin);
    159       }
    160     }
    161 
    162     private void ShowPluginDetails(IPluginDescription plugin) {
    163       var localView = new LocalPluginView(plugin);
    164       var serverView = new ServerPluginView(localAndServerPlugins[plugin]);
    165       localView.Dock = DockStyle.Fill;
    166       serverView.Dock = DockStyle.Fill;
    167       localPluginDetailsPanel.Controls.Add(localView);
    168       serverPluginDetailsGroupBox.Controls.Add(serverView);
    169     }
    170 
    171     private void uploadButton_Click(object sender, EventArgs e) {
    172       if (listView.SelectedItems.Count > 0) {
    173         var selectedPlugins = from item in listView.SelectedItems.Cast<ListViewItem>()
    174                               where item.Tag is IPluginDescription
    175                               select item.Tag as IPluginDescription;
    176         this.Enabled = false;
    177         pluginUploadWorker.RunWorkerAsync(selectedPlugins.ToList());
    178       }
    179     }
    180 
    181     private void connectButton_Click(object sender, EventArgs e) {
    182       OnDisconnected();
     242    // start background process to refresh the plugin list (local and server)
     243    private void RefreshPluginsAsync() {
    183244      Cursor = Cursors.AppStarting;
     245      DisableControl();
    184246      updateServerPluginsWorker.RunWorkerAsync();
    185247    }
    186248
    187     private void OnConnected() {
    188       connectButton.Enabled = false;
    189       serverUrlTextBox.Enabled = false;
    190       label1.Enabled = false;
    191 
    192       listView.Enabled = true;
    193       uploadButton.Enabled = true;
    194     }
    195 
    196     private void OnDisconnected() {
    197       connectButton.Enabled = true;
     249    // is called by all methods that start a background process
     250    // controls must be enabled manuall again when the backgroundworker finishes
     251    private void DisableControl() {
     252      MainFormManager.GetMainForm<MainForm>().ShowProgressBar();
     253      foreach (Control ctrl in Controls)
     254        ctrl.Enabled = false;
     255    }
     256
     257    private void UpdateControlsDisconnectedState() {
     258      connectButton.Text = "Connect";
    198259      serverUrlTextBox.Enabled = true;
    199       label1.Enabled = true;
     260      serverUrlLabel.Enabled = true;
     261      refreshButton.Enabled = false;
    200262
    201263      localAndServerPlugins.Clear();
    202264      listView.Items.Clear();
    203       localPluginDetailsPanel.Controls.Clear();
    204       serverPluginDetailsGroupBox.Controls.Clear();
    205265      listView.Enabled = false;
    206266      uploadButton.Enabled = false;
    207     }
     267      MainFormManager.GetMainForm<MainForm>().HideProgressBar();
     268    }
     269
     270    private void UpdateControlsConnectedState() {
     271      connectButton.Text = "Disconnect";
     272      connectButton.Enabled = true;
     273      serverUrlTextBox.Enabled = false;
     274      serverUrlLabel.Enabled = false;
     275      refreshButton.Enabled = true;
     276      listView.Enabled = true;
     277      uploadButton.Enabled = false;
     278      MainFormManager.GetMainForm<MainForm>().HideProgressBar();
     279    }
     280
     281
     282    #endregion
    208283  }
    209284}
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/PluginListView.resx

    r2802 r2860  
    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>
    120123</root>
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/PluginView.Designer.cs

    r2816 r2860  
    2424    /// </summary>
    2525    private void InitializeComponent() {
     26      this.components = new System.ComponentModel.Container();
    2627      this.nameLabel = new System.Windows.Forms.Label();
    2728      this.nameTextBox = new System.Windows.Forms.TextBox();
     
    3334      this.dependenciesGroupBox = new System.Windows.Forms.GroupBox();
    3435      this.dependenciesListView = new System.Windows.Forms.ListView();
    35       this.nameHeader = new System.Windows.Forms.ColumnHeader();
    36       this.versionHeader = new System.Windows.Forms.ColumnHeader();
     36      this.pluginNameHeader = new System.Windows.Forms.ColumnHeader();
     37      this.pluginVersionHeader = new System.Windows.Forms.ColumnHeader();
     38      this.imageList = new System.Windows.Forms.ImageList(this.components);
     39      this.filesListView = new System.Windows.Forms.ListView();
     40      this.fileNameHeader = new System.Windows.Forms.ColumnHeader();
     41      this.fileTypeHeader = new System.Windows.Forms.ColumnHeader();
     42      this.filesGroupBox = new System.Windows.Forms.GroupBox();
    3743      this.dependenciesGroupBox.SuspendLayout();
     44      this.filesGroupBox.SuspendLayout();
    3845      this.SuspendLayout();
    3946      //
     
    5461      this.nameTextBox.Name = "nameTextBox";
    5562      this.nameTextBox.ReadOnly = true;
    56       this.nameTextBox.Size = new System.Drawing.Size(191, 20);
     63      this.nameTextBox.Size = new System.Drawing.Size(267, 20);
    5764      this.nameTextBox.TabIndex = 1;
    5865      //
     
    6471      this.versionTextBox.Name = "versionTextBox";
    6572      this.versionTextBox.ReadOnly = true;
    66       this.versionTextBox.Size = new System.Drawing.Size(191, 20);
     73      this.versionTextBox.Size = new System.Drawing.Size(267, 20);
    6774      this.versionTextBox.TabIndex = 3;
    6875      //
     
    8390      this.contactTextBox.Name = "contactTextBox";
    8491      this.contactTextBox.ReadOnly = true;
    85       this.contactTextBox.Size = new System.Drawing.Size(191, 20);
     92      this.contactTextBox.Size = new System.Drawing.Size(267, 20);
    8693      this.contactTextBox.TabIndex = 5;
    8794      //
     
    98105      //
    99106      this.licenseButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    100       this.licenseButton.Location = new System.Drawing.Point(3, 397);
     107      this.licenseButton.Location = new System.Drawing.Point(3, 486);
    101108      this.licenseButton.Name = "licenseButton";
    102109      this.licenseButton.Size = new System.Drawing.Size(103, 23);
     
    104111      this.licenseButton.Text = "Show license";
    105112      this.licenseButton.UseVisualStyleBackColor = true;
     113      this.licenseButton.Click += new System.EventHandler(this.licenseButton_Click);
    106114      //
    107115      // dependenciesGroupBox
     
    111119                  | System.Windows.Forms.AnchorStyles.Right)));
    112120      this.dependenciesGroupBox.Controls.Add(this.dependenciesListView);
    113       this.dependenciesGroupBox.Location = new System.Drawing.Point(3, 81);
     121      this.dependenciesGroupBox.Location = new System.Drawing.Point(3, 255);
    114122      this.dependenciesGroupBox.Name = "dependenciesGroupBox";
    115       this.dependenciesGroupBox.Size = new System.Drawing.Size(262, 310);
     123      this.dependenciesGroupBox.Size = new System.Drawing.Size(338, 225);
    116124      this.dependenciesGroupBox.TabIndex = 1;
    117125      this.dependenciesGroupBox.TabStop = false;
     
    121129      //
    122130      this.dependenciesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
    123             this.nameHeader,
    124             this.versionHeader});
     131            this.pluginNameHeader,
     132            this.pluginVersionHeader});
    125133      this.dependenciesListView.Dock = System.Windows.Forms.DockStyle.Fill;
    126134      this.dependenciesListView.Location = new System.Drawing.Point(3, 16);
    127135      this.dependenciesListView.Name = "dependenciesListView";
    128       this.dependenciesListView.Size = new System.Drawing.Size(256, 291);
     136      this.dependenciesListView.Size = new System.Drawing.Size(332, 206);
     137      this.dependenciesListView.SmallImageList = this.imageList;
    129138      this.dependenciesListView.TabIndex = 0;
    130139      this.dependenciesListView.UseCompatibleStateImageBehavior = false;
    131140      this.dependenciesListView.View = System.Windows.Forms.View.Details;
    132141      //
    133       // nameHeader
    134       //
    135       this.nameHeader.Text = "Name";
    136       this.nameHeader.Width = 180;
    137       //
    138       // versionHeader
    139       //
    140       this.versionHeader.Text = "Version";
    141       this.versionHeader.Width = 100;
     142      // pluginNameHeader
     143      //
     144      this.pluginNameHeader.Text = "Name";
     145      this.pluginNameHeader.Width = 200;
     146      //
     147      // pluginVersionHeader
     148      //
     149      this.pluginVersionHeader.Text = "Version";
     150      this.pluginVersionHeader.Width = 120;
     151      //
     152      // imageList
     153      //
     154      this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
     155      this.imageList.ImageSize = new System.Drawing.Size(16, 16);
     156      this.imageList.TransparentColor = System.Drawing.Color.Transparent;
     157      //
     158      // filesListView
     159      //
     160      this.filesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
     161            this.fileNameHeader,
     162            this.fileTypeHeader});
     163      this.filesListView.Dock = System.Windows.Forms.DockStyle.Fill;
     164      this.filesListView.Location = new System.Drawing.Point(3, 16);
     165      this.filesListView.Name = "filesListView";
     166      this.filesListView.Size = new System.Drawing.Size(329, 149);
     167      this.filesListView.SmallImageList = this.imageList;
     168      this.filesListView.TabIndex = 0;
     169      this.filesListView.UseCompatibleStateImageBehavior = false;
     170      this.filesListView.View = System.Windows.Forms.View.Details;
     171      //
     172      // fileNameHeader
     173      //
     174      this.fileNameHeader.Text = "Name";
     175      this.fileNameHeader.Width = 200;
     176      //
     177      // fileTypeHeader
     178      //
     179      this.fileTypeHeader.Text = "Type";
     180      this.fileTypeHeader.Width = 120;
     181      //
     182      // filesGroupBox
     183      //
     184      this.filesGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     185                  | System.Windows.Forms.AnchorStyles.Right)));
     186      this.filesGroupBox.Controls.Add(this.filesListView);
     187      this.filesGroupBox.Location = new System.Drawing.Point(3, 81);
     188      this.filesGroupBox.Name = "filesGroupBox";
     189      this.filesGroupBox.Size = new System.Drawing.Size(335, 168);
     190      this.filesGroupBox.TabIndex = 11;
     191      this.filesGroupBox.TabStop = false;
     192      this.filesGroupBox.Text = "Files";
    142193      //
    143194      // PluginView
     
    146197      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    147198      this.Controls.Add(this.dependenciesGroupBox);
     199      this.Controls.Add(this.filesGroupBox);
    148200      this.Controls.Add(this.licenseButton);
    149201      this.Controls.Add(this.contactTextBox);
     
    154206      this.Controls.Add(this.nameLabel);
    155207      this.Name = "PluginView";
    156       this.Size = new System.Drawing.Size(268, 423);
     208      this.Size = new System.Drawing.Size(344, 512);
    157209      this.dependenciesGroupBox.ResumeLayout(false);
     210      this.filesGroupBox.ResumeLayout(false);
    158211      this.ResumeLayout(false);
    159212      this.PerformLayout();
     
    171224    protected System.Windows.Forms.Button licenseButton;
    172225    protected System.Windows.Forms.GroupBox dependenciesGroupBox;
    173     private System.Windows.Forms.ColumnHeader nameHeader;
    174     private System.Windows.Forms.ColumnHeader versionHeader;
     226    private System.Windows.Forms.ColumnHeader pluginNameHeader;
     227    private System.Windows.Forms.ColumnHeader pluginVersionHeader;
    175228    protected System.Windows.Forms.ListView dependenciesListView;
     229    private System.Windows.Forms.ListView filesListView;
     230    private System.Windows.Forms.GroupBox filesGroupBox;
     231    private System.Windows.Forms.ImageList imageList;
     232    private System.Windows.Forms.ColumnHeader fileNameHeader;
     233    private System.Windows.Forms.ColumnHeader fileTypeHeader;
    176234
    177235  }
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/PluginView.cs

    r2816 r2860  
    88using System.Windows.Forms;
    99using HeuristicLab.PluginInfrastructure;
     10using System.IO;
    1011
    1112namespace HeuristicLab.DeploymentService.AdminClient {
    1213  public partial class PluginView : UserControl {
     14    private const string IMAGE_KEY_ASSEMBLY = "Assembly";
     15    private const string IMAGE_KEY_FILE = "File";
     16    private const string IMAGE_KEY_DOCUMENT = "Document";
     17
     18    private IPluginDescription plugin;
     19
    1320    public PluginView() {
    1421      InitializeComponent();
     22      PopulateImageList();
     23    }
     24
     25    public PluginView(IPluginDescription plugin) {
     26      InitializeComponent();
     27      PopulateImageList();
     28
     29      this.plugin = plugin;
     30      UpdateControls();
     31    }
     32
     33    private void PopulateImageList() {
     34      imageList.Images.Add(IMAGE_KEY_ASSEMBLY, HeuristicLab.Common.Resources.VS2008ImageLibrary.Assembly);
     35      imageList.Images.Add(IMAGE_KEY_FILE, HeuristicLab.Common.Resources.VS2008ImageLibrary.File);
     36      imageList.Images.Add(IMAGE_KEY_DOCUMENT, HeuristicLab.Common.Resources.VS2008ImageLibrary.Document);
     37    }
     38
     39    public void UpdateControls() {
     40      string appDir = Path.GetDirectoryName(Application.ExecutablePath);
     41      nameTextBox.Text = plugin.Name;
     42      versionTextBox.Text = plugin.Version.ToString();
     43      contactTextBox.Text = CombineStrings(plugin.ContactName, plugin.ContactEmail);
     44      foreach (IPluginDescription dependency in plugin.Dependencies) {
     45        var depItem = new ListViewItem(new string[] { dependency.Name, dependency.Version.ToString() });
     46        depItem.ImageKey = IMAGE_KEY_ASSEMBLY;
     47        dependenciesListView.Items.Add(depItem);
     48      }
     49      foreach (var file in plugin.Files) {
     50        string displayedFileName = file.Name.Replace(appDir, string.Empty);
     51        displayedFileName = displayedFileName.TrimStart(Path.DirectorySeparatorChar);
     52        var fileItem = new ListViewItem(new string[] { displayedFileName, file.Type.ToString() });
     53        if (file.Type == PluginFileType.Assembly) {
     54          fileItem.ImageKey = IMAGE_KEY_ASSEMBLY;
     55        } else if (file.Type == PluginFileType.License) {
     56          fileItem.ImageKey = IMAGE_KEY_DOCUMENT;
     57        } else fileItem.ImageKey = IMAGE_KEY_FILE;
     58        filesListView.Items.Add(fileItem);
     59      }
     60      licenseButton.Enabled = !string.IsNullOrEmpty(plugin.LicenseText);
     61    }
     62
     63    private string CombineStrings(string a, string b) {
     64      if (string.IsNullOrEmpty(a))
     65        // a is empty
     66        if (!string.IsNullOrEmpty(b)) return CombineStrings(b, string.Empty);
     67        else return string.Empty;
     68      // a is not empty
     69      else if (string.IsNullOrEmpty(b)) return a;
     70      // and b are not empty
     71      else return a + ", " + b;
     72    }
     73
     74    private void licenseButton_Click(object sender, EventArgs e) {
     75      LicenseView view = new LicenseView(plugin.Name, plugin.Version.ToString(), plugin.LicenseText);
     76      view.Show();
    1577    }
    1678  }
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/PluginView.resx

    r2816 r2860  
    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>
    120123</root>
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.dbml

    r2816 r2860  
    1919      <Column Name="Name" Type="System.String" DbType="NVarChar(300) NOT NULL" CanBeNull="false" />
    2020      <Column Name="Version" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
    21       <Column Name="ContactInformation" Type="System.String" DbType="Text" CanBeNull="true" UpdateCheck="Never" />
     21      <Column Name="ContactName" Type="System.String" DbType="Text" CanBeNull="true" UpdateCheck="Never" />
     22      <Column Name="ContactEmail" Type="System.String" DbType="Text" CanBeNull="true" UpdateCheck="Never" />
    2223      <Column Name="License" Type="System.String" DbType="Text" CanBeNull="true" UpdateCheck="Never" />
    2324      <Association Name="Plugin_PluginPackage" Member="PluginPackage" ThisKey="Id" OtherKey="PluginId" Type="PluginPackage" Cardinality="One" />
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.dbml.layout

    r2816 r2860  
    33  <DataContextMoniker Name="/PluginStoreClassesDataContext" />
    44  <nestedChildShapes>
    5     <classShape Id="5aa5ddda-9296-44d2-a516-238be9f4719d" absoluteBounds="3.5, 2, 2, 1.1939925130208335">
     5    <classShape Id="16e9d26d-f78e-4457-8cdb-0cee0835a0b6" absoluteBounds="3.5, 2, 2, 1.1939925130208335">
    66      <DataClassMoniker Name="/PluginStoreClassesDataContext/Dependency" />
    77      <nestedChildShapes>
    8         <elementListCompartment Id="5ca38ac5-5a7e-4c47-a480-0536fec82dcc" absoluteBounds="3.515, 2.46, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     8        <elementListCompartment Id="90573696-5cb0-44c5-a492-6e26800047b3" absoluteBounds="3.515, 2.46, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    99      </nestedChildShapes>
    1010    </classShape>
    11     <classShape Id="a5892850-02a5-4f0c-8b4d-cdc887c495b6" absoluteBounds="3.5, 4, 2, 1.1939925130208344">
     11    <classShape Id="86708203-9aa2-44f4-a85f-7fad2c542e23" absoluteBounds="3.5, 4, 2, 1.1939925130208344">
    1212      <DataClassMoniker Name="/PluginStoreClassesDataContext/ProductPlugin" />
    1313      <nestedChildShapes>
    14         <elementListCompartment Id="07b98569-9ca9-4b3f-8829-d57557588cba" absoluteBounds="3.515, 4.46, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     14        <elementListCompartment Id="da9607ee-b60e-44f0-8e80-704abd6dd898" absoluteBounds="3.515, 4.46, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    1515      </nestedChildShapes>
    1616    </classShape>
    17     <classShape Id="7c7e406d-95e8-4f00-ab8e-634b7fbbbea5" absoluteBounds="0.75, 2.75, 2, 1.7708968098958335">
     17    <classShape Id="1e228e3e-9436-4cd0-b7f7-492427268001" absoluteBounds="0.75, 2.625, 2, 1.9631982421874996">
    1818      <DataClassMoniker Name="/PluginStoreClassesDataContext/Plugin" />
    1919      <nestedChildShapes>
    20         <elementListCompartment Id="25134a80-4bf5-4672-bd9e-6449a7935427" absoluteBounds="0.765, 3.21, 1.9700000000000002, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     20        <elementListCompartment Id="81f74f1f-d4d0-4dce-991e-fb10afa63eb5" absoluteBounds="0.765, 3.085, 1.9700000000000002, 1.4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    2121      </nestedChildShapes>
    2222    </classShape>
    23     <classShape Id="855904b1-2043-4ccc-951d-2f35df8b6190" absoluteBounds="3.5, 6, 2, 1.1939925130208344">
     23    <classShape Id="d660db81-846c-4661-9a86-09567e927f9d" absoluteBounds="3.5, 6, 2, 1.1939925130208344">
    2424      <DataClassMoniker Name="/PluginStoreClassesDataContext/PluginPackage" />
    2525      <nestedChildShapes>
    26         <elementListCompartment Id="25003445-42f3-4db9-8945-6609772da5ec" absoluteBounds="3.515, 6.46, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     26        <elementListCompartment Id="31a89e0e-c915-41d6-926b-d8c0f029f27d" absoluteBounds="3.515, 6.46, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    2727      </nestedChildShapes>
    2828    </classShape>
    29     <classShape Id="cc5365b1-2536-41e1-b69d-c3ab09f01086" absoluteBounds="0.75, 5.875, 2, 1.3862939453125005">
     29    <classShape Id="55486421-017b-44b9-894d-6cc4501cda04" absoluteBounds="0.75, 5.875, 2, 1.3862939453125005">
    3030      <DataClassMoniker Name="/PluginStoreClassesDataContext/Product" />
    3131      <nestedChildShapes>
    32         <elementListCompartment Id="875bde79-6306-48eb-bcea-c8653ef81ec2" absoluteBounds="0.765, 6.335, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     32        <elementListCompartment Id="5abad42a-034c-4331-916c-e757c0c6c777" absoluteBounds="0.765, 6.335, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    3333      </nestedChildShapes>
    3434    </classShape>
    35     <associationConnector edgePoints="[(2.75 : 4.52089680989583); (3.125 : 4.89589680989583); (3.125 : 6.59699625651042); (3.5 : 6.59699625651042)]" fixedFrom="NotFixed" fixedTo="Algorithm">
     35    <associationConnector edgePoints="[(2.75 : 4.5881982421875); (3.125 : 4.9631982421875); (3.125 : 6.59699625651042); (3.5 : 6.59699625651042)]" fixedFrom="NotFixed" fixedTo="Algorithm">
    3636      <AssociationMoniker Name="/PluginStoreClassesDataContext/Plugin/Plugin_PluginPackage" />
    3737      <nodes>
    38         <classShapeMoniker Id="7c7e406d-95e8-4f00-ab8e-634b7fbbbea5" />
    39         <classShapeMoniker Id="855904b1-2043-4ccc-951d-2f35df8b6190" />
     38        <classShapeMoniker Id="1e228e3e-9436-4cd0-b7f7-492427268001" />
     39        <classShapeMoniker Id="d660db81-846c-4661-9a86-09567e927f9d" />
    4040      </nodes>
    4141    </associationConnector>
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.designer.cs

    r2816 r2860  
    303303    private string _Version;
    304304   
    305     private string _ContactInformation;
     305    private string _ContactName;
     306   
     307    private string _ContactEmail;
    306308   
    307309    private string _License;
     
    319321    partial void OnVersionChanging(string value);
    320322    partial void OnVersionChanged();
    321     partial void OnContactInformationChanging(string value);
    322     partial void OnContactInformationChanged();
     323    partial void OnContactNameChanging(string value);
     324    partial void OnContactNameChanged();
     325    partial void OnContactEmailChanging(string value);
     326    partial void OnContactEmailChanged();
    323327    partial void OnLicenseChanging(string value);
    324328    partial void OnLicenseChanged();
     
    391395    }
    392396   
    393     [Column(Storage="_ContactInformation", DbType="Text", UpdateCheck=UpdateCheck.Never)]
    394     public string ContactInformation
    395     {
    396       get
    397       {
    398         return this._ContactInformation;
    399       }
    400       set
    401       {
    402         if ((this._ContactInformation != value))
    403         {
    404           this.OnContactInformationChanging(value);
    405           this.SendPropertyChanging();
    406           this._ContactInformation = value;
    407           this.SendPropertyChanged("ContactInformation");
    408           this.OnContactInformationChanged();
     397    [Column(Storage="_ContactName", DbType="Text", UpdateCheck=UpdateCheck.Never)]
     398    public string ContactName
     399    {
     400      get
     401      {
     402        return this._ContactName;
     403      }
     404      set
     405      {
     406        if ((this._ContactName != value))
     407        {
     408          this.OnContactNameChanging(value);
     409          this.SendPropertyChanging();
     410          this._ContactName = value;
     411          this.SendPropertyChanged("ContactName");
     412          this.OnContactNameChanged();
     413        }
     414      }
     415    }
     416   
     417    [Column(Storage="_ContactEmail", DbType="Text", UpdateCheck=UpdateCheck.Never)]
     418    public string ContactEmail
     419    {
     420      get
     421      {
     422        return this._ContactEmail;
     423      }
     424      set
     425      {
     426        if ((this._ContactEmail != value))
     427        {
     428          this.OnContactEmailChanging(value);
     429          this.SendPropertyChanging();
     430          this._ContactEmail = value;
     431          this.SendPropertyChanged("ContactEmail");
     432          this.OnContactEmailChanged();
    409433        }
    410434      }
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/PluginDescription.cs

    r2816 r2860  
    2121    }
    2222
    23     [DataMember(Name = "ContactInformation")]
    24     private string contactInformation;
    25     public string ContactInformation {
    26       get { return contactInformation; }
     23    [DataMember(Name = "ContactName")]
     24    private string contactName;
     25    public string ContactName {
     26      get { return contactName; }
     27    }
     28
     29    [DataMember(Name = "ContactEmail")]
     30    private string contactEmail;
     31    public string ContactEmail {
     32      get { return contactEmail; }
    2733    }
    2834
     
    3945    }
    4046
    41     public PluginDescription(string name, Version version, IEnumerable<PluginDescription> dependencies, string contactInformation, string license) {
     47    public PluginDescription(string name, Version version, IEnumerable<PluginDescription> dependencies,
     48      string contactName, string contactEmail, string license) {
    4249      if (string.IsNullOrEmpty(name)) throw new ArgumentException("name is empty");
    43       if (version == null || dependencies == null || contactInformation == null || license == null) throw new ArgumentNullException();
     50      if (version == null || dependencies == null ||
     51        contactName == null || contactEmail == null ||
     52        license == null) throw new ArgumentNullException();
    4453      this.name = name;
    4554      this.version = version;
    4655      this.dependencies = new List<PluginDescription>(dependencies);
    4756      this.licenseText = license;
    48       this.contactInformation = contactInformation;
     57      this.contactName = contactName;
     58      this.contactEmail = contactEmail;
    4959    }
    5060
     
    5464
    5565    public PluginDescription(string name, Version version, IEnumerable<PluginDescription> dependencies)
    56       : this(name, version, dependencies, string.Empty, string.Empty) {
     66      : this(name, version, dependencies, string.Empty, string.Empty, string.Empty) {
    5767    }
    5868  }
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/PluginStore.cs

    r2816 r2860  
    144144      // update plugin data
    145145      pluginEntity.License = pluginDescription.LicenseText;
    146       pluginEntity.ContactInformation = pluginDescription.ContactInformation;
    147      
     146      pluginEntity.ContactName = pluginDescription.ContactName;
     147      pluginEntity.ContactEmail = pluginDescription.ContactEmail;
     148
    148149      // delete cached entry
    149150      if (pluginDescriptions.ContainsKey(pluginEntity)) pluginDescriptions.Remove(pluginEntity);
     
    196197          from dep in GetDependencies(ctx, plugin)
    197198          select MakePluginDescription(ctx, dep),
    198           plugin.ContactInformation ?? string.Empty,
     199          plugin.ContactName ?? string.Empty,
     200          plugin.ContactEmail ?? string.Empty,
    199201          plugin.License ?? string.Empty
    200202          );
     
    208210      plugin.Name = pluginDescription.Name;
    209211      plugin.Version = pluginDescription.Version.ToString();
    210       plugin.ContactInformation = pluginDescription.ContactInformation;
     212      plugin.ContactName = pluginDescription.ContactName;
     213      plugin.ContactEmail = pluginDescription.ContactEmail;
    211214      plugin.License = pluginDescription.LicenseText;
    212215      return plugin;
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/DeploymentService/DeploymentService.cs

    r2814 r2860  
    2222        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
    2323       
    24         private string ContactInformationField;
     24        private string ContactEmailField;
     25       
     26        private string ContactNameField;
    2527       
    2628        private HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] DependenciesField;
     
    4547       
    4648        [System.Runtime.Serialization.DataMemberAttribute()]
    47         public string ContactInformation
    48         {
    49             get
    50             {
    51                 return this.ContactInformationField;
    52             }
    53             set
    54             {
    55                 this.ContactInformationField = value;
     49        public string ContactEmail
     50        {
     51            get
     52            {
     53                return this.ContactEmailField;
     54            }
     55            set
     56            {
     57                this.ContactEmailField = value;
     58            }
     59        }
     60       
     61        [System.Runtime.Serialization.DataMemberAttribute()]
     62        public string ContactName
     63        {
     64            get
     65            {
     66                return this.ContactNameField;
     67            }
     68            set
     69            {
     70                this.ContactNameField = value;
    5671            }
    5772        }
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/DeploymentService/PluginDescription.cs

    r2814 r2860  
    3131namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService {
    3232  // extension of auto-generated DataContract class PluginDescription
    33   public partial class PluginDescription {
     33  public partial class PluginDescription : IPluginDescription {
    3434    public PluginDescription(string name, Version version) : this(name, version, new List<PluginDescription>()) { }
    3535    public PluginDescription(string name, Version version, IEnumerable<PluginDescription> dependencies)
    36       : this(name, version, dependencies, string.Empty, string.Empty) {
     36      : this(name, version, dependencies, string.Empty, string.Empty, string.Empty) {
    3737    }
    3838
    39     public PluginDescription(string name, Version version, IEnumerable<PluginDescription> dependencies, string contactInformation, string licenseText) {
     39    public PluginDescription(string name, Version version, IEnumerable<PluginDescription> dependencies, string contactName, string contactEmail, string licenseText) {
    4040      this.Name = name;
    4141      this.Version = version;
    4242      this.Dependencies = dependencies.ToArray();
    43       this.ContactInformation = contactInformation;
    4443      this.LicenseText = licenseText;
    4544    }
     45
     46    #region IPluginDescription Members
     47
     48
     49    [Obsolete]
     50    public DateTime BuildDate {
     51      get { throw new NotImplementedException(); }
     52    }
     53
     54    IEnumerable<IPluginDescription> IPluginDescription.Dependencies {
     55      get {
     56        return Dependencies;
     57      }
     58    }
     59
     60    public IEnumerable<IPluginFile> Files {
     61      get { return Enumerable.Empty<IPluginFile>(); }
     62    }
     63
     64    #endregion
    4665  }
    4766}
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/DeploymentService/ProductDescription.cs

    r2811 r2860  
    3131namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService {
    3232  // extension of auto-generated DataContract class ProductDescription
    33   public partial class ProductDescription {
     33  public partial class ProductDescription  {
    3434    public ProductDescription(string name, Version version)
    3535      : this(name, version, new List<PluginDescription>()) {
  • trunk/sources/HeuristicLab.PluginInfrastructure/app.config

    r2814 r2860  
    2727        <bindings>
    2828            <wsHttpBinding>
    29                 <binding name="WSHttpBinding_IUpdate2" closeTimeout="00:01:00"
     29                <binding name="WSHttpBinding_IUpdate" closeTimeout="00:01:00"
    3030                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
    3131                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
     
    4444                    </security>
    4545                </binding>
    46                 <binding name="WSHttpBinding_IAdmin2" closeTimeout="00:01:00"
     46                <binding name="WSHttpBinding_IAdmin" closeTimeout="00:01:00"
    4747                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
    4848                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
     
    6565        <client>
    6666            <endpoint address="http://localhost:8731/Design_Time_Addresses/HeuristicLab.Services.Deployment/Update/"
    67                 binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IUpdate2"
     67                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IUpdate"
    6868                contract="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdate"
    69                 name="WSHttpBinding_IUpdate2">
     69                name="WSHttpBinding_IUpdate">
    7070                <identity>
    7171                    <dns value="localhost" />
     
    7373            </endpoint>
    7474            <endpoint address="http://localhost:8731/Design_Time_Addresses/HeuristicLab.Services.Deployment/Admin/"
    75                 binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IAdmin2"
     75                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IAdmin"
    7676                contract="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdmin"
    77                 name="WSHttpBinding_IAdmin2">
     77                name="WSHttpBinding_IAdmin">
    7878                <identity>
    7979                    <dns value="localhost" />
Note: See TracChangeset for help on using the changeset viewer.