Ejemplo n.º 1
0
        public ListMenu(string DataPath, AppsModules Modul, ListType Type, string ModLabel)
        {
            InitializeComponent();

            //Set Label Format
            Lbl_List.Foreground = new SolidColorBrush(FontColor);
            Lbl_List.FontFamily = TitleFont;
            //Set Title
            Lbl_List.Content = ModLabel;

            //Search for the Files or Directories
            if (Type == ListType.Folder)
            {
                //Search all Directories
                DirectoryPaths = Directory.GetDirectories(DataPath).ToList();
            }
            else if (Type == ListType.None)
            {
                //Dummy
            }
            else
            {
                DirectoryPaths = new List<string>();
                //Search all Files in diferents formats
                for(int x=0; x < FileMgr.GetFileFormats(Type).Length; x++)
                    DirectoryPaths.AddRange(Directory.GetFiles(DataPath, FileMgr.GetFileFormats(Type)[x]).ToList());
            }

            //Copy the Option Information
            CurrentModul = Modul;
            SelModul = 0;

            myType = Type;
        }
Ejemplo n.º 2
0
        //Utils Functions
        public void AppLauncher(AppsModules ApptoLaunch, string AppPath, string Name)
        {
            ListType ListType;

            switch (ApptoLaunch)
            {
                case AppsModules.Bildergalerie:
                    ListType = DataManger.ListType.Folder;
                    break;
                case AppsModules.PDFFlip:
                    ListType = DataManger.ListType.Folder;
                    break;
                case AppsModules.PDFListe:
                    ListType = DataManger.ListType.PDF;
                    break;
                case AppsModules.Video:
                    ListType = DataManger.ListType.Video;
                    break;
                case AppsModules.Maps:
                    ListType = DataManger.ListType.Maps;
                    break;
                case AppsModules.Voting:
                    ListType = DataManger.ListType.Voting;
                    break;
                case AppsModules.Puzzle:
                    ListType = DataManger.ListType.Image;
                    break;
                case AppsModules.WebBrowser:
                    ListType = DataManger.ListType.Web;
                    break;
                case AppsModules.Memo:
                    ListType = DataManger.ListType.Folder;
                    break;
                case AppsModules.Collage:
                    ListType = DataManger.ListType.Folder;
                    break;
                default:
                    ListType = DataManger.ListType.None;
                    break;
            }

            ListMenu ListForm = new ListMenu(AppPath, ApptoLaunch, ListType, Name);
            if ((ListForm.DirCount != 1) && (ListType != DataManger.ListType.None))
                ListForm.Show();
            else
                ListForm.Launch();
        }