Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/25/10 17:46:07 (14 years ago)
Author:
cneumuel
Message:

made slave-console service configurable via xml

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3/HiveSlaveConsole.cs

    r4253 r4320  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Diagnostics;
    2524using System.Drawing;
    2625using System.Linq;
    2726using System.Net;
    28 using System.ServiceModel;
    2927using System.Windows.Forms;
    30 using HeuristicLab.Hive.Slave.Console.SlaveService;
     28using System.Xml.Serialization;
     29using HeuristicLab.Calendar;
     30using HeuristicLab.Hive.Slave.Console.SlaveConsoleService;
    3131using ZedGraph;
    32 using HeuristicLab.Hive.Contracts;
    33 using System.Xml.Serialization;
    34 using System.IO;
    35 using HeuristicLab.Calendar;
    3632
    3733namespace HeuristicLab.Hive.Slave.Console {
     
    5349
    5450    #region Declarations
    55 
    56     private const string ENDPOINTADRESS = "net.tcp://127.0.0.1:8000/SlaveConsole/SlaveConsoleCommunicator";
    57 
    5851    private static bool isfired = false;
    5952    //the logfilereader
     
    9487    private void ConnectToSlave() {
    9588      try {
    96         slaveCommunicator = new SlaveConsoleCommunicatorClient(WcfSettings.GetBinding(), new EndpointAddress(ENDPOINTADRESS));
     89        slaveCommunicator = new SlaveConsoleCommunicatorClient();
     90
    9791        slaveCommunicator.GetStatusInfosCompleted += new EventHandler<GetStatusInfosCompletedEventArgs>(slaveCommunicator_GetStatusInfosCompleted);
    9892        slaveCommunicator.GetCurrentConnectionCompleted += new EventHandler<GetCurrentConnectionCompletedEventArgs>(slaveCommunicator_GetCurrentConnectionCompleted);
     
    469463        ConnectionContainer curConnection = e.Result;
    470464        tbIPAdress.Text = curConnection.IPAdress;
    471         tbPort.Text = curConnection.Port.ToString();
    472465      } else {
    473466        ManageFatalException("Connection Error, check if Hive Slave is running!", "Connection Error", null);
     
    504497        UpdateGraph(sc);
    505498
    506         if (sc.Status == NetworkEnumWcfConnState.Connected || sc.Status == NetworkEnumWcfConnState.Loggedin) {
     499        if (sc.Status == NetworkEnumWcfConnState.Connected) {
    507500          btConnect.Enabled = false;
    508501          btnDisconnect.Enabled = true;
     
    546539    private void btConnect_Click(object sender, EventArgs e) {
    547540      IPAddress ipAdress;
    548       int port;
    549541      ConnectionContainer cc = new ConnectionContainer();
    550       if (IPAddress.TryParse(tbIPAdress.Text, out ipAdress) && int.TryParse(tbPort.Text, out port)) {
     542      if (IPAddress.TryParse(tbIPAdress.Text, out ipAdress)) {
    551543        cc.IPAdress = tbIPAdress.Text;
    552         cc.Port = port;
    553544        slaveCommunicator.SetConnectionAsync(cc);
    554545      } else {
Note: See TracChangeset for help on using the changeset viewer.