示例#1
0
        public PFileUpgradeForm()
        {
            InitializeComponent();

            tbPFileTemplate.Text = ProjectConfig.Get("PFileUpgradeForm.tbPFileTemplate");
            tbOrigDir.Text       = ProjectConfig.Get("PFileUpgradeForm.tbOrigDir");
            tbNewDir.Text        = ProjectConfig.Get("PFileUpgradeForm.tbNewDir");
        }
示例#2
0
        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));
            }
        }
示例#3
0
        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);
        }
示例#4
0
文件: Site.cs 项目: alex4401/rk
        /**
         * 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);
            }
        }