public void load()
        {
            ClientServerUtil csu = ClientServerUtil.getInstance();

            if (csu.ConnectToFactory(id))
            {
                csu.RegisterFactoryMQListener(id, obs);
                factory = csu.GetFactory();
                if (factory != null)
                {
                    width  = csu.GetAreaWidth();
                    height = csu.GetAreaHeight();
                    if (width != -1 && height != -1)
                    {
                        success = true;
                    }
                }
                else
                {
                    success = false;
                }

                FactoryDownload(this, new FactoryLoaderEventArgs(success, width, height, factory));
            }
        }
Exemplo n.º 2
0
 /* ---------------------------------- INIT ------------------------------------ */
 public static ClientServerUtil getInstance()
 {
     if (instance == null)
     {
         instance = new ClientServerUtil();
     }
     return(instance);
 }
Exemplo n.º 3
0
        public void load()
        {
            ClientServerUtil csu = ClientServerUtil.getInstance();

            csu.RegisterFactoryMQListener(id, obs);
            simulation = csu.GetSimulation(id);
            if (simulation != null)
            {
                width  = csu.GetAreaWidth();
                height = csu.GetAreaHeight();
                if (width != -1 && height != -1)
                {
                    success = true;
                }
            }
            else
            {
                success = false;
            }

            SimulationDownload(this, new SimulationLoaderEventArgs(success, width, height, simulation));
        }
 /* ---------------------------------- INIT ------------------------------------ */
 public static ClientServerUtil getInstance()
 {
     if (instance == null)
         instance = new ClientServerUtil();
     return instance;
 }