Пример #1
0
        public void LoadFolder(string folderName, string portableAppFolder)
        {
            this.RootFolder        = folderName;
            this.PortableAppFolder = portableAppFolder;

            _appInfoFolder     = string.Format("{0}\\AppInfo", folderName);
            _defaultDataFolder = string.Format("{0}\\DefaultData", folderName);
            _defaultSettings   = string.Format("{0}\\settings", _defaultDataFolder);

            _launcherFolder      = string.Format("{0}\\Launcher", _appInfoFolder);
            _fileTypeIconsFolder = string.Format("{0}\\FileTypeIcons", _appInfoFile);

            if (!Directory.Exists(_defaultDataFolder))
            {
                Directory.CreateDirectory(_defaultDataFolder);
            }

            if (!Directory.Exists(_defaultSettings))
            {
                Directory.CreateDirectory(_defaultSettings);
            }

            if (!Directory.Exists(_appInfoFolder))
            {
                Directory.CreateDirectory(_appInfoFolder);
            }
            AppInfo.Load(_appInfoFolder, this.PortableAppFolder);

            if (!Directory.Exists(_launcherFolder))
            {
                Directory.CreateDirectory(_launcherFolder);
            }
            Launch.Load(_launcherFolder, this.PortableAppFolder);

            if (!Directory.Exists(_fileTypeIconsFolder))
            {
                Directory.CreateDirectory(_fileTypeIconsFolder);
            }
        }