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

DYN-5319 #13441

Merged
merged 15 commits into from
Nov 9, 2022
Merged

DYN-5319 #13441

Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/AssemblySharedInfoGenerator/AssemblySharedInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// to distinguish one build from another. AssemblyFileVersion is specified
// in AssemblyVersionInfo.cs so that it can be easily incremented by the
// automated build process.
[assembly: AssemblyVersion("2.17.0.2866")]
[assembly: AssemblyVersion("2.17.0.2992")]
LongNguyenP marked this conversation as resolved.
Show resolved Hide resolved


// By default, the "Product version" shown in the file properties window is
Expand All @@ -64,4 +64,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("2.17.0.2866")]
[assembly: AssemblyFileVersion("2.17.0.2992")]
72 changes: 60 additions & 12 deletions src/DynamoCore/Configuration/PreferenceSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Dynamo.Configuration
static class ExtensionMethods
{
/// <summary>
/// Copy Properties from a PreferenceSettings instance to another iterating the Properties of the destination instance and populate them from their source counterparts, excluding the properties that are obsolete and only read.
/// Copy Properties from a PreferenceSettings instance to another iterating the Properties of the destination instance and populate them from their source counterparts, excluding the properties that are obsolete and only read.
/// </summary>
/// <param name="source"></param>
/// <param name="destination"></param>
Expand Down Expand Up @@ -84,7 +84,7 @@ public class PreferenceSettings : NotificationObject, IPreferences, IRenderPreci
/// <summary>
/// Default time
/// </summary>
public static readonly System.DateTime DynamoDefaultTime = new System.DateTime(1977, 4, 12, 12, 12, 0, 0);
public static readonly System.DateTime DynamoDefaultTime = new System.DateTime(1977, 4, 12, 12, 12, 0, 0);

#endregion

Expand Down Expand Up @@ -162,7 +162,7 @@ public bool IsADPAnalyticsReportingApproved
public List<BackgroundPreviewActiveState> BackgroundPreviews { get; set; }

/// <summary>
/// Returns active state of specified background preview
/// Returns active state of specified background preview
/// </summary>
/// <param name="name">Background preview name</param>
/// <returns>The active state</returns>
Expand All @@ -174,7 +174,7 @@ public bool GetIsBackgroundPreviewActive(string name)
}

/// <summary>
/// Sets active state of specified background preview
/// Sets active state of specified background preview
/// </summary>
/// <param name="name">Background preview name</param>
/// <param name="value">Active state</param>
Expand Down Expand Up @@ -373,7 +373,7 @@ private bool DeserializeDisableTrustWarnings(XmlNode preferenceSettingsElement)
try
{
return bool.Parse(preferenceSettingsElement.SelectSingleNode($@"//{nameof(DisableTrustWarnings)}").InnerText);

}
catch (Exception ex)
{
Expand Down Expand Up @@ -470,7 +470,7 @@ public string PythonTemplateFilePath
public int BackupFilesCount { get; set; }

/// <summary>
/// Indicates if the user has accepted the terms of
/// Indicates if the user has accepted the terms of
/// use for downloading packages from package manager.
/// </summary>
public bool PackageDownloadTouAccepted { get; set; }
Expand Down Expand Up @@ -644,7 +644,7 @@ public bool DisableCustomPackageLocations

/// <summary>
/// Limits the size of the tags used by the SearchDictionary
/// This static property is not serialized and is assigned NodeSearchTagSizeLimit's value
/// This static property is not serialized and is assigned NodeSearchTagSizeLimit's value
/// if found at deserialize time.
/// </summary>
internal static int nodeSearchTagSizeLimit = 300;
Expand All @@ -660,7 +660,7 @@ public int NodeSearchTagSizeLimit

/// <summary>
/// The Version of the IronPython package that Dynamo will download when it is found as missing in graphs.
/// This static property is not serialized and is assigned IronPythonResolveTargetVersion's value
/// This static property is not serialized and is assigned IronPythonResolveTargetVersion's value
/// if found at deserialize time.
/// </summary>
internal static Version ironPythonResolveTargetVersion = new Version(2, 4, 0);
Expand All @@ -680,6 +680,13 @@ public string IronPythonResolveTargetVersion
public List<string> ReadNotificationIds { get; set; }
#endregion

#region Dynamo Player and Generative Design settings

// Collections of folders used by Dynamo Player or Generative Design as entry points.
public Dictionary<string, List<DynamoPlayerFolderItem>> DynamoPlayerFolderItems;
LongNguyenP marked this conversation as resolved.
Show resolved Hide resolved

#endregion

/// <summary>
/// Initializes a new instance of the <see cref="PreferenceSettings"/> class.
/// </summary>
Expand Down Expand Up @@ -719,7 +726,7 @@ public PreferenceSettings()
BackupInterval = DefaultBackupInterval;
BackupFilesCount = 1;
BackupFiles = new List<string>();

CustomPackageFolders = new List<string>();

PythonTemplateFilePath = "";
Expand Down Expand Up @@ -761,11 +768,11 @@ public bool Save(string filePath)
}

/// <summary>
/// Saves PreferenceSettings in a default directory when no path is
/// Saves PreferenceSettings in a default directory when no path is
/// specified.
/// </summary>
/// <param name="preferenceFilePath">The file path to save preference
/// settings to. If this parameter is null or empty string, preference
/// settings to. If this parameter is null or empty string, preference
/// settings will be saved to the default path.</param>
/// <returns>True if file is saved successfully, false if an error occurred.</returns>
public bool SaveInternal(string preferenceFilePath)
Expand Down Expand Up @@ -1016,7 +1023,7 @@ public bool IsTrustedLocation(string location)
{
return false;
}

}

/// <summary>
Expand Down Expand Up @@ -1097,4 +1104,45 @@ public bool IsCreatedFromValidFile
get { return isCreatedFromValidFile; }
}
}

public class DynamoPlayerFolderItem
LongNguyenP marked this conversation as resolved.
Show resolved Hide resolved
{
/// <summary>
/// The full path if the folder
/// </summary>
public string Path;

/// <summary>
/// The display name of the folder
/// </summary>
public string DisplayName;

/// <summary>
/// The ID of the folder
/// </summary>
public string Id;

/// <summary>
/// Whether this folder is removable from the settings (Built-in folders are non-removable)
/// </summary>
public bool IsRemovable = true;

/// <summary>
/// The order of the folder
/// </summary>
public int Order = -1;

/// <summary>
///
/// </summary>
/// <param name="path">The full path of the folder</param>
/// <param name="displayName">The display name of the folder</param>
/// <param name="id">The id of the folder</param>
public DynamoPlayerFolderItem(string path, string displayName, string id)
{
Path = path;
DisplayName = displayName;
Id = id;
}
}
}