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-6208 Update Dynamo Website Menu Item behavior #15469

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 9 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,10 @@ Don't worry, you'll have the option to save your work.</value>
<value>Dynamo _Website</value>
<comment>Help menu | Go go Dynamo website</comment>
</data>
<data name="DynamoViewHelpMenuGotoRepo" xml:space="preserve">
<value>Dynamo _Repository</value>
<comment>Help menu | Go go Dynamo repository</comment>
</data>
<data name="DynamoViewHelpMenuGotoWiki" xml:space="preserve">
<value>Dynamo _Project Wiki</value>
<comment>Help menu | Go to wiki</comment>
Expand Down Expand Up @@ -4021,4 +4025,4 @@ To make this file into a new template, save it to a different folder, then move
<data name="NodeHelpIsDumped" xml:space="preserve">
<value>Node Help Data is dumped to \"{0}\".</value>
</data>
</root>
</root>
6 changes: 5 additions & 1 deletion src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,10 @@
<value>Dynamo _Website</value>
<comment>Help menu | Go Dynamo website</comment>
</data>
<data name="DynamoViewHelpMenuGotoRepo" xml:space="preserve">
<value>Dynamo _Repository</value>
<comment>Help menu | Go go Dynamo repository</comment>
</data>
<data name="DynamoViewHelpMenuGotoWiki" xml:space="preserve">
<value>Dynamo _Project Wiki</value>
<comment>Help menu | Go to wiki</comment>
Expand Down Expand Up @@ -4008,4 +4012,4 @@ To make this file into a new template, save it to a different folder, then move
<data name="NodeHelpIsDumped" xml:space="preserve">
<value>Node Help Data is dumped to \"{0}\".</value>
</data>
</root>
</root>
4 changes: 4 additions & 0 deletions src/DynamoCoreWpf/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1928,6 +1928,9 @@ Dynamo.ViewModels.DynamoViewModel.GoHomeView(object parameter) -> void
Dynamo.ViewModels.DynamoViewModel.GoToDictionary(object parameter) -> void
Dynamo.ViewModels.DynamoViewModel.GoToDictionaryCommand.get -> Dynamo.UI.Commands.DelegateCommand
Dynamo.ViewModels.DynamoViewModel.GoToDictionaryCommand.set -> void
Dynamo.ViewModels.DynamoViewModel.GoToWebsite(object parameter) -> void
Dynamo.ViewModels.DynamoViewModel.GoToWebsiteCommand.get -> Dynamo.UI.Commands.DelegateCommand
Dynamo.ViewModels.DynamoViewModel.GoToWebsiteCommand.set -> void
Dynamo.ViewModels.DynamoViewModel.GoToSourceCode(object parameter) -> void
Dynamo.ViewModels.DynamoViewModel.GoToSourceCodeCommand.get -> Dynamo.UI.Commands.DelegateCommand
Dynamo.ViewModels.DynamoViewModel.GoToSourceCodeCommand.set -> void
Expand Down Expand Up @@ -4569,6 +4572,7 @@ static Dynamo.Wpf.Properties.Resources.DynamoViewHelpDictionary.get -> string
static Dynamo.Wpf.Properties.Resources.DynamoViewHelpMenu.get -> string
static Dynamo.Wpf.Properties.Resources.DynamoViewHelpMenuDisplayStartPage.get -> string
static Dynamo.Wpf.Properties.Resources.DynamoViewHelpMenuGotoWebsite.get -> string
static Dynamo.Wpf.Properties.Resources.DynamoViewHelpMenuGotoRepo.get -> string
static Dynamo.Wpf.Properties.Resources.DynamoViewHelpMenuGotoWiki.get -> string
static Dynamo.Wpf.Properties.Resources.DynamoViewHelpMenuReportBug.get -> string
static Dynamo.Wpf.Properties.Resources.DynamoViewHelpMenuShowInFolder.get -> string
Expand Down
9 changes: 9 additions & 0 deletions src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3317,6 +3317,15 @@ internal bool CanGoToWiki(object parameter)
{
return true;
}
public void GoToWebsite(object parameter)
{
Process.Start(new ProcessStartInfo("explorer.exe", Configurations.DynamoSiteLink) { UseShellExecute = true });
}

internal bool CanGoToWebsite(object parameter)
{
return true;
}

public void GoToSourceCode(object parameter)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ private void InitializeDelegateCommands()
SetConnectorTypeCommand = new DelegateCommand(SetConnectorType, CanSetConnectorType);
ReportABugCommand = new DelegateCommand(ReportABug, CanReportABug);
GoToWikiCommand = new DelegateCommand(GoToWiki, CanGoToWiki);
GoToWebsiteCommand = new DelegateCommand(GoToWebsite, CanGoToWebsite);
GoToSourceCodeCommand = new DelegateCommand(GoToSourceCode, CanGoToSourceCode);
GoToDictionaryCommand = new DelegateCommand(GoToDictionary, CanGoToDictionary);
DisplayStartPageCommand = new DelegateCommand(DisplayStartPage, CanDisplayStartPage);
Expand Down Expand Up @@ -154,6 +155,7 @@ private void InitializeDelegateCommands()
public DelegateCommand ReportABugCommand { get; set; }
public DelegateCommand GoToWikiCommand { get; set; }
public DelegateCommand GoToDictionaryCommand { get; set; }
public DelegateCommand GoToWebsiteCommand { get; set; }
public DelegateCommand GoToSourceCodeCommand { get; set; }
public DelegateCommand DisplayStartPageCommand { get; set; }
public DelegateCommand DisplayInteractiveGuideCommand { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoCoreWpf/Views/About/AboutWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private void OnPreviewMouseDown(object sender, MouseButtonEventArgs e)

private void OnClickLink(object sender, RoutedEventArgs e)
{
Process.Start(new ProcessStartInfo("http://dynamobim.org/") { UseShellExecute = true });
Process.Start(new ProcessStartInfo(Configuration.Configurations.DynamoSiteLink) { UseShellExecute = true });
}

private void CloseButton_OnClick(object sender, RoutedEventArgs e)
Expand Down
5 changes: 4 additions & 1 deletion src/DynamoCoreWpf/Views/Core/DynamoView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,11 @@
Command="{Binding GoToDictionaryCommand}">
</MenuItem>
<MenuItem Header="{x:Static p:Resources.DynamoViewHelpMenuGotoWebsite}"
Command="{Binding GoToSourceCodeCommand}"
Command="{Binding GoToWebsiteCommand}"
Name="ViewDynamoWebsite"/>
<MenuItem Header="{x:Static p:Resources.DynamoViewHelpMenuGotoRepo}"
Command="{Binding GoToSourceCodeCommand}"
Name="ViewDynamoRepo"/>
<MenuItem Header="{x:Static p:Resources.DynamoViewHelpMenuGotoWiki}"
Command="{Binding GoToWikiCommand}"
Name="ViewDynamoWiki"/>
Expand Down
Loading