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

Add Trust Warning Learning Content inside Dynamo #13229

Merged
merged 2 commits into from
Aug 19, 2022
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
196 changes: 196 additions & 0 deletions src/DynamoCoreWpf/Controls/Docs/FileTrustWarningDocumentation.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/DynamoCoreWpf/DynamoCoreWpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -1543,6 +1543,7 @@
<Resource Include="UI\Images\up-hover-16px.png" />
<Resource Include="UI\Images\link-16px.png" />
<EmbeddedResource Include="Controls\Docs\NodeAutocompleteDocumentation.html" />
<EmbeddedResource Include="Controls\Docs\FileTrustWarningDocumentation.html" />
<Content Include="sharpdx_direct3d11_effects_x64.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand Down
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.

3 changes: 3 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2407,6 +2407,9 @@ Do you wish to uninstall {1}? Restart {2} to complete the uninstall and try down
<data name="NodeAutocompleteDocumentationUriString" xml:space="preserve">
<value>DynamoCoreWpf;NodeAutocompleteDocumentation.html</value>
</data>
<data name="FileTrustWarningDocumentationUriString" xml:space="preserve">
<value>DynamoCoreWpf;FileTrustWarningDocumentation.html</value>
</data>
<data name="PreferencesViewEnableNodeAutoCompleteTooltipText" xml:space="preserve">
<value>Learn more about Node Autocomplete feature.</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2622,6 +2622,9 @@ Do you wish to uninstall {1}? Restart {2} to complete the uninstall and try down
<data name="NodeAutocompleteDocumentationUriString" xml:space="preserve">
<value>DynamoCoreWpf;NodeAutocompleteDocumentation.html</value>
</data>
<data name="FileTrustWarningDocumentationUriString" xml:space="preserve">
<value>DynamoCoreWpf;FileTrustWarningDocumentation.html</value>
</data>
<data name="PreferencesViewEnableNodeAutoCompleteTooltipText" xml:space="preserve">
<value>Learn more about Node Autocomplete feature.</value>
</data>
Expand Down
20 changes: 13 additions & 7 deletions src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -924,17 +924,23 @@
Margin="10,0,0,0"
VerticalAlignment="Center"
Foreground="{StaticResource PreferencesWindowFontColor}"/>
<Label HorizontalAlignment="Left"
Name="TrustWarningInfoLabel"
VerticalAlignment="Center"
Height="26"
Width="53"
Margin="0 3 0 0" >
<Label HorizontalAlignment="Left"
Name="TrustWarningInfoLabel"
VerticalAlignment="Center"
Height="26"
Width="53"
Margin="0 3 0 0"
MouseLeftButtonDown="OnMoreInfoClicked">
<Label.ToolTip>
<ToolTip Content="{x:Static p:Resources.PreferencesViewTrustWarningTooltipText}" Style="{StaticResource GenericToolTipLight}"/>
</Label.ToolTip>
<Label.Content>
<fa:ImageAwesome Width="15" Height="15" VerticalAlignment="Bottom" HorizontalAlignment="Left" Icon="QuestionCircleOutline" Foreground="{StaticResource PreferencesWindowFontColor}"/>
<fa:ImageAwesome Width="15"
Height="15"
VerticalAlignment="Bottom"
HorizontalAlignment="Left"
Icon="QuestionCircleOutline"
Foreground="{StaticResource PreferencesWindowFontColor}"/>
</Label.Content>
</Label>
</StackPanel>
Expand Down
18 changes: 17 additions & 1 deletion src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,25 @@ private void Log(string message)
Log(LogMessage.Info(message));
}

/// <summary>
/// Unified handler for more info request from mouse left button click
/// </summary>
/// <param name="sender">sender control</param>
/// <param name="e"></param>
private void OnMoreInfoClicked(object sender, RoutedEventArgs e)
{
dynViewModel.OpenDocumentationLinkCommand.Execute(new OpenDocumentationLinkEventArgs(new Uri(Wpf.Properties.Resources.NodeAutocompleteDocumentationUriString, UriKind.Relative)));
if (sender is Label lable)
{
if (lable.Name == "Titleinfo")
{
dynViewModel.OpenDocumentationLinkCommand.Execute(new OpenDocumentationLinkEventArgs(new Uri(Wpf.Properties.Resources.NodeAutocompleteDocumentationUriString, UriKind.Relative)));
}
else if (lable.Name == "TrustWarningInfoLabel")
{
dynViewModel.OpenDocumentationLinkCommand.Execute(new OpenDocumentationLinkEventArgs(new Uri(Wpf.Properties.Resources.FileTrustWarningDocumentationUriString, UriKind.Relative)));

}
}
}

private void ReloadCPython_Click(object sender, RoutedEventArgs e)
Expand Down