Commit 06067e03 贾鹏旭

将导出csv文件的内容全加上“”

1 个父辈 a372778e
......@@ -253,7 +253,7 @@ namespace SmartScan
int exportFileFormat = ConfigHelper.Config.Get("ExportFileFormat", 1);
private void BtnExport_Click(object sender, EventArgs e)
{
{
if (LstRecord.SelectedIndex == -1) return;
switch (exportFileFormat)
{
......@@ -274,16 +274,15 @@ namespace SmartScan
List<string> lines = new List<string>();
foreach (var item in BLLCommon.macroKey)
{
string value = "";
if (pairs.ContainsKey(item))
{
lines.Add(pairs[item].ToString());
}
else
{
lines.Add("");
value = pairs[item].ToString();
}
}
return string.Join(",", lines);
value = value.Replace("\"\"", "\"\"\"\"");
lines.Add("\""+value+"\"");
}
return $"{string.Join(",", lines)}";
}
string genLine(string txt)
{
......@@ -355,7 +354,7 @@ namespace SmartScan
content.AppendLine(string.Join(",", BLLCommon.macroKey));
var path = fileFull[index];
{
string json = System.IO.File.ReadAllText(path.codePath);
string json = System.IO.File.ReadAllText(path.codePath);
System.Web.Script.Serialization.JavaScriptSerializer serializer = new();
Dictionary<string, object> dic = (Dictionary<string, object>)serializer.DeserializeObject(json);
......@@ -437,7 +436,7 @@ namespace SmartScan
proes.StartInfo = new ProcessStartInfo
{
FileName = f,
WorkingDirectory = Path.Combine(Environment.CurrentDirectory, "ASTI"),
WorkingDirectory = System.IO.Path.Combine(Environment.CurrentDirectory, "ASTI"),
Verb = "runas" // 这里设置为 "runas" 表示以管理员身份运行
};
proes.StartInfo.UseShellExecute = false;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!