private void _buttonExport_Click(object sender, RoutedEventArgs e) { try { var tuple = ViewIdPreviewDialog.LatestTupe; if (tuple == null) { return; } var sprite = LuaHelper.GetSpriteFromViewId(tuple.GetIntNoThrow(ServerItemAttributes.ClassNumber), LuaHelper.ViewIdTypes.Headgear, SdeEditor.Instance.ProjectDatabase.GetDb <int>(ServerDbs.Items), tuple); string[] files = new string[] { @"data\sprite\¾ÆÀÌÅÛ\" + sprite + ".spr", @"data\sprite\¾ÆÀÌÅÛ\" + sprite + ".act", @"data\sprite\¾Ç¼¼»ç¸®\³²\³²_" + sprite + ".spr", @"data\sprite\¾Ç¼¼»ç¸®\³²\³²_" + sprite + ".act", @"data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_" + sprite + ".spr", @"data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_" + sprite + ".act", @"data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\collection\" + sprite + ".bmp", @"data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\item\" + sprite + ".bmp" }; string path = PathRequest.FolderEditor(); if (path == null) { return; } var grf = SdeEditor.Instance.ProjectDatabase.MetaGrf; foreach (var file in files) { var data = grf.GetData(file); if (data != null) { string subPath = GrfPath.Combine(path, file); GrfPath.CreateDirectoryFromFile(subPath); File.WriteAllBytes(subPath, data); } } OpeningService.OpenFolder(path); } catch (Exception err) { ErrorHandler.HandleException(err); } }
private void _miExport_Click(object sender, RoutedEventArgs e) { BackupView view = _listView.SelectedItem as BackupView; if (view != null) { string folder = PathRequest.FolderEditor(); if (folder != null) { BackupEngine.Instance.Export(folder, view.BackupDate); } } }
private void _buttonExport_Click(object sender, RoutedEventArgs e) { try { string path = PathRequest.FolderEditor(); if (path == null) { return; } _save(path); } catch (Exception err) { ErrorHandler.HandleException(err); } }