Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/15/08 19:13:28 (16 years ago)
Author:
kgrading
Message:

refactored for #437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Communication/WcfService.cs

    r949 r993  
    88using HeuristicLab.Hive.Contracts.BusinessObjects;
    99using HeuristicLab.Hive.Client.Common;
     10using HeuristicLab.Hive.Client.Communication.ServerService;
    1011
    1112namespace HeuristicLab.Hive.Client.Communication {
     
    2930    public event EventHandler ServerChanged;   
    3031
    31     private ClientCommunicatorClient proxy = null;
     32    public ClientCommunicatorClient proxy = null;
    3233
    3334    private WcfService() {
     
    5152          ConnectionRestored(this, new EventArgs());
    5253        ConnState = NetworkEnum.WcfConnState.Connected;
    53         ConnectedSince = DateTime.Now;
     54        ConnectedSince = DateTime.Now;       
    5455      }
    5556      catch (Exception ex) {
     
    5960
    6061    public void Connect(String serverIP, int serverPort) {
    61       if(this.ServerIP != serverIP || this.ServerPort != ServerPort)
    62         ServerChanged(this, new EventArgs());
     62      String oldIp = this.ServerIP;
     63      int oldPort = this.ServerPort;
    6364      this.ServerIP = serverIP;
    6465      this.ServerPort = serverPort;     
    6566      Connect();
     67      if (oldIp != serverIP || oldPort != ServerPort)
     68        ServerChanged(this, new EventArgs());
    6669    }
    6770
     
    107110    public void SendJobResultAsync(JobResult result, bool finished) {
    108111      if (ConnState == NetworkEnum.WcfConnState.Connected)
    109         proxy.SendJobResult(result, finished);
     112        proxy.SendJobResultAsync(result, finished);
    110113    }
    111114    private void proxy_SendJobResultCompleted(object sender, SendJobResultCompletedEventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.