Commit 5825fcb2 authored by SherryChaos's avatar SherryChaos

new hint for importing

parent 7a4df5c8
...@@ -88,19 +88,35 @@ namespace MDPro3 ...@@ -88,19 +88,35 @@ namespace MDPro3
bool newDataAdded = false; bool newDataAdded = false;
foreach (string path in files) foreach (string path in files)
{ {
var fileName = Path.GetFileName(path);
try try
{ {
if (path.ToLower().EndsWith(".ydk")) if (path.ToLower().EndsWith(".ydk"))
File.Copy(path, Program.deckPath + Program.slash + Path.GetFileName(path), true);
if (path.ToLower().EndsWith(".yrp") || path.ToLower().EndsWith(".yrp3d"))
File.Copy(path, Program.replayPath + Program.slash + Path.GetFileName(path), true);
if (path.ToLower().EndsWith(".ypk") || path.ToLower().EndsWith(".zip") || path.ToLower().EndsWith(".cdb") || path.ToLower().EndsWith(".conf"))
{ {
File.Copy(path, Program.expansionsPath + Program.slash + Path.GetFileName(path), true); File.Copy(path, Program.deckPath + Program.slash + fileName, true);
MessageManager.Cast(InterString.Get("导入卡组「[?]」成功。", fileName.Replace(".ydk", string.Empty)));
}
else if (path.ToLower().EndsWith(".yrp") || path.ToLower().EndsWith(".yrp3d"))
{
File.Copy(path, Program.replayPath + Program.slash + fileName, true);
MessageManager.Cast(InterString.Get("导入回放「[?]」成功。", fileName));
}
else if (path.ToLower().EndsWith(".ypk") || path.ToLower().EndsWith(".zip") || path.ToLower().EndsWith(".cdb") || path.ToLower().EndsWith(".conf"))
{
File.Copy(path, Program.expansionsPath + Program.slash + fileName, true);
newDataAdded = true; newDataAdded = true;
if (fileName.ToLower().EndsWith(".ypk") || fileName.ToLower().EndsWith(".zip"))
MessageManager.Cast(InterString.Get("导入扩展卡文件「[?]」成功。", fileName));
else if (fileName.ToLower().EndsWith(".cdb"))
MessageManager.Cast(InterString.Get("导入卡片数据库「[?]」成功。", fileName));
else if (fileName.ToLower().EndsWith(".conf"))
MessageManager.Cast(InterString.Get("导入字段文件「[?]」成功。", fileName));
} }
if (path.ToLower().EndsWith(".png") || path.ToLower().EndsWith(".jpg") || path.ToLower().EndsWith(".jpeg")) else if (path.ToLower().EndsWith(".png") || path.ToLower().EndsWith(".jpg"))
{
File.Copy(path, Program.altArtPath + Program.slash + Path.GetFileName(path), true); File.Copy(path, Program.altArtPath + Program.slash + Path.GetFileName(path), true);
MessageManager.Cast(InterString.Get("导入自定义卡图「[?]」成功。", fileName));
}
} }
catch { } catch { }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment