jamesmontemagno / MyStreamTimer

A cool app to count up or down that writes text to file for streamers
https://www.mystreamtimer.com
103 stars 24 forks source link

mystreamtimer://countdown/?to=15:30 only works if application is not open #28

Closed isctylr closed 3 years ago

isctylr commented 4 years ago

on UWP, if the application is already open, calling the command does nothing. If it's closed, it works as expected. I'm hoping to automate the beginning of a countdown, but I can't guarantee that the application will be open or closed when the command is called.

jamesmontemagno commented 4 years ago

correct, yeah you have to close it on Windows. I am looking into a way to make this happen like it does on macOS

isctylr commented 4 years ago

https://docs.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.Activation.ProtocolActivatedEventArgs

jamesmontemagno commented 4 years ago

Yeah, it is a bit odd cause it is a WPF app actually in an MSIX container which is how I get protocals. So I don't have UWP apis. The protocol will open a new instance so i have to block that -> https://github.com/jamesmontemagno/MyStreamTimer/blob/master/MyStreamTimer.WPF/App.xaml.cs#L22 however, i think i can pass the info back to the original instance some how.

isctylr commented 4 years ago

Okay. (Thanks for talking me through this as I have no wpf experience.) So something like this probably isn't the right step then: https://docs.microsoft.com/en-us/windows/uwp/csharp-winrt/ ? I'll take a look at passing information between instances too.

jamesmontemagno commented 4 years ago

I may convert it over to UWP in the near future though and use Xamarin.Forms since I use that on macOS. I was using WPF on .NET Core 3 just to test some things out and use some nice styling.

But yeah, may look at that and see if i can pass the info around. Thanks for the links!

jamesmontemagno commented 4 years ago

Have just implemented this in the next version! <3

ralbright-wa commented 4 years ago

Very interested in this next version. I am running this for a virtual conference and having it countdown to the top of the hour is a huge bonus. Thank you.