up newline

pull/354/head
2dust 2019-12-11 11:42:41 +08:00
parent 8bcbd34c27
commit f8517a316b
3 changed files with 9 additions and 8 deletions

View File

@ -887,9 +887,9 @@ namespace v2rayN.Forms
ClearMsg();
}
this.txtMsgBox.AppendText(msg);
if (!msg.EndsWith("\r\n"))
if (!msg.EndsWith(Environment.NewLine))
{
this.txtMsgBox.AppendText("\r\n");
this.txtMsgBox.AppendText(Environment.NewLine);
}
}

View File

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace v2rayN.Handler
@ -42,7 +43,7 @@ namespace v2rayN.Handler
{
continue;
}
string value = str.Replace("\",", "").Replace("\"", "").Replace(",", "").Replace("\r\n", "").Replace(" ", "");
string value = str.Replace("\",", "").Replace("\"", "").Replace(",", "").Replace(Environment.NewLine, "").Replace(" ", "");
lstPac.Add(value);
}

View File

@ -155,7 +155,7 @@ namespace v2rayN
{
if (wrap)
{
return string.Join(",\r\n", lst.ToArray());
return string.Join("," + Environment.NewLine, lst.ToArray());
}
else
{
@ -176,7 +176,7 @@ namespace v2rayN
{
try
{
str = str.Replace("\r\n", "");
str = str.Replace(Environment.NewLine, "");
return new List<string>(str.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries));
}
catch
@ -214,8 +214,8 @@ namespace v2rayN
try
{
plainText = plainText.TrimEx()
.Replace(Environment.NewLine, "")
.Replace("\n", "")
.Replace("\r\n", "")
.Replace("\r", "")
.Replace(" ", "");
@ -854,7 +854,7 @@ namespace v2rayN
SwWrite.WriteLine(string.Format("{0}{1}[{2}]{3}", "--------------------------------", strTitle, DateTime.Now.ToString("HH:mm:ss"), "--------------------------------"));
SwWrite.Write(strContent);
SwWrite.WriteLine("\r\n");
SwWrite.WriteLine(Environment.NewLine);
SwWrite.WriteLine(" ");
SwWrite.Flush();
SwWrite.Close();