Ejemplo n.º 1
0
 public static void UnregisterClientInstance(SyphonClientTexture tex)
 {
     if (Syphon.instance != null)
     {
         Syphon.Instance.unregisterClientInstance(tex);
     }
 }
Ejemplo n.º 2
0
    //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);
        }
    }
Ejemplo n.º 3
0
 public static void RegisterClientInstance(SyphonClientTexture tex, SyphonClientObject obj)
 {
     if (Syphon.instance != null)
     {
         Syphon.Instance.registerClientInstance(tex, obj);
     }
 }
Ejemplo n.º 4
0
 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);
         }
     }
 }
Ejemplo n.º 5
0
 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);
         }
     }
 }
Ejemplo n.º 6
0
 //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);
     }
 }
Ejemplo n.º 7
0
 public static void UnregisterClientInstance(SyphonClientTexture tex)
 {
     if(Syphon.instance != null)
     Syphon.Instance.unregisterClientInstance(tex);
 }
Ejemplo n.º 8
0
 public static void RegisterClientInstance(SyphonClientTexture tex, SyphonClientObject obj)
 {
     if(Syphon.instance != null)
     Syphon.Instance.registerClientInstance(tex, obj);
 }