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