Skip to content
19 changes: 19 additions & 0 deletions src/DynamoCore/Configuration/PreferenceSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ private readonly static Lazy<PreferenceSettings>
private double defaultScaleFactor;
private bool disableTrustWarnings = false;
private bool isNotificationCenterEnabled;
private bool isAutoSaveEnabled;
private bool isEnablePersistExtensionsEnabled;
private bool isAutoSyncDocumentBrowser = true;
private bool isStaticSplashScreenEnabled;
Expand Down Expand Up @@ -778,6 +779,23 @@ public bool EnableNotificationCenter
}
}

/// <summary>
/// This defines if user wants to enable AutoSave: automatically save edited graphs
/// to their original file on disk after a period of inactivity. The default value is false.
/// </summary>
public bool EnableAutoSave
{
get
{
return isAutoSaveEnabled;
}
set
{
isAutoSaveEnabled = value;
RaisePropertyChanged(nameof(EnableAutoSave));
}
}

/// <summary>
/// This defines if user wants the Extensions settings to persist across sessions.
/// </summary>
Expand Down Expand Up @@ -1099,6 +1117,7 @@ public PreferenceSettings()
MLRecommendationNumberOfResults = 10;
HideAutocompleteMethodOptions = false;
EnableNotificationCenter = true;
EnableAutoSave = false;
isStaticSplashScreenEnabled = true;
isTimeStampIncludedInExportFilePath = true;
DefaultPythonEngine = string.Empty;
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoCore/Graph/ModelBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Dynamo.Graph
/// <summary>
/// SaveContext represents several contexts, in which node can be serialized/deserialized.
/// </summary>
public enum SaveContext { [Obsolete("Use Save or SaveAs, instead of File")] File, Copy, Undo, Preset, None, Save, SaveAs };
public enum SaveContext { [Obsolete("Use Save or SaveAs, instead of File")] File, Copy, Undo, Preset, None, Save, SaveAs, AutoSave };

/// <summary>
/// This class encapsulates the input parameters that need to be passed into nodes
Expand Down
3 changes: 3 additions & 0 deletions src/DynamoCore/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ Dynamo.Graph.Nodes.IValueSchemaProvider.ValueTypeId.get -> string
Dynamo.Models.DynamoModel.DefaultStartConfiguration.EnableUnTrustedLocationsNotifications.get -> bool
Dynamo.Models.DynamoModel.DefaultStartConfiguration.EnableUnTrustedLocationsNotifications.set -> void
Dynamo.Models.DynamoModel.IStartConfiguration.EnableUnTrustedLocationsNotifications.get -> bool
Dynamo.Graph.SaveContext.AutoSave = 7 -> Dynamo.Graph.SaveContext
Dynamo.Configuration.PreferenceSettings.EnableAutoSave.get -> bool
Dynamo.Configuration.PreferenceSettings.EnableAutoSave.set -> void
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.cs-CZ.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3235,6 +3235,12 @@ Tato umístění můžete spravovat v části Předvolby -&gt; Zabezpečení.</v
<data name="PreferencesViewEnableNotificationCenter" xml:space="preserve">
<value>Přijímat oznámení</value>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>Centrum upozornění</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.de-DE.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3234,6 +3234,12 @@ Sie können dies unter Voreinstellungen -&gt; Sicherheit verwalten.</value>
<data name="PreferencesViewEnableNotificationCenter" xml:space="preserve">
<value>Benachrichtigungen erhalten</value>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>Benachrichtigungscenter</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.en-GB.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3236,6 +3236,12 @@ You can manage this in Preferences -&gt; Security.</value>
<data name="PreferencesViewEnableNotificationCenter" xml:space="preserve">
<value>Receive notification</value>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>Notification Center</value>
</data>
Expand Down
8 changes: 8 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3585,6 +3585,14 @@ You can manage this in Preferences -&gt; Security.</value>
<value>Receive notification</value>
<comment>Preferences | Features | Notification Center | Receive notification</comment>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
<comment>Preferences | General | Backup | Enable AutoSave toggle label</comment>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
<comment>Preferences | General | Backup | Enable AutoSave toggle tooltip</comment>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>Notification Center</value>
<comment>Preferences | Features | Notification Center</comment>
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.es-ES.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3236,6 +3236,12 @@ Puede administrar esto en Preferencias - &gt; Seguridad.</value>
<data name="PreferencesViewEnableNotificationCenter" xml:space="preserve">
<value>Recibir notificación</value>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>Centro de notificaciones</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.fr-FR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3234,6 +3234,12 @@ Vous pouvez gérer ce paramètre dans Préférences -&gt; Sécurité.</value>
<data name="PreferencesViewEnableNotificationCenter" xml:space="preserve">
<value>Recevoir une notification</value>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>Centre de notification</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.it-IT.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3218,6 +3218,12 @@ Provare a posizionare il nodo **ByOrigin** evidenziato.</value>
<data name="PreferencesViewEnableNotificationCenter" xml:space="preserve">
<value>Ricevi notifica</value>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>Centro notifiche</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.ja-JP.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3236,6 +3236,12 @@ Dynamo を再起動してアンインストールを完了します。
<data name="PreferencesViewEnableNotificationCenter" xml:space="preserve">
<value>通知を受信</value>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>通知センター</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.ko-KR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3234,6 +3234,12 @@
<data name="PreferencesViewEnableNotificationCenter" xml:space="preserve">
<value>알림 수신</value>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>알림 센터</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.pl-PL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3236,6 +3236,12 @@ Można tym zarządzać w obszarze Preferencje -&gt; Zabezpieczenia.</value>
<data name="PreferencesViewEnableNotificationCenter" xml:space="preserve">
<value>Odbierz powiadomienie</value>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>Centrum powiadomień</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.pt-BR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3236,6 +3236,12 @@ Tente colocar o nó **ByOrigin** realçado.</value>
<data name="PreferencesViewEnableNotificationCenter" xml:space="preserve">
<value>Receber notificações</value>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>Centro de notificações</value>
</data>
Expand Down
8 changes: 8 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3579,6 +3579,14 @@ You can manage this in Preferences -&gt; Security.</value>
<value>Receive notification</value>
<comment>Preferences | Features | Notification Center | Receive notification</comment>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
<comment>Preferences | General | Backup | Enable AutoSave toggle label</comment>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
<comment>Preferences | General | Backup | Enable AutoSave toggle tooltip</comment>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>Notification Center</value>
<comment>Preferences | Features | Notification Center</comment>
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.ru-RU.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3236,6 +3236,12 @@
<data name="PreferencesViewEnableNotificationCenter" xml:space="preserve">
<value>Уведомление о получении</value>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>Центр уведомлений</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3234,6 +3234,12 @@
<data name="PreferencesViewEnableNotificationCenter" xml:space="preserve">
<value>接收通知</value>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>通知中心</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.zh-TW.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3235,6 +3235,12 @@
<data name="PreferencesViewEnableNotificationCenter" xml:space="preserve">
<value>接收通知</value>
</data>
<data name="PreferencesViewEnableAutoSave" xml:space="preserve">
<value>Enable AutoSave</value>
</data>
<data name="PreferencesViewAutoSaveTooltip" xml:space="preserve">
<value>Automatically save your graph to its original file after a period of inactivity. Only applies to graphs that have already been saved to disk.</value>
</data>
<data name="PreferencesViewNotificationCenter" xml:space="preserve">
<value>通知中心</value>
</data>
Expand Down
2 changes: 2 additions & 0 deletions src/DynamoCoreWpf/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Dynamo.ViewModels.DynamoViewModel.PythonEngineUpgradeToastRequested -> System.Ac
Dynamo.ViewModels.DynamoViewModel.ToastManager.get -> Dynamo.Wpf.UI.ToastManager
Dynamo.ViewModels.DynamoViewModel.ToastManager.set -> void
Dynamo.ViewModels.DynamoViewModel.ShowPythonEngineUpgradeCanvasToast(string message, bool stayOpen = true, string filePath = null) -> void
Dynamo.ViewModels.PreferencesViewModel.AutoSaveIsChecked.get -> bool
Dynamo.ViewModels.PreferencesViewModel.AutoSaveIsChecked.set -> void
Dynamo.ViewModels.PreferencesViewModel.AutoSyncDocumentBrowserIsChecked.get -> bool
Dynamo.ViewModels.PreferencesViewModel.AutoSyncDocumentBrowserIsChecked.set -> void
Dynamo.ViewModels.PreferencesViewModel.ShowPythonAutoMigrationNotificationIsChecked.get -> bool
Expand Down
Loading
Loading