Skip to content

Commit

Permalink
Add publish message box regarding package scans (#13250)
Browse files Browse the repository at this point in the history
* Update PublishPackageViewModel.cs
  • Loading branch information
zeusongit authored Aug 26, 2022
1 parent adac54c commit 79ebac3
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 1 deletion.
18 changes: 18 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: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3290,4 +3290,10 @@ You can manage this in Preferences -&gt; Security.</value>
<data name="InfectedPackageErrorString" xml:space="preserve">
<value>Upload Error</value>
</data>
<data name="PrePackagePublishMessage" xml:space="preserve">
<value>Your package will be scanned for viruses, and will be available for download once it successfully passes the scan.</value>
</data>
<data name="PrePackagePublishTitle" xml:space="preserve">
<value>Package Upload Scan</value>
</data>
</root>
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3277,4 +3277,10 @@ You can manage this in Preferences -&gt; Security.</value>
<data name="InfectedPackageErrorString" xml:space="preserve">
<value>Upload Error</value>
</data>
<data name="PrePackagePublishMessage" xml:space="preserve">
<value>Your package will be scanned for viruses, and will be available for download once it successfully passes the scan.</value>
</data>
<data name="PrePackagePublishTitle" xml:space="preserve">
<value>Package Upload Scan</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ public HostComboboxEntry(string hostName)
IsSelected = false;
}
}


public PublishPackageView Owner { get; set; }

/// <summary>
/// A event called when publishing was a success
/// </summary>
Expand Down Expand Up @@ -1477,6 +1479,11 @@ private void AddDllFile(string filename)
/// Delegate used to submit the publish online request</summary>
private void Submit()
{
MessageBoxResult response = DynamoModel.IsTestMode ? MessageBoxResult.OK : MessageBoxService.Show(Owner, Resources.PrePackagePublishMessage, Resources.PrePackagePublishTitle, MessageBoxButton.OKCancel, MessageBoxImage.Information);
if (response == MessageBoxResult.Cancel)
{
return;
}
var files = BuildPackage();
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public PublishPackageView(PublishPackageViewModel publishPackageViewModel)
DataContext = publishPackageViewModel;
PublishPackageViewModel = publishPackageViewModel;
publishPackageViewModel.PublishSuccess += PackageViewModelOnPublishSuccess;
publishPackageViewModel.Owner = this;

InitializeComponent();

Expand Down

0 comments on commit 79ebac3

Please sign in to comment.