Skip to content

Commit

Permalink
Update SplashScreen.xaml.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
zeusongit committed Jan 18, 2024
1 parent b8d7aaf commit 0383f69
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/DynamoCoreWpf/Views/SplashScreen/SplashScreen.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,14 @@ private static bool IsValidPreferencesFile(string filePath)
/// <summary>
/// If the user wants to close the window, we shutdown the application and don't launch Dynamo
/// </summary>
internal void CloseWindow()
/// <param name="isCheckboxChecked">If true, the user has chosen to not show splash screen on next run.</param>
internal void CloseWindow(bool isCheckboxChecked = false)
{
CloseWasExplicit = true;
if (viewModel != null && isCheckboxChecked)
{
viewModel.PreferenceSettings.EnableStaticSplashScreen = !isCheckboxChecked;
}

if (string.IsNullOrEmpty(DynamoModel.HostAnalyticsInfo.HostName))
{
Expand Down Expand Up @@ -571,9 +576,9 @@ public class ScriptObject
readonly Action<string> RequestImportSettings;
readonly Func<bool> RequestSignIn;
readonly Func<bool> RequestSignOut;
readonly Action RequestCloseWindow;
readonly Action<bool> RequestCloseWindow;

public ScriptObject(Action<bool> requestLaunchDynamo, Action<string> requestImportSettings, Func< bool> requestSignIn, Func<bool> requestSignOut, Action requestCloseWindow)
public ScriptObject(Action<bool> requestLaunchDynamo, Action<string> requestImportSettings, Func< bool> requestSignIn, Func<bool> requestSignOut, Action<bool> requestCloseWindow)
{
RequestLaunchDynamo = requestLaunchDynamo;
RequestImportSettings = requestImportSettings;
Expand All @@ -600,9 +605,9 @@ public bool SignOut()
{
return RequestSignOut();
}
public void CloseWindow()
public void CloseWindow(bool isCheckboxChecked)
{
RequestCloseWindow();
RequestCloseWindow(isCheckboxChecked);
}
}
}

0 comments on commit 0383f69

Please sign in to comment.