Сохранение файла без выбора файла, если файл уже открыт

This commit is contained in:
MisterMLiL 2024-10-10 13:55:13 +03:00
parent 7f178888a5
commit 61db7beb4c
35 changed files with 10 additions and 3 deletions

Binary file not shown.

Binary file not shown.

View File

@ -437,6 +437,13 @@ namespace GtaVUsersInfo
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = filter;
if (window.prevFile != null)
{
string jsonData = JsonConvert.SerializeObject(data, Formatting.Indented);
File.WriteAllText(window.prevFile, jsonData);
return;
}
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
// Сериализуем данные в JSON

View File

@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>True|2024-10-10T09:30:25.7657642Z;True|2024-10-10T10:55:42.4660156+03:00;True|2024-10-10T10:36:20.4890831+03:00;</History>
<History>True|2024-10-10T10:54:38.0393379Z;True|2024-10-10T13:48:01.9862052+03:00;True|2024-10-10T12:30:25.7657642+03:00;True|2024-10-10T10:55:42.4660156+03:00;True|2024-10-10T10:36:20.4890831+03:00;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

View File

@ -1 +1 @@
0e0620c9e90405a040536d7aa4bbce2e52cf4709
6b0dce8961468a09f1161f92cf71e98701cd2405

View File

@ -1 +1 @@
355d640f87884ff864ea3cc2e918102d15c5316d
7fbabf9a11a36ff2f2d79629f4fd612595fba228