Skip to content

Commit

Permalink
comment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
SHKnudsen committed Jul 3, 2020
1 parent f3da2d5 commit 2d2332a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/AssemblySharedInfoGenerator/AssemblySharedInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// associated with an assembly.
[assembly: AssemblyCompany("Autodesk, Inc")]
[assembly: AssemblyProduct("Dynamo")]
[assembly: AssemblyCopyright("Copyright © Autodesk, Inc 2017")]
[assembly: AssemblyCopyright("Copyright © Autodesk, Inc 2020")]
[assembly: AssemblyTrademark("")]

//In order to begin building localizable applications, set
Expand Down 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.8.0.1823")]
[assembly: AssemblyVersion("2.8.0.1843")]


// 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.8.0.1823")]
[assembly: AssemblyFileVersion("2.8.0.1843")]
6 changes: 4 additions & 2 deletions src/Libraries/PythonNodeModels/PythonNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public enum PythonEngineVersion
}

/// <summary>
/// EventArgs used to send the original and maigrated code to the ScriptEditor
/// Event arguments used to send the original and migrated code to the ScriptEditor
/// </summary>
public class PythonCodeMigrationEventArgs : EventArgs
{
Expand Down Expand Up @@ -248,18 +248,20 @@ protected override bool UpdateValueCore(UpdateValueParams updateValueParams)
/// it will be removed when the transistion period is over.
/// </summary>
/// <param name="newCode">The new migrated code</param>
[Obsolete("Method will be deprecated after the Python 3 transition period")]
public void MigrateCode(string newCode)
{
var e = new PythonCodeMigrationEventArgs(Script, newCode);
OnCodeMigrated(e);
Script = newCode;
OnCodeMigrated(e);
}

/// <summary>
/// Fires when the Script content is migrated to Python 3.
/// NOTE: This is a temporary event used during the Python 2 to Python 3 transistion period,
/// it will be removed when the transistion period is over.
/// </summary>
[Obsolete("Event will be deprecated after the Python 3 transition period")]
public event EventHandler CodeMigrated;
private void OnCodeMigrated(PythonCodeMigrationEventArgs e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ internal class PythonMigrationAssistantViewModel
{
public string OldCode { get; set; }
public string NewCode { get; set; }
public ScriptEditorWindow OwnerWindow { get; set; }
internal ScriptEditorWindow OwnerWindow { get; private set; }
private PythonNode PythonNode { get; set; }

public PythonMigrationAssistantViewModel(PythonNode pythonNode, ScriptEditorWindow parentWindow)
public PythonMigrationAssistantViewModel(PythonNode pythonNode, ScriptEditorWindow parentWindow = null)
{
PythonNode = pythonNode;
OwnerWindow = parentWindow;
OldCode = pythonNode.Script;
MigrateCode();
if (parentWindow is null)
return;

SetOwnerWindow(parentWindow);

}

private void MigrateCode()
Expand All @@ -29,5 +33,10 @@ public void ChangeCode()
{
PythonNode.MigrateCode(NewCode);
}

private void SetOwnerWindow(ScriptEditorWindow parentWindow)
{
OwnerWindow = parentWindow;
}
}
}

0 comments on commit 2d2332a

Please sign in to comment.