| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取出图目录 |
| | | /// 获取下载目录 |
| | | /// </summary> |
| | | public static string ExportFolder |
| | | public static string DownloadFolder |
| | | { |
| | | get |
| | | { |
| | | return ConfigurationManager.AppSettings["exportFolder"]; |
| | | return ConfigurationManager.AppSettings["downloadFolder"]; |
| | | } |
| | | } |
| | | |
| | |
| | | /// </summary> |
| | | public static string GetExportSubFolder() |
| | | { |
| | | string root = ExportFolder; |
| | | string root = DownloadFolder; |
| | | if (!Directory.Exists(root)) |
| | | { |
| | | Directory.CreateDirectory(root); |
| | |
| | | File.Delete(qptFile); |
| | | } |
| | | |
| | | string imgPath = Path.Combine(ExportFolder, args.imgPath); |
| | | string imgPath = Path.Combine(DownloadFolder, args.imgPath); |
| | | bool flag = File.Exists(imgPath); |
| | | |
| | | return flag ? args.imgPath : null; |
| | |
| | | /// <param name="args">出图参数</param> |
| | | public static void CreateTemplate(ExportArgs args) |
| | | { |
| | | string imgPath = Path.Combine(ExportFolder, args.imgPath); |
| | | string imgPath = Path.Combine(DownloadFolder, args.imgPath); |
| | | string templateFile = Path.Combine(SourcesPath, "Template.qpt"); |
| | | string qptFile = Path.Combine(SourcesPath, args.qpt); |
| | | if (File.Exists(qptFile)) |