Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/MainForm.cs @ 4267

Last change on this file since 4267 was 4267, checked in by cneumuel, 14 years ago

renamed all database entities from "Client" to "Slave" (#1157)
made slave-heartbeats synchronous, also they send HBs when timetable disallows them to calculate. they will appear on the server as Idle bis IsAllowedToCalculate will be false (#1159)

File size: 1.7 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;
9
10namespace HeuristicLab.Hive.Server {
11  public partial class MainForm : Form {
12    public MainForm(Dictionary<string, Uri> addresses) {
13      InitializeComponent();
14
15      Uri uri;
16      StringBuilder servicesTxt = new StringBuilder();
17      addresses.TryGetValue(HeuristicLabHiveServerApplication.STR_SlaveCommunicator, out uri);
18      if (uri != null)
19        servicesTxt.AppendLine(String.Format("Server Slave: {0}", uri));
20      addresses.TryGetValue(HeuristicLabHiveServerApplication.STR_ServerConsoleFacade, out uri);
21      if (uri != null)
22        servicesTxt.AppendLine(String.Format("Server Console: {0}", uri));
23      addresses.TryGetValue(HeuristicLabHiveServerApplication.STR_ExecutionEngineFacade, out uri);
24      if (uri != null)
25        servicesTxt.AppendLine(String.Format("Execution Engine: {0}", uri));
26
27      rtfServices.AppendText(servicesTxt.ToString());
28
29      ni.Icon = HeuristicLab.Common.Resources.HeuristicLab.Icon;
30      ni.BalloonTipTitle = "HL Hive Server Services";
31      ni.BalloonTipText = servicesTxt.ToString();
32      ni.BalloonTipIcon = ToolTipIcon.Info;
33      ni.Text = "HL Hive Server Services";
34      ni.ShowBalloonTip(10000);
35    }
36
37    private void CloseApp(object sender, EventArgs e) {
38      this.Dispose();
39      Application.Exit();
40    }
41
42    private void ShowInfo(object sender, EventArgs e) {
43      this.Visible = true;
44    }
45
46    private void MainForm_FormClosing(object sender, FormClosingEventArgs e) {
47      e.Cancel = true;
48      this.Visible = false;
49    }
50  }
51}
Note: See TracBrowser for help on using the repository browser.