private void FillCombos()
        {
            ComboFunctions.FillSecGroupsComboExcRoot(ddlGroups);
            ComboFunctions.FillSubCompanyCombo(ddlSubCompany);

            ThemeList themeList = ThemeResolutionService.GetAvailableThemes();

            if (themeList.Count() > 0)
            {
                ddlThemes.DisplayMember    = "ThemeName";
                ddlThemes.ValueMember      = "ThemeName";
                ddlThemes.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
                ddlThemes.DataSource       = themeList.Distinct().Where(t => !t.ThemeName.EndsWith("*") && t.ThemeName != "BreezeExtended").OrderBy(t => t.ThemeName).ToList();
            }

            ddlThemes.SelectedIndex = -1;
            ddlThemes.NullText      = "Select";
            ddlGroups.SelectedIndex = -1;


            if (ddlSubCompany.Items.Count > 0)
            {
                chkAllowTransferBooking.Visible = true;
            }
        }
Esempio n. 2
0
        private void Initalize()
        {
            ThemeOutput = Bash(@"
                        for f in ~/.themes/*
                        do
                            if [[ -d ""$f/gtk-3.0"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ") +
                          Bash(@"
                        for f in /usr/share/themes/*
                        do
                            if [[ -d ""$f/gtk-3.0"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done");
            IconOutput = Bash(@"for f in /usr/share/icons/*
                        do
                            if [[ -f ""$f/index.theme""     ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ")
                         + Bash(@"for f in ~/.local/share/icons/*
                        do
                            if [[ -f ""$f/index.theme""  ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ")
                         + Bash(@"for f in ~/.icons/*
                        do
                            if [[ -f ""$f/index.theme""  ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ");

            CursorOutput = Bash(@"for f in /usr/share/icons/*
                        do
                            if [[ -f ""$f/index.theme""  &&    -d ""$f/cursors"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ")
                           + Bash(@"for f in ~/.local/share/icons/*
                       do
                            if [[ -f ""$f/index.theme""  &&    -d ""$f/cursors"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ")
                           + Bash(@"for f in ~/.icons/*
                       do
                            if [[ -f ""$f/index.theme""  &&    -d ""$f/cursors"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ");



            ShellOutput = Bash(@"
                        for f in /usr/share/themes/*
                        do
                            if [[ -d ""$f/gnome-shell"" ]]
                                    then
                                        
                                        echo $(basename -- ""$f"")
                                        fi
                                    done") + Bash(@"
                        for f in ~/.themes/*
                        do
                            if [[ -d ""$f/gnome-shell"" ]]
                                    then
                                        echo $(basename -- ""$f"")
                                        fi
                                    done");

            Box box = new Box(Orientation.Vertical, 6);

            ThemeList = ThemeOutput.Split("\n").ToList();
            ThemeList.RemoveAll(s => string.IsNullOrWhiteSpace(s));
            // ThemeList.ForEach(s=>Console.Write(s+"\n"));
            ThemeList = ThemeList.Distinct().ToList();
            ThemeList.Sort();

            IconList = IconOutput.Split("\n").ToList();
            IconList.RemoveAll(s => string.IsNullOrWhiteSpace(s));
            // IconList.ForEach(s=>Console.Write(s+"\n"));
            IconList = IconList.Distinct().ToList();
            IconList.Sort();

            ShellList = ShellOutput.Split("\n").ToList();
            ShellList.RemoveAll(s => string.IsNullOrWhiteSpace(s));
            // iconList.ForEach(s=>Console.Write(s+"\n"));
            ShellList = ShellList.Distinct().ToList();
            ShellList.Sort();

            CursorList = CursorOutput.Split("\n").ToList();
            CursorList.RemoveAll(s => string.IsNullOrWhiteSpace(s));
            CursorList = CursorList.Distinct().ToList();
            CursorList.Sort();
            UserThemeExtensionExists = CheckUserThemeExtExists();
        }