Skip to content

Commit

Permalink
Version 0.0.10 release. Closes #11 by undocking the window on launch. C…
Browse files Browse the repository at this point in the history
…loses #7 by leaving python view extension override in place.
  • Loading branch information
johnpierson committed Jul 5, 2023
1 parent f119456 commit c14705c
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
using Dynamo.Wpf.Extensions;
using System;
using System.Linq;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
using Dynamo.Configuration;
using Dynamo.Controls;
using DynamoGraphMigrationAssistant.ViewModels;
using DynamoGraphMigrationAssistant.Views;

Expand Down Expand Up @@ -88,7 +91,26 @@ private void AddToSidebar()
ViewModel.DynamoViewModel.NewHomeWorkspaceCommand.Execute(null);
}


//add to sidebar and undock it immediately
_viewLoadedParamsReference?.AddToExtensionsSideBar(this, View);

var dynamoView = _viewLoadedParamsReference.DynamoWindow as DynamoView;

try
{
MethodInfo undockExtension = typeof(DynamoView).GetMethod("UndockExtension",
BindingFlags.NonPublic | BindingFlags.Instance);

if (undockExtension != null)
undockExtension.Invoke(dynamoView,
new object[] { this.Name });
}
catch (Exception)
{
//the View Extension was already undocked.
}

}
public override void Closed()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<AssemblyTitle>DynamoMigrationAssistantViewExtension</AssemblyTitle>
<Product>DynamoMigrationAssistantViewExtension</Product>
<Copyright>Copyright © 2023</Copyright>
<AssemblyVersion>0.0.9</AssemblyVersion>
<FileVersion>0.0.9</FileVersion>
<AssemblyVersion>0.0.10</AssemblyVersion>
<FileVersion>0.0.10</FileVersion>
<OutputPath>bin\$(Configuration)\</OutputPath>
<OutputType>Library</OutputType>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ private void SourcePathPropertyChanged(object sender, PropertyChangedEventArgs p
{
TrustCheckboxVisible = false;
IsTrustedFolder = true;
SourceFolderChanged(pathVM);
}
}
else
Expand Down Expand Up @@ -968,7 +969,8 @@ private void InformFinish(string count)

EnterLog(successMessage);

//MessageBoxService.Show(owner, successMessage, Properties.Resources.FinishMsgTitle, MessageBoxButton.OK, MessageBoxImage.Information);
MessageBox.Show(owner, successMessage, Properties.Resources.FinishMsgTitle, MessageBoxButton.OK,
MessageBoxImage.Information);

//show the view output button
StopButtonVisible = false;
Expand Down
4 changes: 0 additions & 4 deletions aWorkspaceReferencesOverride_ViewExtensionDefinition.xml

This file was deleted.

Binary file added doc/DynamoGraphMigrationAssistant-AutoUndock.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

0 comments on commit c14705c

Please sign in to comment.