public SettingsModel()
        {
            Singleton = this;

            Client                 = new Scripts.JsonClient(converterTCP, dataReceuveClient);
            Client.OnConnected    += delegate() { IsClient = true; InvokeConnection(); };
            Client.OnDisconnected += (byUser) => { IsClient = false; InvokeDisconnection(byUser); };

            Server            = new Scripts.JsonServer(converterTCP, dataReceuveServer);
            Server.OnStarted += delegate() { IsServer = true; InvokeConnection(); };
            Server.OnStopped += delegate() { IsServer = false; InvokeConnection(); };
        }
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     client = new Scripts.JsonClient(new Scripts.JsonObjectConverter(), new Scripts.DataReceivedServer());
     client.Debug_Output += o => Application.Current.Dispatcher.Invoke(delegate() { cOutput.Text += o + "\n"; });
     client.Connect("127.0.0.1", 7788);
 }