[713] | 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;
|
---|
[2065] | 9 | using HeuristicLab.Hive.Server.Properties;
|
---|
[713] | 10 |
|
---|
| 11 | namespace HeuristicLab.Hive.Server
|
---|
| 12 | {
|
---|
[741] | 13 | public partial class MainForm : Form {
|
---|
[1376] | 14 | public MainForm(Dictionary<string, Uri> addresses) {
|
---|
[741] | 15 | InitializeComponent();
|
---|
[2065] | 16 | this.Visible = false;
|
---|
| 17 |
|
---|
[1376] | 18 | Uri uri;
|
---|
[2065] | 19 | StringBuilder servicesTxt = new StringBuilder();
|
---|
[1376] | 20 | addresses.TryGetValue(HiveServerApplication.STR_ClientCommunicator, out uri);
|
---|
[2065] | 21 | if (uri != null)
|
---|
| 22 | servicesTxt.AppendLine(String.Format("Server Client: {0}", uri));
|
---|
[1376] | 23 | addresses.TryGetValue(HiveServerApplication.STR_ServerConsoleFacade, out uri);
|
---|
| 24 | if (uri != null)
|
---|
[2065] | 25 | servicesTxt.AppendLine(String.Format("Server Console: {0}", uri));
|
---|
[1376] | 26 | addresses.TryGetValue(HiveServerApplication.STR_ExecutionEngineFacade, out uri);
|
---|
| 27 | if (uri != null)
|
---|
[2065] | 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);
|
---|
[713] | 38 | }
|
---|
[1120] | 39 |
|
---|
[2065] | 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 |
|
---|
[713] | 52 | }
|
---|
| 53 | }
|
---|