Пример #1
0
 public override void Execute(SyncExecutionContext context, SyncClient client)
 {
     if (client == null)
     {
         return;
     }
     client.SendMessage(new SyncPongMessage());
 }
Пример #2
0
 public void KillConnection()
 {
     if (Server && _server != null)
     {
         _server.Stop();
         _server = null;
     }
     else if (!Server && _client != null)
     {
         _client.Stop();
         _client = null;
     }
 }
Пример #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();
 }
Пример #4
0
 public override void Execute(SyncExecutionContext context, SyncClient client)
 {
     context.Log("Attempting to sync play file: " + FileName);
     context.AttemptPlayFile(FileName);
 }
Пример #5
0
 public override void Execute(SyncExecutionContext context, SyncClient client)
 {
     context.SetPlayState(PlayState);
     context.SetPlayPosition(PlayPosition);
     context.Log("Synced player state");
 }
Пример #6
0
 public abstract void Execute(SyncExecutionContext context, SyncClient client);
Пример #7
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();
 }
Пример #8
0
 public void KillConnection()
 {
     if (Server && _server != null)
     {
         _server.Stop();
         _server = null;
     }
     else if (!Server && _client != null)
     {
         _client.Stop();
         _client = null;
     }
 }