public MainWindow() { InitializeComponent(); PotrosacServer potrosacServer = new PotrosacServer(); PanelServer panelServer = new PanelServer(); ElektrodistribucijaServer elektrodistribucijaServer = new ElektrodistribucijaServer(); BaterijaServer baterijaServer = new BaterijaServer(); EVPunjacServer eVPunjacServer = new EVPunjacServer(); potrosacServer.Open(); panelServer.Open(); elektrodistribucijaServer.Open(); baterijaServer.Open(); eVPunjacServer.Open(); DataContext = this; backgroundWorker.DoWork += backgroundWorker_DoWork; backgroundWorker.RunWorkerAsync(); BindPropertyToUIElement(Sat, Sati, TextBlock.TextProperty, "Sati"); BindPropertyToUIElement(Sat, Minuta, TextBlock.TextProperty, "Minuta"); Sat.PokreniSat(); }
public void OtvoriServerTest() { var panelServer = new PanelServer(); panelServer.Open(); Assert.AreEqual(CommunicationState.Opened, panelServer.serviceHost.State); panelServer.Close(); }