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

Feature Request: Restart button in settings window #521

Open
karpovv-boris opened this issue Mar 24, 2021 · 16 comments
Open

Feature Request: Restart button in settings window #521

karpovv-boris opened this issue Mar 24, 2021 · 16 comments
Assignees
Labels
Enhancement New feature or request

Comments

@karpovv-boris
Copy link
Contributor

When you change the app language, you see this notice:

Screenshot_1

But some of you expected this:

111616450-f52af280-87f2-11eb-9cc5-9790b98288d2

Given that the application has a host we could tweak a little in the code to implement this for restarting the client.

@prakharb5 prakharb5 added the Enhancement New feature or request label Mar 24, 2021
@karpovv-boris
Copy link
Contributor Author

So, I was trying to implement this, but stuck in RegisterApplicationRestart(...).
Which by the way works in this context (as it shows rmlogotest.exe):

How can I use RegisterApplicationRestart using pinvoke?

@Samuel12321 Samuel12321 added this to To do in 0.9.3 via automation Mar 24, 2021
@Samuel12321
Copy link
Member

This is something I have wanted to see for a while. Thanks @karpovv-boris for your help.

@Samuel12321
Copy link
Member

Should we move this button to beside the language change selection like powertoys?

@karpovv-boris
Copy link
Contributor Author

karpovv-boris commented Mar 24, 2021

@Samuel12321 it seems logical. Other settings are 'reactive'.
Right now this notice note says that there are other items in the settings that may also require you to restart the app. Which is not.
Screenshot_1

@Samuel12321
Copy link
Member

Any Updates @karpovv-boris, don't mean to bother you, just trying to plan the next few releases.

@Samuel12321 Samuel12321 added this to To do in 0.9.5 via automation Apr 8, 2021
@Samuel12321 Samuel12321 removed this from To do in 0.9.3 Apr 8, 2021
@karpovv-boris
Copy link
Contributor Author

Still no cracking this. I'm stuck at dllmain.LoadCLR() in ModernFlyoutBridge and I don't quite understand how this is called.

@ShankarBUS
Copy link
Member

Why do you go there? It is not necessary to look into the C++ side of the project. Everything you need is in the C# project.

@karpovv-boris
Copy link
Contributor Author

I mean, it literally says // But the process will exit after .NET CoreCLR shuts down anyway so... *shrug*. Am I at wrong direction?

@ShankarBUS
Copy link
Member

The C++ should be left untouch. It's purpose is only for loading the .NET project into a Microsoft Windows signed application.

You shouldn't modify it.

@Samuel12321
Copy link
Member

@ShankarBUS perhaps instead of telling him where not to look, you could give him some direction on the best way to do this. 😉

@ShankarBUS
Copy link
Member

Honestly, I am not sure. That's why I dropped the idea in first place.

I thought he might know something. I was just trying to tell him that the C++ project is not the right place.

@Samuel12321
Copy link
Member

Google seems to suggest:

using System.Diagnostics;
using System.Windows;
...
Process.Start(Process.GetCurrentProcess().MainModule.FileName);
Application.Current.Shutdown();

CommonCommands.ExitAppCommand
May also work

@ShankarBUS
Copy link
Member

Well wait a minute! Now I remember why I left this unimplemented. It is because every method that we know of start the application as unpackaged (like a normal exe), so, the app loses certain functionalities that require packaged privileges.

I tried every method I know, even the methods you two suggested. None of them will start the app as packaged.

@ShankarBUS
Copy link
Member

We depend on certain WinRT APIs that require a package identity such APIs are app data, startup task and some others. Starting the app as unpackaged will result in serious issues such as unavailability of app data and etc.

@Samuel12321
Copy link
Member

We may have to wait for reunion to make this possible, it seems like they are looking into solutions for this as part of their new lifecycle api's microsoft/WindowsAppSDK#111

@ShankarBUS
Copy link
Member

Yeah, let's hope so

@Samuel12321 Samuel12321 removed this from To do in 0.9.5 Apr 14, 2021
This was referenced Oct 7, 2021
@Samuel12321 Samuel12321 mentioned this issue Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants