SVN r834
SVN-Revision: r834
This commit is contained in:
@@ -41,6 +41,10 @@ namespace Lskj.Control
|
|||||||
/// 存储原文件名
|
/// 存储原文件名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string lasttext;
|
public string lasttext;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否变更新增
|
||||||
|
/// </summary>
|
||||||
|
public bool changeAdd;
|
||||||
public LabelRemarkEdit()
|
public LabelRemarkEdit()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -60,35 +64,25 @@ namespace Lskj.Control
|
|||||||
{
|
{
|
||||||
var file = ((string[])e.Data.GetData(DataFormats.FileDrop))[0];
|
var file = ((string[])e.Data.GetData(DataFormats.FileDrop))[0];
|
||||||
string filename = Path.GetFileName(file);
|
string filename = Path.GetFileName(file);
|
||||||
if (!string.IsNullOrEmpty(lasttext))
|
if (!string.IsNullOrEmpty(lasttext) && string.Equals(lasttext, filename, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
if (string.Equals(lasttext, filename, StringComparison.OrdinalIgnoreCase))
|
MessageUtil.Show("检测到更改文件和原文件完全一样!");
|
||||||
{
|
|
||||||
|
|
||||||
MessageUtil.Show("检测到更改文件和原文件完全一样!");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string prefix1 = GetPrefixBeforeLastS(filename, StringComparison.OrdinalIgnoreCase);
|
|
||||||
string prefix2 = GetPrefixBeforeLastS(lasttext, StringComparison.OrdinalIgnoreCase);
|
|
||||||
if (string.Equals(prefix1, prefix2, StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
txtEdit.Text = filename;
|
|
||||||
this.filepath = file;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageUtil.Show("检测到更改文件和原文件不匹配!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
txtEdit.Text = filename;
|
string prefix1 = GetPrefixBeforeLastS(filename, StringComparison.OrdinalIgnoreCase);
|
||||||
this.filepath = file;
|
string prefix2 = GetPrefixBeforeLastS(lasttext, StringComparison.OrdinalIgnoreCase);
|
||||||
OnLastTextEmpty();
|
if (!string.IsNullOrEmpty(lasttext) && !string.Equals(prefix1, prefix2, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
MessageUtil.Show("检测到更改文件和原文件不匹配!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
txtEdit.Text = filename;
|
||||||
|
this.filepath = file;
|
||||||
|
OnLastTextEmpty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 拖拽为空触发回调
|
/// 拖拽为空触发回调
|
||||||
|
|||||||
Reference in New Issue
Block a user