diff --git a/UnityL10nTool/UnityL10nToolCShop/ProjectConfig.xaml.cs b/UnityL10nTool/UnityL10nToolCShop/ProjectConfig.xaml.cs index 354aba4..e54d908 100644 --- a/UnityL10nTool/UnityL10nToolCShop/ProjectConfig.xaml.cs +++ b/UnityL10nTool/UnityL10nToolCShop/ProjectConfig.xaml.cs @@ -429,15 +429,13 @@ private void Button_Click(object sender, RoutedEventArgs e) Grid grid2 = (Grid)grid.Parent; // 카피해서 넣어야함. FontAssetMapsCLI fontAssetMapsCLI = (FontAssetMapsCLI)grid2.DataContext; - try + FontAssetMapCLI found = fontAssetMapsCLI.Saveds.SingleOrDefault(x => x.LooseEquals(fontAssetMapCLI)); + if (found != null) { - FontAssetMapCLI found = fontAssetMapsCLI.Saveds.Single(x => - x.LooseEquals(fontAssetMapCLI)); fontAssetMapsCLI.Saveds.Remove(found); FontAssetMapCLI clone = fontAssetMapCLI.Clone(); fontAssetMapsCLI.Saveds.Add(clone); - - } catch (InvalidOperationException invalidOperationException) + } else { FontAssetMapCLI clone = fontAssetMapCLI.Clone(); fontAssetMapsCLI.Saveds.Add(clone); @@ -454,6 +452,7 @@ private void Button_Click_1(object sender, RoutedEventArgs e) FontAssetMapsCLI fontAssetMapsCLI = (FontAssetMapsCLI)grid.DataContext; Grid templateRootGrid = (Grid)grid.Parent; DataGrid fontAssetMapDataGrid = (DataGrid)templateRootGrid.FindName("FontAssetMapDataGrid"); + try { FontAssetMapCLI found = fontAssetMapsCLI.News.Single(x => @@ -549,6 +548,10 @@ private void Button_Click_4(object sender, RoutedEventArgs e) { binaryName = unityL10NToolProjectInfo.GameName + " Patcher"; } + if (System.IO.File.Exists(projectFolderName + "Build\\" + binaryName + ".exe")) + { + System.IO.File.Delete(projectFolderName + "Build\\" + binaryName + ".exe"); + } System.IO.File.Move( projectFolderName + "Build\\UnityL10nToolPatcherCShop.exe", projectFolderName + "Build\\" + binaryName + ".exe");