Skip to content

Commit ce73889

Browse files
authored
Insert Changes (#13705)
- added Insert dialog box title to resources, changed the text - added insert run mode change notification to resources - change the Toast type (now disappears on the next mouseclick) - change the order in which Insert is done and the mode is changed, i.e. mode would change only if a graph has been inserted
1 parent 49847b7 commit ce73889

File tree

4 files changed

+40
-10
lines changed

4 files changed

+40
-10
lines changed

src/DynamoCore/Properties/Resources.Designer.cs

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/DynamoCore/Properties/Resources.en-US.resx

+7-1
Original file line numberDiff line numberDiff line change
@@ -893,4 +893,10 @@ This package likely contains an assembly that is blocked. You will need to load
893893
<data name="FailedInsertFileNodeExistNotification" xml:space="preserve">
894894
<value>Failed to insert the file as some of the nodes already exist in the current worspace.</value>
895895
</data>
896-
</root>
896+
<data name="InsertDialogBoxText" xml:space="preserve">
897+
<value>Insert Dynamo Definition...</value>
898+
</data>
899+
<data name="InsertGraphRunModeNotificationText" xml:space="preserve">
900+
<value>Example file added to workspace. Run mode changed to Manual.</value>
901+
</data>
902+
</root>

src/DynamoCore/Properties/Resources.resx

+7-1
Original file line numberDiff line numberDiff line change
@@ -896,4 +896,10 @@ This package likely contains an assembly that is blocked. You will need to load
896896
<data name="FailedInsertFileNodeExistNotification" xml:space="preserve">
897897
<value>Failed to insert the file as some of the nodes already exist in the current worspace.</value>
898898
</data>
899-
</root>
899+
<data name="InsertDialogBoxText" xml:space="preserve">
900+
<value>Insert Dynamo Definition...</value>
901+
</data>
902+
<data name="InsertGraphRunModeNotificationText" xml:space="preserve">
903+
<value>Example file added to workspace. Run mode changed to Manual.</value>
904+
</data>
905+
</root>

src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -1819,7 +1819,7 @@ private void model_ComputeModelDeserialized()
18191819
/// <param name="notification"></param>
18201820
private void model_RequestNotification(string notification)
18211821
{
1822-
this.MainGuideManager.CreateRealTimeInfoWindow(notification, true);
1822+
this.MainGuideManager.CreateRealTimeInfoWindow(notification);
18231823
}
18241824

18251825
/// <summary>
@@ -1893,7 +1893,7 @@ private void ShowInsertDialogAndInsertResult(object parameter)
18931893
Filter = string.Format(Resources.FileDialogDynamoDefinitions,
18941894
BrandingResourceProvider.ProductName, fileExtensions) + "|" +
18951895
string.Format(Resources.FileDialogAllFiles, "*.*"),
1896-
Title = string.Format("Insert Title (Replace)", BrandingResourceProvider.ProductName)
1896+
Title = string.Format(Properties.Resources.InsertDialogBoxText, BrandingResourceProvider.ProductName)
18971897
};
18981898

18991899
// if you've got the current space path, use it as the inital dir
@@ -1921,17 +1921,17 @@ private void ShowInsertDialogAndInsertResult(object parameter)
19211921
_fileDialog.InitialDirectory = path;
19221922
}
19231923

1924-
if (HomeSpace.RunSettings.RunType != RunType.Manual)
1925-
{
1926-
MainGuideManager.CreateRealTimeInfoWindow("Example file added to workspace. Run mode changed to Manual.", true);
1927-
HomeSpace.RunSettings.RunType = RunType.Manual;
1928-
}
1929-
19301924
if (_fileDialog.ShowDialog() == DialogResult.OK)
19311925
{
19321926
if (CanOpen(_fileDialog.FileName))
19331927
{
19341928
Insert(new Tuple<string, bool>(_fileDialog.FileName, _fileDialog.RunManualMode));
1929+
1930+
if (HomeSpace.RunSettings.RunType != RunType.Manual)
1931+
{
1932+
MainGuideManager.CreateRealTimeInfoWindow(Properties.Resources.InsertGraphRunModeNotificationText);
1933+
HomeSpace.RunSettings.RunType = RunType.Manual;
1934+
}
19351935
}
19361936
}
19371937
}

0 commit comments

Comments
 (0)