Skip to content

Commit 74d26dd

Browse files
author
kritsu
committed
修复了0代码的补全问题和拖拽文件触发移动文件的问题
1 parent 7c4b5b0 commit 74d26dd

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

ExtractorSharp.Component/ESListBox.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,11 @@ public void Clear() {
209209
}
210210

211211

212-
protected void ListDragDrop(object sender, DragEventArgs e) {
213-
var target = IndexFromPoint(PointToClient(new Point(e.X, e.Y)));
212+
private void ListDragDrop(object sender, DragEventArgs e) {
213+
if (!e.Data.GetDataPresent(DataFormats.Serializable)){
214+
return;
215+
}
216+
var target = IndexFromPoint(PointToClient(new Point(e.X, e.Y)));
214217
if (target == SelectedIndex || SelectedIndex < 0 || Items.Count < 0) return;
215218
target = target < Items.Count && target > -1 ? target : Items.Count - 1;
216219
var args = new ItemEventArgs();
@@ -219,7 +222,7 @@ protected void ListDragDrop(object sender, DragEventArgs e) {
219222
OnItemDraged(args);
220223
}
221224

222-
protected void ListDragOver(object sender, DragEventArgs e) {
225+
private void ListDragOver(object sender, DragEventArgs e) {
223226
e.Effect = DragDropEffects.Move;
224227
}
225228
}

ExtractorSharp.Core/Coder/NpkCoder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ public static bool MatchCode(string name1, string name2) {
332332

333333
public static string CompleteCode(int code) {
334334
var str = code.ToString();
335-
if (code > 0) {
335+
if (code > -1) {
336336
while (str.Length < 4) {
337337
str = string.Concat(0, str);
338338
}

ExtractorSharp/Resources/chinese.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@
224224
"SelectAllAndNotTips": "选择全部并不再提示",
225225
"SelectHide": "勾选所有隐藏贴图",
226226
"SelectLink": "勾选所有索引贴图",
227-
"SelectPathIsInvalid": "所选目录无效,请重新选择",
227+
"SelectPathIsInvalid": "所选游戏目录无效,请重新选择",
228228
"SelectPathTips": "请选择路径",
229229
"SelectThisLink": "勾选引用当前贴图的贴图",
230230
"SelectThisTarget": "转到当前贴图引用的贴图",

0 commit comments

Comments
 (0)