Example #1
0
        public void Init(WebBrowser browser, PhoneApplicationPage appMainPage, Grid layoutRoot, RhoView rhoView)
        {
            initAppUrls();
            RhoLogger.InitRhoLog();
            LOG.INFO("Init");

            CRhoFile.recursiveCreateDir(CFilePath.join(getBlobsDirPath(), " "));

            m_webBrowser = browser;
            if (m_appMainPage == null)
            {
                m_appMainPage = appMainPage;
            }
            if (m_layoutRoot == null)
            {
                m_layoutRoot = layoutRoot;
            }
            //m_appMainPage.ApplicationBar = null;

            if (m_httpServer == null)
            {
                m_httpServer = new CHttpServer(CFilePath.join(getRhoRootPath(), "apps"));
            }

            m_rhoView = rhoView;
            if (m_rhoView.MasterView)
            {
                m_masterView = rhoView;
            }
        }
Example #2
0
        public void closeApp()
        {
            m_httpServer.stop(10);

            RhoLogger.close();
            m_UIWaitEvent.Close();
        }
Example #3
0
	    public void setLogCategory(String category)
	    {
            if (category != null)
                LOG.setLogCategory(category);
            else
                LOG = new RhoEmptyLogger();
	    }
Example #4
0
        public void Init(WebBrowser browser)
        {
            initAppUrls();
            RhoLogger.InitRhoLog();
            LOG.INFO("Init");

            CRhoFile.recursiveCreateDir(CFilePath.join(getBlobsDirPath(), " "));

            m_webBrowser = browser;
            m_httpServer = new CHttpServer(CFilePath.join(getRhoRootPath(), "apps"));
            CRhoResourceMap.deployContent();
            RhoRuby.Init(m_webBrowser);

            DBAdapter.initAttrManager();

            LOG.INFO("Starting sync engine...");
            SyncThread sync = null;

            try{
                sync = SyncThread.Create();
            }catch (Exception exc) {
                LOG.ERROR("Create sync failed.", exc);
            }
            if (sync != null)
            {
                //sync.setStatusListener(this);
            }

            RhoRuby.InitApp();
            RhoRuby.call_config_conflicts();
            RHOCONF().conflictsResolved();
        }
Example #5
0
 public void setLogCategory(String category)
 {
     if (category != null)
     {
         LOG.setLogCategory(category);
     }
     else
     {
         LOG = new RhoEmptyLogger();
     }
 }
Example #6
0
        public void stopApp()
        {
            string[] ar1 = CRhoFile.enumDirectory("db");

            RhoRuby.Stop();
            SyncThread.getInstance().Destroy();
            RhoLogger.close();
            m_UIWaitEvent.Close();

            string[] ar2 = CRhoFile.enumDirectory("db");
            int      i   = 0;
            //net::CAsyncHttp::Destroy();
        }
Example #7
0
        public CAsyncHttp(bool bInternal = false)
        {
            m_bInternal = bInternal;
            if (!m_bInternal)
            {
                base.setLogCategory(LOG.getLogCategory());
            }
            else
            {
                LOG = new RhoEmptyLogger();
                base.setLogCategory(null);
            }

            setPollInterval(QUEUE_POLL_INTERVAL_INFINITE);
        }
Example #8
0
 public void setLog(RhoLogger log) { LOG = log;  }
Example #9
0
 public void setLog(RhoLogger log) { LOG = log; m_pNetRequest.setLog(LOG);  }