1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.ComponentModel;
|
---|
4 | using System.Data;
|
---|
5 | using System.Drawing;
|
---|
6 | using System.Linq;
|
---|
7 | using System.Text;
|
---|
8 | using System.Windows.Forms;
|
---|
9 | using HeuristicLab.Hive.Server.Properties;
|
---|
10 |
|
---|
11 | namespace 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 | }
|
---|