Ejemplo n.º 1
0
            public static bool WaitForRemoteMachine(uint TimeOutCount)
            {
                bool RetVal = false;

                Remote.RequireOn();

                SpriteInfoManager TestObject = null;

                TestObject = (SpriteInfoManager)Activator.GetObject(typeof(SpriteInfoManager), Remote.RemoteMachineUri);

                //try grabbing any object from the remote machine until it does not timeout
                while (RetVal == false)
                {
                    if (TimeOutCount <= 0)
                    {
                        break;
                    }
                    try
                    {
                        TestObject.Contains(0);
                        RetVal = true;
                    }
                    catch (System.Net.WebException err)
                    {
                    }
                    catch (Exception err)
                    {
                        throw new Exception("While trying to sync the local ServerManager to the remote server, an unexpected type of exception was encountered: " + err.ToString());
                    }

                    TimeOutCount--;
                }

                return(RetVal);
            }
Ejemplo n.º 2
0
 public static bool Contains(uint UniqueId)
 {
     if (SpriteInfo == null)
     {
         SpriteInfo = new SpriteInfoManager();
     }
     return(SpriteInfo.Contains(UniqueId));
 }
Ejemplo n.º 3
0
 public static void Remove(uint UniqueId)
 {
     if (SpriteInfo == null)
     {
         SpriteInfo = new SpriteInfoManager();
     }
     SpriteInfo.Remove(UniqueId);
 }
Ejemplo n.º 4
0
 public static void Add(uint UniqueId, SpriteInformation SpriteToAdd)
 {
     if (SpriteInfo == null)
     {
         SpriteInfo = new SpriteInfoManager();
     }
     SpriteInfo.Add(UniqueId, SpriteToAdd);
 }
Ejemplo n.º 5
0
            public static bool Contains(uint UniqueId)
            {
                Remote.RequireOn();

                if (RemoteSpriteManager == null)
                {
                    RemoteSpriteManager = (SpriteInfoManager)Activator.GetObject(typeof(SpriteInfoManager), Remote.RemoteMachineUri);
                }
                return(RemoteSpriteManager.Contains(UniqueId));
            }
Ejemplo n.º 6
0
            public static SpriteInformation GetRemoteSprite(uint UniqueId)
            {
                Remote.RequireOn();
                SpriteInformation RetVal = null;

                if (RemoteSpriteManager == null)
                {
                    RemoteSpriteManager = (SpriteInfoManager)Activator.GetObject(typeof(SpriteInfoManager), Remote.RemoteMachineUri);
                }

//				try
//				{
                RetVal = RemoteSpriteManager.GetInfoFromId(UniqueId);
//				}
//				catch(Exception err)
//				{
//
//				}

                return(RetVal);
            }