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));
            }
        }
Exemple #2
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));
        }