mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[Settings] [VCM] Allow selecting a picture for VCM camera mute when running elevated (#24247)
* Fix the issue of not being able to select an image for VCM Camera mute while PowerToys is running elevated. * change the buffer size for Path and filename * move DLL import to native methods file * Adding comment to rember to move back to WinUI3 when it is fixed * making Dll Import methods internal * changes from comments * fix new c# errors * Remove async
This commit is contained in:
@@ -30,7 +30,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
|
||||
private Func<string, int> SendConfigMSG { get; }
|
||||
|
||||
private Func<Task<string>> PickFileDialog { get; }
|
||||
private Func<string> PickFileDialog { get; }
|
||||
|
||||
private string _settingsConfigFileFolder = string.Empty;
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
ISettingsRepository<GeneralSettings> settingsRepository,
|
||||
ISettingsRepository<VideoConferenceSettings> videoConferenceSettingsRepository,
|
||||
Func<string, int> ipcMSGCallBackFunc,
|
||||
Func<Task<string>> pickFileDialog,
|
||||
Func<string> pickFileDialog,
|
||||
string configFileSubfolder = "")
|
||||
{
|
||||
PickFileDialog = pickFileDialog;
|
||||
@@ -197,11 +197,11 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
RaisePropertyChanged(nameof(CameraImageOverlayPath));
|
||||
}
|
||||
|
||||
private async void SelectOverlayImageAction()
|
||||
private void SelectOverlayImageAction()
|
||||
{
|
||||
try
|
||||
{
|
||||
string pickedImage = await PickFileDialog().ConfigureAwait(true);
|
||||
string pickedImage = PickFileDialog();
|
||||
if (pickedImage != null)
|
||||
{
|
||||
CameraImageOverlayPath = pickedImage;
|
||||
|
||||
Reference in New Issue
Block a user