mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
[Docs] Update runner-ipc.md to fix broken links (#36994)
Update runner-ipc.md Fix broken file links.
This commit is contained in:
@@ -3,8 +3,8 @@
|
|||||||
The Settings v2 process uses two way IPC to communicate with the runner process.
|
The Settings v2 process uses two way IPC to communicate with the runner process.
|
||||||
|
|
||||||
## Initialization
|
## Initialization
|
||||||
- On the settings' side, the two way IPC delegates are contained with the [`ShellPage.xaml.cs`](/src/settings-ui/Settings.UI/Views/ShellPage.xaml.cs) file. The delegates are static and the views for all the powerToys send the ipc information to the viewmodels as `ShellPage.DefaultSndMSGCallBack`.
|
- On the settings' side, the two way IPC delegates are contained with the [`ShellPage.xaml.cs`](/src/settings-ui/Settings.UI/SettingsXAML/Views/ShellPage.xaml.cs) file. The delegates are static and the views for all the powerToys send the ipc information to the viewmodels as `ShellPage.DefaultSndMSGCallBack`.
|
||||||
- These delegates are initialized within the [`MainWindow.xaml.cs`](/src/settings-ui/Settings.UI/MainWindow.xaml.cs) file in the `Settings.Runner` project.
|
- These delegates are initialized within the [`MainWindow.xaml.cs`](/src/settings-ui/Settings.UI/SettingsXAML/MainWindow.xaml.cs) file in the `Settings.Runner` project.
|
||||||
|
|
||||||
|
|
||||||
## Types of IPC delegates
|
## Types of IPC delegates
|
||||||
@@ -14,12 +14,12 @@ The Settings v2 process uses two way IPC to communicate with the runner process.
|
|||||||
3. `CheckForUpdates`
|
3. `CheckForUpdates`
|
||||||
|
|
||||||
## Sending information to runner
|
## Sending information to runner
|
||||||
- The settings process communicates with the runner by using the delegates defined within the [`ShellPage.xaml.cs`](/src/settings-ui/Settings.UI/Views/ShellPage.xaml.cs) file.
|
- The settings process communicates with the runner by using the delegates defined within the [`ShellPage.xaml.cs`](/src/settings-ui/Settings.UI/SettingsXAML/Views/ShellPage.xaml.cs) file.
|
||||||
- Depending on the type of object sending the information, the json is created accordingly.
|
- Depending on the type of object sending the information, the json is created accordingly.
|
||||||
- If any information has been modified by the user in the GeneralSettings page, then the json file sent to the runner has the name set to `general`, whereas if any information has been modified by the user in any powertoy related settings page, the name of the json file being communicated with the runner is set to `powertoy`.
|
- If any information has been modified by the user in the GeneralSettings page, then the json file sent to the runner has the name set to `general`, whereas if any information has been modified by the user in any powertoy related settings page, the name of the json file being communicated with the runner is set to `powertoy`.
|
||||||
|
|
||||||
## Receiving information from runner
|
## Receiving information from runner
|
||||||
- The `ShellPage`object has a `IPCResponseHandleList` which is a list of functions which handle IPC responses.
|
- The `ShellPage` object has a `IPCResponseHandleList` which is a list of functions which handle IPC responses.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
// receive IPC Message
|
// receive IPC Message
|
||||||
@@ -43,4 +43,4 @@ Program.IPCMessageReceivedCallback = (string msg) =>
|
|||||||
```
|
```
|
||||||
|
|
||||||
- Whenever any information is sent from the runner each of the functions in the handle list perform their action on that json object.
|
- Whenever any information is sent from the runner each of the functions in the handle list perform their action on that json object.
|
||||||
- One example of where information sent from the runner is being processed by the settings is in [`GeneralPage.xaml.cs`](/src/settings-ui/Settings.UI/Views/GeneralPage.xaml.cs) when the user clicks the check for updates button. The information displayed after, such as the user has the latest version installed is a result of this handle.
|
- One example of where information sent from the runner is being processed by the settings is in [`GeneralPage.xaml.cs`](/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml.cs) when the user clicks the check for updates button. The information displayed after, such as the user has the latest version installed is a result of this handle.
|
||||||
|
|||||||
Reference in New Issue
Block a user