public void Initialize(ISharpControl control) { control_ = control; //Instanciate all needed objects _controlpanel = new Controlpanel(); Rigctrld rigctrl = new Rigctrld(); TcpServer tcpServer = new TcpServer(rigctrl); tcpServer_ = tcpServer; //Link the objects together _controlpanel.ServerStart += tcpServer.Start; _controlpanel.ServerStop += tcpServer.Stop; tcpServer.Connected += _controlpanel.TcpServer_Connected_Changed; tcpServer.Enabled += _controlpanel.TcpServer_Enabled_Changed; rigctrl.FrequencyInHzChanged += _controlpanel.ReceivedFrequencyInHzChanged; rigctrl.FrequencyInHzChanged += Rigctrl_FrequencyInHzChanged; }
public TcpServer(Rigctrld rigctrl) { this.rigctrl = rigctrl; }