Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/ConnectionSetupView.cs @ 3006

Last change on this file since 3006 was 3006, checked in by gkronber, 14 years ago

Implemented deployment service on servdev.heuristiclab.com and changed all service references and configurations to point to the service address. Improved GUI of installation manager. Implemented user name authentication and authorization for the deployment service. #860 (Deployment server for plugin installation from web locations)

File size: 2.4 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Drawing;
5using System.Data;
6using System.Linq;
7using System.Text;
8using System.Windows.Forms;
9
10namespace HeuristicLab.PluginInfrastructure.Advanced {
11  internal partial class ConnectionSetupView : InstallationManagerControl {
12    private Form form;
13    public ConnectionSetupView() {
14      InitializeComponent();
15
16      urlTextBox.Text = HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocation;
17      userTextBox.Text = HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationUserName;
18      passwordTextBox.Text = HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationPassword;
19      savePasswordCheckbox.Checked = !string.IsNullOrEmpty(passwordTextBox.Text);
20    }
21
22    private void applyButton_Click(object sender, EventArgs e) {
23      HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocation = urlTextBox.Text;
24      if (!savePasswordCheckbox.Checked) {
25        // make sure we don't save username or password
26        HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationUserName = string.Empty;
27        HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationPassword = string.Empty;
28        // save
29        HeuristicLab.PluginInfrastructure.Properties.Settings.Default.Save();
30        // set user name and password for current process
31        HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationUserName = userTextBox.Text;
32        HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationPassword = passwordTextBox.Text;
33      } else {
34        HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationUserName = userTextBox.Text;
35        HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationPassword = passwordTextBox.Text;
36        HeuristicLab.PluginInfrastructure.Properties.Settings.Default.Save();
37      }
38      form.Close();
39    }
40
41    private void cancelButton_Click(object sender, EventArgs e) {
42      form.Close();
43    }
44
45    internal override void ShowInForm() {
46      if (this.form == null) {
47        form = new Form();
48        form.Name = this.Name;
49        this.Dock = DockStyle.Fill;
50        form.Controls.Add(this);
51      }
52      form.Show();
53    }
54  }
55}
Note: See TracBrowser for help on using the repository browser.