public static void UnregisterClientInstance(SyphonClientTexture tex) { if (Syphon.instance != null) { Syphon.Instance.unregisterClientInstance(tex); } }
//prototype delegate for updating client textures - unneeded now that we're using direct callbacks. // public delegate void UpdateClientTexturesHandler(); // public static event UpdateClientTexturesHandler UpdateClientTextures; private void registerClientInstance(SyphonClientTexture tex, SyphonClientObject obj) { if (!clientInstances.ContainsKey(tex)) { clientInstances.Add(tex, obj); } }
public static void RegisterClientInstance(SyphonClientTexture tex, SyphonClientObject obj) { if (Syphon.instance != null) { Syphon.Instance.registerClientInstance(tex, obj); } }
private void unregisterClientInstance(SyphonClientTexture tex) { if (clientInstances.ContainsKey(tex)) { SyphonClientObject obj = clientInstances[tex]; clientInstances.Remove(tex); //iterate through all the syphonClients. //if there are no more objects that match the object listed, destroy the bitch. bool found = false; foreach (KeyValuePair <SyphonClientTexture, SyphonClientObject> kvp in clientInstances) { //if you find an object registered that matches the syphon client list, dont destroy it yet. if (kvp.Value == obj && kvp.Key != tex) { found = true; } } if (!found) { DestroyClient(obj); } } }
private void unregisterClientInstance(SyphonClientTexture tex) { if(clientInstances.ContainsKey(tex)){ SyphonClientObject obj = clientInstances[tex]; clientInstances.Remove(tex); //iterate through all the syphonClients. //if there are no more objects that match the object listed, destroy the bitch. bool found = false; foreach(KeyValuePair<SyphonClientTexture,SyphonClientObject> kvp in clientInstances) { //if you find an object registered that matches the syphon client list, dont destroy it yet. if(kvp.Value == obj && kvp.Key != tex) found = true; } if(!found) { DestroyClient(obj); } } }
//prototype delegate for updating client textures - unneeded now that we're using direct callbacks. // public delegate void UpdateClientTexturesHandler(); // public static event UpdateClientTexturesHandler UpdateClientTextures; private void registerClientInstance(SyphonClientTexture tex, SyphonClientObject obj) { if(!clientInstances.ContainsKey(tex)){ clientInstances.Add(tex, obj); } }
public static void UnregisterClientInstance(SyphonClientTexture tex) { if(Syphon.instance != null) Syphon.Instance.unregisterClientInstance(tex); }
public static void RegisterClientInstance(SyphonClientTexture tex, SyphonClientObject obj) { if(Syphon.instance != null) Syphon.Instance.registerClientInstance(tex, obj); }