상속: Fleux.UIElements.Panorama.PanoramaSection
예제 #1
0
파일: HomePage.cs 프로젝트: leewoody/hobd
        protected virtual void CreateThemeSection()
        {
            IEnumerable <object> fileList = null;

            try{
                fileList = Directory.GetFiles(Path.Combine(HOBD.AppPath, "themes"), "*.theme")
                           .OrderBy(s => s)
                           .Select(s => (object)Path.GetFileName(s));
            }catch (Exception e) {
                Logger.error("HomePage", "No themes found", e);
            }
            var section = new ListSection(t("Choose Theme"), null, layoutX, layoutY - SectionContentDelta)
            {
                Selected     = HOBD.config.Theme,
                Content      = fileList,
                UIContent    = (f) => Path.GetFileNameWithoutExtension((string)f),
                ChooseAction = (path) => {
                    panorama.CurrentSectionIndex -= 1;
                    HOBD.config.Theme             = "themes/" + path;
                    HOBD.config.Save();
                    HOBD.ReloadTheme();
                    ReloadUI();
                }
            };

            this.PushVolatileSection(section);
        }
예제 #2
0
파일: HomePage.cs 프로젝트: leewoody/hobd
        protected virtual void CreateLanguageSection()
        {
            IEnumerable <object> codesList = Directory.GetFiles(Path.Combine(HOBD.AppPath, "lang"), "??.lang")
                                             .Select((f) => (object)Path.GetFileNameWithoutExtension(f))
                                             .OrderBy(s => s);

            var section = new ListSection(t("Language"), null, layoutX, layoutY - SectionContentDelta)
            {
                Selected     = HOBD.config.Language,
                Content      = codesList,
                UIContent    = (l) => t((string)l),
                ChooseAction = (l) => {
                    panorama.CurrentSectionIndex -= 1;
                    HOBD.config.Language          = (string)l;
                    HOBD.config.Save();
                    HOBD.ReloadLang();
                    ReloadUI();
                }
            };

            this.PushVolatileSection(section);
        }
예제 #3
0
파일: HomePage.cs 프로젝트: cail/hobd
 protected virtual void CreateThemeSection()
 {
     IEnumerable<object> fileList = null;
     try{
         fileList = Directory.GetFiles(Path.Combine(HOBD.AppPath, "themes"), "*.theme")
                             .OrderBy(s => s)
                             .Select(s => (object)Path.GetFileName(s));
     }catch(Exception e){
         Logger.error("HomePage", "No themes found", e);
     }
     var section = new ListSection(t("Choose Theme"), null, layoutX, layoutY-SectionContentDelta)
     {
         Selected = HOBD.config.Theme,
         Content  = fileList,
         UIContent = (f) => Path.GetFileNameWithoutExtension((string)f),
         ChooseAction = (path) => {
             panorama.CurrentSectionIndex -= 1;
             HOBD.config.Theme = "themes/"+path;
             HOBD.config.Save();
             HOBD.ReloadTheme();
             ReloadUI();
         }
     };
     this.PushVolatileSection(section);
 }
예제 #4
0
파일: HomePage.cs 프로젝트: cail/hobd
        protected virtual void CreateLanguageSection()
        {
            IEnumerable<object> codesList = Directory.GetFiles(Path.Combine(HOBD.AppPath, "lang"), "??.lang")
                                                .Select( (f) => (object)Path.GetFileNameWithoutExtension(f) )
                                                .OrderBy(s => s);

            var section = new ListSection(t("Language"), null, layoutX, layoutY-SectionContentDelta)
            {
                Selected = HOBD.config.Language,
                Content  = codesList,
                UIContent = (l) => t((string)l),
                ChooseAction = (l) => {
                    panorama.CurrentSectionIndex -= 1;
                    HOBD.config.Language = (string)l;
                    HOBD.config.Save();
                    HOBD.ReloadLang();
                    ReloadUI();
                }
            };
            this.PushVolatileSection(section);
        }