chromelyapps / Chromely

Build Cross Platform HTML Desktop Apps on .NET using native GUI, HTML5, JavaScript, CSS, Owin, AspNetCore (MVC, RazorPages, Blazor)
MIT License
2.98k stars 279 forks source link

Show download progress #342

Closed peerem closed 3 years ago

peerem commented 3 years ago

How can we implement a download progress? We have installed the NuGet package 5.1.88 and the "ChromlyBasicApp" does not contain an overwritable function called "Configure", as described in the documentation.

mattkol commented 3 years ago

@peerem There is a difference between version 5.0 and 5.1 - https://github.com/chromelyapps/Chromely/issues/225

v5.0: https://github.com/chromelyapps/Chromely/blob/1f95b7d1475cd56bd9a50b1d8df7140e42810e22/src_5.0/Chromely/ChromelyBasicApp.cs#L17

v5.1 https://github.com/chromelyapps/Chromely/blob/542cd54d2a5452dd67d45aef0054f6187f17f809/src/Chromely.Core/ChromelyApp.cs#L28

So there is no "Configure" method in 5.1. There is "ConfigureServices". 5.1.88 is v5,1. You should be able to do practically all you do in Configure in ConfigureServices, but note that the container has changed.

See sample in demos https://github.com/chromelyapps/demo-projects/blob/860dfced1d22ca4004f3be593b3b7cc7f5395c54/regular-chromely/CrossPlatDemo/Program.cs#L40

peerem commented 3 years ago

That works well. Now I just have to find out how I can communicate with blazor.

mattkol commented 3 years ago

Ok.

peerem commented 3 years ago

The handling between this and Blazor is not so easy. Is there a way to open the system default browser for external links from Blazor? I have read something about "OnBeforeNavigation" in terms of Cefsharp, but no idea how I can use that in Chromely.