Free cookie consent management tool by TermsFeed Policy Generator

source: branches/Persistence Test/HeuristicLab.Hive.Server/3.2/MainForm.cs @ 2906

Last change on this file since 2906 was 2065, checked in by mbecirov, 15 years ago

#586: Added authorization components.

File size: 1.8 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Data;
5using System.Drawing;
6using System.Linq;
7using System.Text;
8using System.Windows.Forms;
9using HeuristicLab.Hive.Server.Properties;
10
11namespace HeuristicLab.Hive.Server
12{
13    public partial class MainForm : Form {
14        public MainForm(Dictionary<string, Uri> addresses) {
15          InitializeComponent();
16          this.Visible = false;
17
18          Uri uri;
19          StringBuilder servicesTxt = new StringBuilder();
20          addresses.TryGetValue(HiveServerApplication.STR_ClientCommunicator, out uri);
21          if (uri != null)
22            servicesTxt.AppendLine(String.Format("Server Client: {0}", uri));
23          addresses.TryGetValue(HiveServerApplication.STR_ServerConsoleFacade, out uri);
24          if (uri != null)
25            servicesTxt.AppendLine(String.Format("Server Console: {0}", uri));
26          addresses.TryGetValue(HiveServerApplication.STR_ExecutionEngineFacade, out uri);
27          if (uri != null)
28            servicesTxt.AppendLine(String.Format("Execution Engine: {0}", uri));
29
30          rtfServices.AppendText(servicesTxt.ToString());
31
32          ni.Icon = Resources.HeuristicLab;
33          ni.BalloonTipTitle = "HL Hive Server Services";
34          ni.BalloonTipText = servicesTxt.ToString();
35          ni.BalloonTipIcon = ToolTipIcon.Info;
36          ni.Text = "HL Hive Server Services";
37          ni.ShowBalloonTip(10000);
38        }
39
40        private void CloseApp(object sender, EventArgs e) {
41          Dispose();
42        }
43
44        private void ShowInfo(object sender, EventArgs e) {
45          this.Visible = true;
46        }
47
48        private void btnClose_Click(object sender, EventArgs e) {
49          this.Visible = false;
50        }
51
52    }
53}
Note: See TracBrowser for help on using the repository browser.