Changeset 4320 for branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3/HiveSlaveConsole.cs
- Timestamp:
- 08/25/10 17:46:07 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3/HiveSlaveConsole.cs
r4253 r4320 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Diagnostics;25 24 using System.Drawing; 26 25 using System.Linq; 27 26 using System.Net; 28 using System.ServiceModel;29 27 using System.Windows.Forms; 30 using HeuristicLab.Hive.Slave.Console.SlaveService; 28 using System.Xml.Serialization; 29 using HeuristicLab.Calendar; 30 using HeuristicLab.Hive.Slave.Console.SlaveConsoleService; 31 31 using ZedGraph; 32 using HeuristicLab.Hive.Contracts;33 using System.Xml.Serialization;34 using System.IO;35 using HeuristicLab.Calendar;36 32 37 33 namespace HeuristicLab.Hive.Slave.Console { … … 53 49 54 50 #region Declarations 55 56 private const string ENDPOINTADRESS = "net.tcp://127.0.0.1:8000/SlaveConsole/SlaveConsoleCommunicator";57 58 51 private static bool isfired = false; 59 52 //the logfilereader … … 94 87 private void ConnectToSlave() { 95 88 try { 96 slaveCommunicator = new SlaveConsoleCommunicatorClient(WcfSettings.GetBinding(), new EndpointAddress(ENDPOINTADRESS)); 89 slaveCommunicator = new SlaveConsoleCommunicatorClient(); 90 97 91 slaveCommunicator.GetStatusInfosCompleted += new EventHandler<GetStatusInfosCompletedEventArgs>(slaveCommunicator_GetStatusInfosCompleted); 98 92 slaveCommunicator.GetCurrentConnectionCompleted += new EventHandler<GetCurrentConnectionCompletedEventArgs>(slaveCommunicator_GetCurrentConnectionCompleted); … … 469 463 ConnectionContainer curConnection = e.Result; 470 464 tbIPAdress.Text = curConnection.IPAdress; 471 tbPort.Text = curConnection.Port.ToString();472 465 } else { 473 466 ManageFatalException("Connection Error, check if Hive Slave is running!", "Connection Error", null); … … 504 497 UpdateGraph(sc); 505 498 506 if (sc.Status == NetworkEnumWcfConnState.Connected || sc.Status == NetworkEnumWcfConnState.Loggedin) {499 if (sc.Status == NetworkEnumWcfConnState.Connected) { 507 500 btConnect.Enabled = false; 508 501 btnDisconnect.Enabled = true; … … 546 539 private void btConnect_Click(object sender, EventArgs e) { 547 540 IPAddress ipAdress; 548 int port;549 541 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)) { 551 543 cc.IPAdress = tbIPAdress.Text; 552 cc.Port = port;553 544 slaveCommunicator.SetConnectionAsync(cc); 554 545 } else {
Note: See TracChangeset
for help on using the changeset viewer.