public PFileUpgradeForm() { InitializeComponent(); tbPFileTemplate.Text = ProjectConfig.Get("PFileUpgradeForm.tbPFileTemplate"); tbOrigDir.Text = ProjectConfig.Get("PFileUpgradeForm.tbOrigDir"); tbNewDir.Text = ProjectConfig.Get("PFileUpgradeForm.tbNewDir"); }
public static string AskFile(string cfgName = "") { FileDialog d = new OpenFileDialog(); if (d.ShowDialog() == DialogResult.OK) { ProjectConfig.Set(cfgName, d.FileName); return(d.FileName); } else { return(ProjectConfig.Get(cfgName)); } }
public static string AskPath(string cfgName = "") { FolderBrowserDialog d = new FolderBrowserDialog(); string defaultPath = ProjectConfig.Get(cfgName); if (!string.IsNullOrEmpty(defaultPath)) { d.SelectedPath = defaultPath; } d.ShowDialog(); string path = d.SelectedPath; ProjectConfig.Set(cfgName, path); return(path); }
/** * Prepares for content building. This method is executed * before Build(). */ public virtual void PreBuild() { ResourcesConfiguration resourceConfig = ProjectConfig.Get <ResourcesConfiguration>(); var nvResources = resourceConfig.CopyNonVersioned; if (nvResources.Count > 0) { Log.LogInformation("Copying non-versioned resources"); foreach (var file in nvResources) { CopyResource(file, file); } } // Notify modules that the configuration is now available. foreach (RkModule module in _modules) { module.AcceptConfiguration(ProjectConfig); } }