Changeset 2860
- Timestamp:
- 02/24/10 14:34:07 (15 years ago)
- 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 74 74 </ItemGroup> 75 75 <ItemGroup> 76 <Compile Include=" ServerPluginView.cs">76 <Compile Include="PluginComparisonView.cs"> 77 77 <SubType>UserControl</SubType> 78 78 </Compile> 79 <Compile Include=" ServerPluginView.Designer.cs">80 <DependentUpon> ServerPluginView.cs</DependentUpon>79 <Compile Include="PluginComparisonView.Designer.cs"> 80 <DependentUpon>PluginComparisonView.cs</DependentUpon> 81 81 </Compile> 82 82 <Compile Include="PluginView.cs"> … … 91 91 <Compile Include="LicenseView.Designer.cs"> 92 92 <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>99 93 </Compile> 100 94 <Compile Include="ProductEditor.cs"> … … 121 115 </ItemGroup> 122 116 <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> 123 121 <ProjectReference Include="..\HeuristicLab.MainForm.WindowsForms\3.2\HeuristicLab.MainForm.WindowsForms-3.2.csproj"> 124 122 <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project> … … 140 138 </ItemGroup> 141 139 <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> 144 145 </EmbeddedResource> 145 146 <EmbeddedResource Include="PluginView.resx"> … … 148 149 <EmbeddedResource Include="LicenseView.resx"> 149 150 <DependentUpon>LicenseView.cs</DependentUpon> 150 </EmbeddedResource>151 <EmbeddedResource Include="LocalPluginView.resx">152 <DependentUpon>LocalPluginView.cs</DependentUpon>153 151 </EmbeddedResource> 154 152 <EmbeddedResource Include="ProductEditor.resx"> -
branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/MainForm.cs
r2802 r2860 7 7 namespace HeuristicLab.DeploymentService.AdminClient { 8 8 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 } 10 15 11 16 protected override void OnInitialized(EventArgs e) { … … 13 18 (new PluginListView()).Show(); 14 19 } 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 } 15 53 } 16 54 } -
branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/PluginListView.Designer.cs
r2816 r2860 24 24 /// </summary> 25 25 private void InitializeComponent() { 26 this.components = new System.ComponentModel.Container(); 26 27 this.listView = new System.Windows.Forms.ListView(); 27 28 this.nameHeader = new System.Windows.Forms.ColumnHeader(); 28 29 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(); 32 33 this.serverUrlTextBox = new System.Windows.Forms.TextBox(); 33 34 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(); 44 37 this.SuspendLayout(); 45 38 // 46 39 // listView 47 40 // 41 this.listView.Activation = System.Windows.Forms.ItemActivation.TwoClick; 48 42 this.listView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 49 43 | System.Windows.Forms.AnchorStyles.Left) 50 44 | System.Windows.Forms.AnchorStyles.Right))); 45 this.listView.CheckBoxes = true; 51 46 this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 52 47 this.nameHeader, … … 54 49 this.serverVersion}); 55 50 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); 58 54 this.listView.Name = "listView"; 59 55 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; 61 58 this.listView.TabIndex = 0; 62 59 this.listView.UseCompatibleStateImageBehavior = false; 63 60 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); 65 63 // 66 64 // nameHeader … … 74 72 this.localVersion.Width = 100; 75 73 // 76 // uploadButton74 // serverVersion 77 75 // 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; 87 78 // 88 // splitContainer79 // imageList 89 80 // 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; 93 84 // 94 // s plitContainer.Panel185 // serverUrlLabel 95 86 // 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:"; 116 93 // 117 94 // serverUrlTextBox 118 95 // 119 this.serverUrlTextBox.Location = new System.Drawing.Point(107, 5);96 this.serverUrlTextBox.Location = new System.Drawing.Point(107, 3); 120 97 this.serverUrlTextBox.Name = "serverUrlTextBox"; 121 this.serverUrlTextBox.Size = new System.Drawing.Size( 107, 20);98 this.serverUrlTextBox.Size = new System.Drawing.Size(246, 20); 122 99 this.serverUrlTextBox.TabIndex = 4; 123 100 // 124 101 // connectButton 125 102 // 126 this.connectButton.Location = new System.Drawing.Point( 220, 3);103 this.connectButton.Location = new System.Drawing.Point(359, 1); 127 104 this.connectButton.Name = "connectButton"; 128 105 this.connectButton.Size = new System.Drawing.Size(75, 23); … … 132 109 this.connectButton.Click += new System.EventHandler(this.connectButton_Click); 133 110 // 134 // tableLayoutPanel111 // refreshButton 135 112 // 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); 148 120 // 149 // serverPluginDetailsGroupBox121 // uploadButton 150 122 // 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); 185 131 // 186 132 // PluginListView … … 188 134 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 189 135 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); 191 142 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); 199 144 this.ResumeLayout(false); 145 this.PerformLayout(); 200 146 201 147 } … … 206 152 private System.Windows.Forms.ColumnHeader nameHeader; 207 153 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; 208 159 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; 218 161 } 219 162 } -
branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/PluginListView.cs
r2816 r2860 23 23 public PluginListView() { 24 24 InitializeComponent(); 25 imageList.Images.Add(HeuristicLab.Common.Resources.VS2008ImageLibrary.Assembly); 26 imageList.Images.Add(HeuristicLab.Common.Resources.VS2008ImageLibrary.ArrowUp); 25 27 Caption = "Plugins"; 26 28 … … 31 33 localAndServerPlugins = new Dictionary<IPluginDescription, PluginDeploymentService.PluginDescription>(); 32 34 35 #region initialize backgroundworkers 33 36 pluginUploadWorker = new BackgroundWorker(); 34 37 pluginUploadWorker.DoWork += new DoWorkEventHandler(pluginUploadWorker_DoWork); … … 38 41 updateServerPluginsWorker.DoWork += new DoWorkEventHandler(updateServerPluginsWorker_DoWork); 39 42 updateServerPluginsWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(updateServerPluginsWorker_RunWorkerCompleted); 40 } 41 43 #endregion 44 } 45 46 #region refresh plugins from server backgroundworker 42 47 void updateServerPluginsWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { 43 48 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) 45 55 var plugins = (PluginDeploymentService.PluginDescription[])e.Result; 46 56 foreach (var plugin in plugins) { … … 53 63 } 54 64 } 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 60 76 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 }69 77 } 70 78 … … 76 84 } 77 85 } 78 catch (EndpointNotFoundException ex) {86 catch (EndpointNotFoundException) { 79 87 e.Result = null; 80 88 e.Cancel = true; 81 89 } 82 catch (FaultException ex) {90 catch (FaultException) { 83 91 e.Result = null; 84 92 e.Cancel = true; 85 93 } 86 94 } 87 95 #endregion 96 97 #region upload plugins to server backgroundworker 88 98 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 } 90 107 } 91 108 92 109 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 102 194 private byte[] CreateZipPackage(IPluginDescription plugin) { 103 195 using (MemoryStream stream = new MemoryStream()) { … … 113 205 } 114 206 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 115 225 private PluginDeploymentService.PluginDescription MakePluginDescription(IPluginDescription plugin) { 116 226 var dependencies = from dep in plugin.Dependencies … … 118 228 if (string.IsNullOrEmpty(plugin.ContactName) || string.IsNullOrEmpty(plugin.ContactEmail)) { 119 229 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); 121 231 } 122 232 … … 130 240 } 131 241 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() { 183 244 Cursor = Cursors.AppStarting; 245 DisableControl(); 184 246 updateServerPluginsWorker.RunWorkerAsync(); 185 247 } 186 248 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"; 198 259 serverUrlTextBox.Enabled = true; 199 label1.Enabled = true; 260 serverUrlLabel.Enabled = true; 261 refreshButton.Enabled = false; 200 262 201 263 localAndServerPlugins.Clear(); 202 264 listView.Items.Clear(); 203 localPluginDetailsPanel.Controls.Clear();204 serverPluginDetailsGroupBox.Controls.Clear();205 265 listView.Enabled = false; 206 266 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 208 283 } 209 284 } -
branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/PluginListView.resx
r2802 r2860 118 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </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> 120 123 </root> -
branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/PluginView.Designer.cs
r2816 r2860 24 24 /// </summary> 25 25 private void InitializeComponent() { 26 this.components = new System.ComponentModel.Container(); 26 27 this.nameLabel = new System.Windows.Forms.Label(); 27 28 this.nameTextBox = new System.Windows.Forms.TextBox(); … … 33 34 this.dependenciesGroupBox = new System.Windows.Forms.GroupBox(); 34 35 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(); 37 43 this.dependenciesGroupBox.SuspendLayout(); 44 this.filesGroupBox.SuspendLayout(); 38 45 this.SuspendLayout(); 39 46 // … … 54 61 this.nameTextBox.Name = "nameTextBox"; 55 62 this.nameTextBox.ReadOnly = true; 56 this.nameTextBox.Size = new System.Drawing.Size( 191, 20);63 this.nameTextBox.Size = new System.Drawing.Size(267, 20); 57 64 this.nameTextBox.TabIndex = 1; 58 65 // … … 64 71 this.versionTextBox.Name = "versionTextBox"; 65 72 this.versionTextBox.ReadOnly = true; 66 this.versionTextBox.Size = new System.Drawing.Size( 191, 20);73 this.versionTextBox.Size = new System.Drawing.Size(267, 20); 67 74 this.versionTextBox.TabIndex = 3; 68 75 // … … 83 90 this.contactTextBox.Name = "contactTextBox"; 84 91 this.contactTextBox.ReadOnly = true; 85 this.contactTextBox.Size = new System.Drawing.Size( 191, 20);92 this.contactTextBox.Size = new System.Drawing.Size(267, 20); 86 93 this.contactTextBox.TabIndex = 5; 87 94 // … … 98 105 // 99 106 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); 101 108 this.licenseButton.Name = "licenseButton"; 102 109 this.licenseButton.Size = new System.Drawing.Size(103, 23); … … 104 111 this.licenseButton.Text = "Show license"; 105 112 this.licenseButton.UseVisualStyleBackColor = true; 113 this.licenseButton.Click += new System.EventHandler(this.licenseButton_Click); 106 114 // 107 115 // dependenciesGroupBox … … 111 119 | System.Windows.Forms.AnchorStyles.Right))); 112 120 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); 114 122 this.dependenciesGroupBox.Name = "dependenciesGroupBox"; 115 this.dependenciesGroupBox.Size = new System.Drawing.Size( 262, 310);123 this.dependenciesGroupBox.Size = new System.Drawing.Size(338, 225); 116 124 this.dependenciesGroupBox.TabIndex = 1; 117 125 this.dependenciesGroupBox.TabStop = false; … … 121 129 // 122 130 this.dependenciesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 123 this. nameHeader,124 this. versionHeader});131 this.pluginNameHeader, 132 this.pluginVersionHeader}); 125 133 this.dependenciesListView.Dock = System.Windows.Forms.DockStyle.Fill; 126 134 this.dependenciesListView.Location = new System.Drawing.Point(3, 16); 127 135 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; 129 138 this.dependenciesListView.TabIndex = 0; 130 139 this.dependenciesListView.UseCompatibleStateImageBehavior = false; 131 140 this.dependenciesListView.View = System.Windows.Forms.View.Details; 132 141 // 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"; 142 193 // 143 194 // PluginView … … 146 197 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 147 198 this.Controls.Add(this.dependenciesGroupBox); 199 this.Controls.Add(this.filesGroupBox); 148 200 this.Controls.Add(this.licenseButton); 149 201 this.Controls.Add(this.contactTextBox); … … 154 206 this.Controls.Add(this.nameLabel); 155 207 this.Name = "PluginView"; 156 this.Size = new System.Drawing.Size( 268, 423);208 this.Size = new System.Drawing.Size(344, 512); 157 209 this.dependenciesGroupBox.ResumeLayout(false); 210 this.filesGroupBox.ResumeLayout(false); 158 211 this.ResumeLayout(false); 159 212 this.PerformLayout(); … … 171 224 protected System.Windows.Forms.Button licenseButton; 172 225 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; 175 228 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; 176 234 177 235 } -
branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/PluginView.cs
r2816 r2860 8 8 using System.Windows.Forms; 9 9 using HeuristicLab.PluginInfrastructure; 10 using System.IO; 10 11 11 12 namespace HeuristicLab.DeploymentService.AdminClient { 12 13 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 13 20 public PluginView() { 14 21 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(); 15 77 } 16 78 } -
branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/PluginView.resx
r2816 r2860 118 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </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> 120 123 </root> -
branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.dbml
r2816 r2860 19 19 <Column Name="Name" Type="System.String" DbType="NVarChar(300) NOT NULL" CanBeNull="false" /> 20 20 <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" /> 22 23 <Column Name="License" Type="System.String" DbType="Text" CanBeNull="true" UpdateCheck="Never" /> 23 24 <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 3 3 <DataContextMoniker Name="/PluginStoreClassesDataContext" /> 4 4 <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"> 6 6 <DataClassMoniker Name="/PluginStoreClassesDataContext/Dependency" /> 7 7 <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" /> 9 9 </nestedChildShapes> 10 10 </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"> 12 12 <DataClassMoniker Name="/PluginStoreClassesDataContext/ProductPlugin" /> 13 13 <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" /> 15 15 </nestedChildShapes> 16 16 </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"> 18 18 <DataClassMoniker Name="/PluginStoreClassesDataContext/Plugin" /> 19 19 <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" /> 21 21 </nestedChildShapes> 22 22 </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"> 24 24 <DataClassMoniker Name="/PluginStoreClassesDataContext/PluginPackage" /> 25 25 <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" /> 27 27 </nestedChildShapes> 28 28 </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"> 30 30 <DataClassMoniker Name="/PluginStoreClassesDataContext/Product" /> 31 31 <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" /> 33 33 </nestedChildShapes> 34 34 </classShape> 35 <associationConnector edgePoints="[(2.75 : 4.5 2089680989583); (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"> 36 36 <AssociationMoniker Name="/PluginStoreClassesDataContext/Plugin/Plugin_PluginPackage" /> 37 37 <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" /> 40 40 </nodes> 41 41 </associationConnector> -
branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.designer.cs
r2816 r2860 303 303 private string _Version; 304 304 305 private string _ContactInformation; 305 private string _ContactName; 306 307 private string _ContactEmail; 306 308 307 309 private string _License; … … 319 321 partial void OnVersionChanging(string value); 320 322 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(); 323 327 partial void OnLicenseChanging(string value); 324 328 partial void OnLicenseChanged(); … … 391 395 } 392 396 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(); 409 433 } 410 434 } -
branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/PluginDescription.cs
r2816 r2860 21 21 } 22 22 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; } 27 33 } 28 34 … … 39 45 } 40 46 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) { 42 49 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(); 44 53 this.name = name; 45 54 this.version = version; 46 55 this.dependencies = new List<PluginDescription>(dependencies); 47 56 this.licenseText = license; 48 this.contactInformation = contactInformation; 57 this.contactName = contactName; 58 this.contactEmail = contactEmail; 49 59 } 50 60 … … 54 64 55 65 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) { 57 67 } 58 68 } -
branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/PluginStore.cs
r2816 r2860 144 144 // update plugin data 145 145 pluginEntity.License = pluginDescription.LicenseText; 146 pluginEntity.ContactInformation = pluginDescription.ContactInformation; 147 146 pluginEntity.ContactName = pluginDescription.ContactName; 147 pluginEntity.ContactEmail = pluginDescription.ContactEmail; 148 148 149 // delete cached entry 149 150 if (pluginDescriptions.ContainsKey(pluginEntity)) pluginDescriptions.Remove(pluginEntity); … … 196 197 from dep in GetDependencies(ctx, plugin) 197 198 select MakePluginDescription(ctx, dep), 198 plugin.ContactInformation ?? string.Empty, 199 plugin.ContactName ?? string.Empty, 200 plugin.ContactEmail ?? string.Empty, 199 201 plugin.License ?? string.Empty 200 202 ); … … 208 210 plugin.Name = pluginDescription.Name; 209 211 plugin.Version = pluginDescription.Version.ToString(); 210 plugin.ContactInformation = pluginDescription.ContactInformation; 212 plugin.ContactName = pluginDescription.ContactName; 213 plugin.ContactEmail = pluginDescription.ContactEmail; 211 214 plugin.License = pluginDescription.LicenseText; 212 215 return plugin; -
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/DeploymentService/DeploymentService.cs
r2814 r2860 22 22 private System.Runtime.Serialization.ExtensionDataObject extensionDataField; 23 23 24 private string ContactInformationField; 24 private string ContactEmailField; 25 26 private string ContactNameField; 25 27 26 28 private HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] DependenciesField; … … 45 47 46 48 [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; 56 71 } 57 72 } -
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/DeploymentService/PluginDescription.cs
r2814 r2860 31 31 namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService { 32 32 // extension of auto-generated DataContract class PluginDescription 33 public partial class PluginDescription {33 public partial class PluginDescription : IPluginDescription { 34 34 public PluginDescription(string name, Version version) : this(name, version, new List<PluginDescription>()) { } 35 35 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) { 37 37 } 38 38 39 public PluginDescription(string name, Version version, IEnumerable<PluginDescription> dependencies, string contact Information, string licenseText) {39 public PluginDescription(string name, Version version, IEnumerable<PluginDescription> dependencies, string contactName, string contactEmail, string licenseText) { 40 40 this.Name = name; 41 41 this.Version = version; 42 42 this.Dependencies = dependencies.ToArray(); 43 this.ContactInformation = contactInformation;44 43 this.LicenseText = licenseText; 45 44 } 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 46 65 } 47 66 } -
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/DeploymentService/ProductDescription.cs
r2811 r2860 31 31 namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService { 32 32 // extension of auto-generated DataContract class ProductDescription 33 public partial class ProductDescription {33 public partial class ProductDescription { 34 34 public ProductDescription(string name, Version version) 35 35 : this(name, version, new List<PluginDescription>()) { -
trunk/sources/HeuristicLab.PluginInfrastructure/app.config
r2814 r2860 27 27 <bindings> 28 28 <wsHttpBinding> 29 <binding name="WSHttpBinding_IUpdate 2" closeTimeout="00:01:00"29 <binding name="WSHttpBinding_IUpdate" closeTimeout="00:01:00" 30 30 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 31 31 bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" … … 44 44 </security> 45 45 </binding> 46 <binding name="WSHttpBinding_IAdmin 2" closeTimeout="00:01:00"46 <binding name="WSHttpBinding_IAdmin" closeTimeout="00:01:00" 47 47 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 48 48 bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" … … 65 65 <client> 66 66 <endpoint address="http://localhost:8731/Design_Time_Addresses/HeuristicLab.Services.Deployment/Update/" 67 binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IUpdate 2"67 binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IUpdate" 68 68 contract="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdate" 69 name="WSHttpBinding_IUpdate 2">69 name="WSHttpBinding_IUpdate"> 70 70 <identity> 71 71 <dns value="localhost" /> … … 73 73 </endpoint> 74 74 <endpoint address="http://localhost:8731/Design_Time_Addresses/HeuristicLab.Services.Deployment/Admin/" 75 binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IAdmin 2"75 binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IAdmin" 76 76 contract="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdmin" 77 name="WSHttpBinding_IAdmin 2">77 name="WSHttpBinding_IAdmin"> 78 78 <identity> 79 79 <dns value="localhost" />
Note: See TracChangeset
for help on using the changeset viewer.