private void Initialize(MoviestormPaths pMoviestormPaths, List <string> pSources, string pDescription) { string errorText; MoviestormPaths = pMoviestormPaths ?? AddonPersistenceUtils.GetMoviestormPaths(out errorText); AddonSources = pSources; Description = pDescription; CatalogueVersion = CurrentCatalogueVersion; LastUpdate = DateTime.Now; }
// --------------------------------------------------------------------------------------------------- private void pbPathsDefaults_Click(object sender, EventArgs e) { string errorText; MoviestormPaths defaultMoviestormPaths = AddonPersistenceUtils.GetMoviestormPaths(out errorText); if (defaultMoviestormPaths == null) { MessageBox.Show(errorText, "Error determining Moviestorm folders", MessageBoxButtons.OK); return; } tbMoviestormInstallPath.Text = defaultMoviestormPaths.InstallationPath; tbMoviestormUserDataPath.Text = defaultMoviestormPaths.UserDataPath; }
private static bool InitializationChores(string[] pArgs, out string pErrorText) { pErrorText = null; if (!CheckArguments(pArgs)) { return(false); } _tempPath = Utils.GetTempDirectory(); string errorText; Utils.ResetTempFolder(out errorText); _moviestormPaths = AddonPersistenceUtils.GetMoviestormPaths(out errorText); if (_moviestormPaths == null) { pErrorText = errorText; return(false); } return(true); }
public AddonSearchCriteria(string pName, string pPublisher, bool?pInstalled, bool?pContentPack, string pLocation) { Name = pName; _nameRegex = CreateMultiValuedRegex(Name); Publisher = pPublisher; _publisherRegex = CreateMultiValuedRegex(Publisher); Installed = pInstalled; ContentPack = pContentPack; Location = pLocation?.Trim().ToLower(); if (!string.IsNullOrEmpty(Location)) { _locationRegex = new Regex($"{Location}", RegexOptions.IgnoreCase); } if (ContentPacksPath == null) { string errorText; ContentPacksPath = AddonPersistenceUtils.GetMoviestormPaths(out errorText)?.ContentPacksPath; } }