Пример #1
0
        public MediaLibraryViewModel ListBy(ApiCall call)
        {
            string by = call.GetValue("by");

            if (string.IsNullOrEmpty(by))
            {
                return(null);
            }

            var lower = by.ToLower();

            if (lower == "page" || lower == "view" || lower == "layout" || lower == "textcontent" || lower == "style" || lower == "htmlblock")
            {
                MediaLibraryViewModel model = new MediaLibraryViewModel();

                model.Files = GetFilesBy(call.WebSite.SiteDb(), by);

                model.CrumbPath = PathService.GetCrumbPath("/");

                return(model);
            }
            else
            {
                return(null);
            }
        }
Пример #2
0
        public MediaLibraryViewModel List(ApiCall call)
        {
            string path = call.GetValue("path", "fullpath");

            if (string.IsNullOrEmpty(path) || path == "\\")
            {
                path = "/";
            }

            MediaLibraryViewModel model = new MediaLibraryViewModel();

            model.Folders = GetFolders(call.WebSite.SiteDb(), path);

            model.Files = GetFiles(call.WebSite.SiteDb(), path);

            model.CrumbPath = PathService.GetCrumbPath(path);

            return(model);
        }
Пример #3
0
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override async void OnLaunched(LaunchActivatedEventArgs e)
        {
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                this.DebugSettings.EnableFrameRateCounter = false;
            }
#endif
            CreateRootFrame();

            if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
            {
                //TODO: Load state from previously suspended application
            }

            await InitializeApp();

            if (e.PrelaunchActivated == false)
            {
                NavigateToAppPage();
            }
            else
            {
                return;
            }

            if (!ViewModelLocator.Instance.PlayerViewModel.IsAudioEffectsSupport)
            {
                const string message = "Your device doesn't support EQ.";
                Toast.ShowMessage(string.Format(message));
            }

            UnhandledException += App_UnhandledException;

            MediaLibraryViewModel.CheckTokensUsage();

            await UmengAnalytics.StartTrackAsync("58548eb6aed17965d00005ec");
        }