示例#1
0
 private void TryLoadComponent()
 {
     if (!View.IsMainComponentLoaded)
     {
         View.LoadComponent(MainModule);
     }
 }
示例#2
0
        /// <summary>
        /// Tries to loads the main component.
        /// </summary>
        /// <param name="ensureViewInitialized">Tries to initialize underlying view if wasn't yet.</param>
        private void TryLoadComponent(bool ensureViewInitialized)
        {
            if (View.IsMainComponentLoaded)
            {
                return;
            }

            if (ensureViewInitialized)
            {
                // we're performing an explicit load and view has not been initialized
                // try initializing it
                AsyncExecuteInUI(() => View.EnsureInitialized(), lowPriority: false);
            }

            View.LoadComponent(MainModule);
        }