Skip to content

Commit

Permalink
Sync changes
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpierson committed Jun 27, 2023
1 parent e869314 commit f119456
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<AssemblyVersion>0.0.9</AssemblyVersion>
<FileVersion>0.0.9</FileVersion>
<OutputPath>bin\$(Configuration)\</OutputPath>
<OutputType>Library</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Windows;
using System.Windows.Threading;
using Dynamo.Configuration;
using Dynamo.Controls;
using Dynamo.Core;
using Dynamo.Graph;
using Dynamo.Graph.Nodes;
Expand All @@ -21,6 +22,7 @@
using Dynamo.Utilities;
using Dynamo.ViewModels;
using Dynamo.Wpf.Extensions;
using Dynamo.Wpf.Views;
using DynamoGraphMigrationAssistant.Controls;
using DynamoGraphMigrationAssistant.Models;
using Directory = System.IO.Directory;
Expand Down Expand Up @@ -297,6 +299,7 @@ public string NotificationMessage
public DelegateCommand CancelCommand { get; set; }
public DelegateCommand ViewOutputCommand { get; set; }
public DelegateCommand ViewHelpDocumentationCommand { get; set; }
public DelegateCommand EditGraphSettingsCommand { get; set; }

#endregion

Expand Down Expand Up @@ -344,6 +347,7 @@ public GraphMigrationAssistantViewModel(ViewLoadedParams p)
CancelCommand = new DelegateCommand(Cancel);
ViewOutputCommand = new DelegateCommand(ViewOutput);
ViewHelpDocumentationCommand = new DelegateCommand(ViewHelpDocumentation);
EditGraphSettingsCommand = new DelegateCommand(EditSettings);
_graphQueue = new Queue<string>();

sb = new StringBuilder();
Expand Down Expand Up @@ -1009,6 +1013,14 @@ private void ViewHelpDocumentation(object obj)
viewLoadedParamsInstance.ViewModelCommandExecutive.OpenDocumentationLinkCommand(uri);
}

private void EditSettings(object obj)
{
var dynamoView = viewLoadedParamsInstance.DynamoWindow as DynamoView;
PreferencesView preferencesView = new PreferencesView(dynamoView);

preferencesView.ShowDialog();
}

private void Reset()
{
phase = MigrationPhase.PerformMigration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,10 @@
<ColumnDefinition Width="24"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" HorizontalAlignment="Left" Style="{StaticResource ClickableSettingsIcon}" Width="16">
<Image.ToolTip>
<Image Grid.Column="0" HorizontalAlignment="Left" Style="{StaticResource ClickableSettingsIcon}" Width="16"
MouseLeftButtonDown="EditGraphSettingsCommand">

<Image.ToolTip>
<ToolTip Content="{x:Static p:Resources.MigrationAssistantSettingsTooltip}" Style="{StaticResource GenericToolTipLight}"/>
</Image.ToolTip>
</Image>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,13 @@ private void Selector_OnSelectionChanged(object sender, SelectionChangedEventArg

vm.CheckVersions();
}

private void EditGraphSettingsCommand(object sender, MouseButtonEventArgs e)
{
if (!IsLoaded) return;
GraphMigrationAssistantViewModel vm = this.DataContext as GraphMigrationAssistantViewModel;

vm.EditGraphSettingsCommand.Execute(this);
}
}
}

0 comments on commit f119456

Please sign in to comment.