Beispiel #1
0
 public override void Execute(SyncExecutionContext context, SyncClient client)
 {
     if (client == null)
     {
         return;
     }
     client.SendMessage(new SyncPongMessage());
 }
Beispiel #2
0
 public void KillConnection()
 {
     if (Server && _server != null)
     {
         _server.Stop();
         _server = null;
     }
     else if (!Server && _client != null)
     {
         _client.Stop();
         _client = null;
     }
 }
Beispiel #3
0
 private void buttonStart_Click(object sender, EventArgs e)
 {
     KillConnection();
     if (Server)
     {
         _server = new SyncServer(_context);
         _server.Start();
     }
     else
     {
         _client = new SyncClient(_context, textBox1.Text);
         _client.Start();
         Properties.Settings.Default.ServerIP = textBox1.Text;
         Properties.Settings.Default.Save();
     }
     UpdateVisibility();
 }
Beispiel #4
0
 public override void Execute(SyncExecutionContext context, SyncClient client)
 {
     context.Log("Attempting to sync play file: " + FileName);
     context.AttemptPlayFile(FileName);
 }
Beispiel #5
0
 public override void Execute(SyncExecutionContext context, SyncClient client)
 {
     context.SetPlayState(PlayState);
     context.SetPlayPosition(PlayPosition);
     context.Log("Synced player state");
 }
Beispiel #6
0
 public abstract void Execute(SyncExecutionContext context, SyncClient client);
 private void buttonStart_Click(object sender, EventArgs e)
 {
     KillConnection();
     if(Server)
     {
         _server = new SyncServer(_context);
         _server.Start();
     }
     else
     {
         _client = new SyncClient(_context, textBox1.Text);
         _client.Start();
         Properties.Settings.Default.ServerIP = textBox1.Text;
         Properties.Settings.Default.Save();
     }
     UpdateVisibility();
 }
 public void KillConnection()
 {
     if (Server && _server != null)
     {
         _server.Stop();
         _server = null;
     }
     else if (!Server && _client != null)
     {
         _client.Stop();
         _client = null;
     }
 }