Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RegPreview] Various improvements on how files are saved #37628

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
fixes
  • Loading branch information
htcfreek committed Feb 25, 2025
commit f91bf787242d833bea50a475934604a16dfb9fac
Original file line number Diff line number Diff line change
@@ -110,7 +110,7 @@ private async void OpenButton_Click(object sender, RoutedEventArgs e)
{
case ContentDialogResult.Primary:
// Save, then continue the file open
if (!AskFileName(_appFileName) ||
if (!AskFileName(string.Empty) ||
!SaveFile())
{
return;
@@ -167,7 +167,7 @@ private async void OpenButton_Click(object sender, RoutedEventArgs e)
/// </summary>
private void SaveButton_Click(object sender, RoutedEventArgs e)
{
if (!AskFileName(_appFileName))
if (!AskFileName(string.Empty))
{
return;
}
@@ -181,6 +181,7 @@ private void SaveButton_Click(object sender, RoutedEventArgs e)
/// </summary>
private async void SaveAsButton_Click(object sender, RoutedEventArgs e)
{
newFileLoaded = true;
if (!AskFileName(_appFileName) || !SaveFile())
{
return;
@@ -267,7 +268,7 @@ private async void WriteButton_Click(object sender, RoutedEventArgs e)
{
case ContentDialogResult.Primary:
// Save, then continue the file open
if (!AskFileName(_appFileName) ||
if (!AskFileName(string.Empty) ||
!SaveFile())
{
return;
Original file line number Diff line number Diff line change
@@ -834,7 +834,7 @@ private async void HandleDirtyClosing(string title, string content, string prima
{
case ContentDialogResult.Primary:
// Save, then close
if (!AskFileName(_appFileName) ||
if (!AskFileName(string.Empty) ||
!SaveFile())
{
return;