mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Add new VideoConference module for muting mic/cam (#11798)
* add new VideoConference module for muting mic/cam Co-authored-by: PrzemyslawTusinski <61138537+PrzemyslawTusinski@users.noreply.github.com> Co-authored-by: Niels Laute <niels.laute@live.nl>
This commit is contained in:
@@ -80,6 +80,22 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
}
|
||||
}
|
||||
|
||||
private bool videoConference = true;
|
||||
|
||||
[JsonPropertyName("Video Conference")]
|
||||
public bool VideoConference
|
||||
{
|
||||
get => this.videoConference;
|
||||
set
|
||||
{
|
||||
if (this.videoConference != value)
|
||||
{
|
||||
LogTelemetryEvent(value);
|
||||
this.videoConference = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool powerRename = true;
|
||||
|
||||
public bool PowerRename
|
||||
|
||||
@@ -58,4 +58,11 @@
|
||||
<ProjectReference Include="..\..\common\ManagedCommon\ManagedCommon.csproj" />
|
||||
<ProjectReference Include="..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Windows.Forms">
|
||||
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Windows.Forms.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
{
|
||||
public class SndVideoConferenceSettings
|
||||
{
|
||||
[JsonPropertyName("Video Conference")]
|
||||
public VideoConferenceSettings VideoConference { get; set; }
|
||||
|
||||
public SndVideoConferenceSettings(VideoConferenceSettings settings)
|
||||
{
|
||||
VideoConference = settings;
|
||||
}
|
||||
|
||||
public string ToJsonString()
|
||||
{
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
@@ -29,5 +30,15 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
{
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
|
||||
public static StringProperty ToStringProperty(string v)
|
||||
{
|
||||
return new StringProperty(v);
|
||||
}
|
||||
|
||||
public static implicit operator StringProperty(string v)
|
||||
{
|
||||
return new StringProperty(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
{
|
||||
public class VideoConferenceConfigProperties
|
||||
{
|
||||
public VideoConferenceConfigProperties()
|
||||
{
|
||||
this.MuteCameraAndMicrophoneHotkey = new KeyboardKeysProperty(
|
||||
new HotkeySettings()
|
||||
{
|
||||
Win = true,
|
||||
Ctrl = false,
|
||||
Alt = false,
|
||||
Shift = false,
|
||||
Key = "N",
|
||||
Code = 78,
|
||||
});
|
||||
|
||||
this.MuteMicrophoneHotkey = new KeyboardKeysProperty(
|
||||
new HotkeySettings()
|
||||
{
|
||||
Win = true,
|
||||
Ctrl = false,
|
||||
Alt = false,
|
||||
Shift = true,
|
||||
Key = "A",
|
||||
Code = 65,
|
||||
});
|
||||
|
||||
this.MuteCameraHotkey = new KeyboardKeysProperty(
|
||||
new HotkeySettings()
|
||||
{
|
||||
Win = true,
|
||||
Ctrl = false,
|
||||
Alt = false,
|
||||
Shift = true,
|
||||
Key = "O",
|
||||
Code = 79,
|
||||
});
|
||||
|
||||
this.HideToolbarWhenUnmuted = new BoolProperty(true);
|
||||
}
|
||||
|
||||
[JsonPropertyName("mute_camera_and_microphone_hotkey")]
|
||||
public KeyboardKeysProperty MuteCameraAndMicrophoneHotkey { get; set; }
|
||||
|
||||
[JsonPropertyName("mute_microphone_hotkey")]
|
||||
public KeyboardKeysProperty MuteMicrophoneHotkey { get; set; }
|
||||
|
||||
[JsonPropertyName("mute_camera_hotkey")]
|
||||
public KeyboardKeysProperty MuteCameraHotkey { get; set; }
|
||||
|
||||
[JsonPropertyName("selected_camera")]
|
||||
public StringProperty SelectedCamera { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("selected_mic")]
|
||||
public StringProperty SelectedMicrophone { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("toolbar_position")]
|
||||
public StringProperty ToolbarPosition { get; set; } = "Top right corner";
|
||||
|
||||
[JsonPropertyName("toolbar_monitor")]
|
||||
public StringProperty ToolbarMonitor { get; set; } = "Main monitor";
|
||||
|
||||
[JsonPropertyName("camera_overlay_image_path")]
|
||||
public StringProperty CameraOverlayImagePath { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("theme")]
|
||||
public StringProperty Theme { get; set; }
|
||||
|
||||
[JsonPropertyName("hide_toolbar_when_unmuted")]
|
||||
public BoolProperty HideToolbarWhenUnmuted { get; set; }
|
||||
|
||||
// converts the current to a json string.
|
||||
public string ToJsonString()
|
||||
{
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
{
|
||||
public class VideoConferenceSettings : BasePTModuleSettings, ISettingsConfig
|
||||
{
|
||||
public VideoConferenceSettings()
|
||||
{
|
||||
Version = "1";
|
||||
Name = "Video Conference";
|
||||
Properties = new VideoConferenceConfigProperties();
|
||||
}
|
||||
|
||||
[JsonPropertyName("properties")]
|
||||
public VideoConferenceConfigProperties Properties { get; set; }
|
||||
|
||||
public string GetModuleName()
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
|
||||
public bool UpgradeSettingsConfiguration()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
{
|
||||
public class VideoConferenceSettingsIPCMessage
|
||||
{
|
||||
[JsonPropertyName("powertoys")]
|
||||
public SndVideoConferenceSettings Powertoys { get; set; }
|
||||
|
||||
public VideoConferenceSettingsIPCMessage()
|
||||
{
|
||||
}
|
||||
|
||||
public VideoConferenceSettingsIPCMessage(SndVideoConferenceSettings settings)
|
||||
{
|
||||
this.Powertoys = settings;
|
||||
}
|
||||
|
||||
public string ToJsonString()
|
||||
{
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,432 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.ViewModels.Commands;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
{
|
||||
public class VideoConferenceViewModel : Observable
|
||||
{
|
||||
private readonly ISettingsUtils _settingsUtils;
|
||||
|
||||
private VideoConferenceSettings Settings { get; set; }
|
||||
|
||||
private GeneralSettings GeneralSettingsConfig { get; set; }
|
||||
|
||||
private const string ModuleName = "Video Conference";
|
||||
|
||||
private Func<string, int> SendConfigMSG { get; }
|
||||
|
||||
private string _settingsConfigFileFolder = string.Empty;
|
||||
|
||||
public VideoConferenceViewModel(ISettingsUtils settingsUtils, ISettingsRepository<GeneralSettings> settingsRepository, Func<string, int> ipcMSGCallBackFunc, string configFileSubfolder = "")
|
||||
{
|
||||
if (settingsRepository == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(settingsRepository));
|
||||
}
|
||||
|
||||
GeneralSettingsConfig = settingsRepository.SettingsConfig;
|
||||
|
||||
_settingsUtils = settingsUtils ?? throw new ArgumentNullException(nameof(settingsUtils));
|
||||
|
||||
SendConfigMSG = ipcMSGCallBackFunc;
|
||||
|
||||
_settingsConfigFileFolder = configFileSubfolder;
|
||||
|
||||
try
|
||||
{
|
||||
Settings = _settingsUtils.GetSettings<VideoConferenceSettings>(GetSettingsSubPath());
|
||||
}
|
||||
#pragma warning disable CA1031 // Do not catch general exception types
|
||||
catch
|
||||
#pragma warning restore CA1031 // Do not catch general exception types
|
||||
{
|
||||
Settings = new VideoConferenceSettings();
|
||||
_settingsUtils.SaveSettings(Settings.ToJsonString(), GetSettingsSubPath());
|
||||
}
|
||||
|
||||
CameraNames = interop.CommonManaged.GetAllVideoCaptureDeviceNames();
|
||||
MicrophoneNames = interop.CommonManaged.GetAllActiveMicrophoneDeviceNames();
|
||||
MicrophoneNames.Insert(0, "[All]");
|
||||
|
||||
var shouldSaveSettings = false;
|
||||
|
||||
if (string.IsNullOrEmpty(Settings.Properties.SelectedCamera.Value) && CameraNames.Count != 0)
|
||||
{
|
||||
_selectedCameraIndex = 0;
|
||||
Settings.Properties.SelectedCamera.Value = CameraNames[0];
|
||||
shouldSaveSettings = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_selectedCameraIndex = CameraNames.FindIndex(name => name == Settings.Properties.SelectedCamera.Value);
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(Settings.Properties.SelectedMicrophone.Value))
|
||||
{
|
||||
_selectedMicrophoneIndex = 0;
|
||||
Settings.Properties.SelectedMicrophone.Value = MicrophoneNames[0];
|
||||
shouldSaveSettings = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_selectedMicrophoneIndex = MicrophoneNames.FindIndex(name => name == Settings.Properties.SelectedMicrophone.Value);
|
||||
}
|
||||
|
||||
_isEnabled = GeneralSettingsConfig.Enabled.VideoConference;
|
||||
_cameraAndMicrophoneMuteHotkey = Settings.Properties.MuteCameraAndMicrophoneHotkey.Value;
|
||||
_mirophoneMuteHotkey = Settings.Properties.MuteMicrophoneHotkey.Value;
|
||||
_cameraMuteHotkey = Settings.Properties.MuteCameraHotkey.Value;
|
||||
CameraImageOverlayPath = Settings.Properties.CameraOverlayImagePath.Value;
|
||||
SelectOverlayImage = new ButtonClickCommand(SelectOverlayImageAction);
|
||||
ClearOverlayImage = new ButtonClickCommand(ClearOverlayImageAction);
|
||||
|
||||
_hideToolbarWhenUnmuted = Settings.Properties.HideToolbarWhenUnmuted.Value;
|
||||
|
||||
switch (Settings.Properties.ToolbarPosition.Value)
|
||||
{
|
||||
case "Top left corner":
|
||||
_toolbarPositionIndex = 0;
|
||||
break;
|
||||
case "Top center":
|
||||
_toolbarPositionIndex = 1;
|
||||
break;
|
||||
case "Top right corner":
|
||||
_toolbarPositionIndex = 2;
|
||||
break;
|
||||
case "Bottom left corner":
|
||||
_toolbarPositionIndex = 3;
|
||||
break;
|
||||
case "Bottom center":
|
||||
_toolbarPositionIndex = 4;
|
||||
break;
|
||||
case "Bottom right corner":
|
||||
_toolbarPositionIndex = 5;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (Settings.Properties.ToolbarMonitor.Value)
|
||||
{
|
||||
case "Main monitor":
|
||||
_toolbarMonitorIndex = 0;
|
||||
break;
|
||||
|
||||
case "All monitors":
|
||||
_toolbarMonitorIndex = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (shouldSaveSettings)
|
||||
{
|
||||
_settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName);
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isEnabled;
|
||||
private int _toolbarPositionIndex;
|
||||
private int _toolbarMonitorIndex;
|
||||
private HotkeySettings _cameraAndMicrophoneMuteHotkey;
|
||||
private HotkeySettings _mirophoneMuteHotkey;
|
||||
private HotkeySettings _cameraMuteHotkey;
|
||||
private int _selectedCameraIndex = -1;
|
||||
private int _selectedMicrophoneIndex;
|
||||
private bool _hideToolbarWhenUnmuted;
|
||||
|
||||
public List<string> CameraNames { get; }
|
||||
|
||||
public List<string> MicrophoneNames { get; }
|
||||
|
||||
public string CameraImageOverlayPath { get; set; }
|
||||
|
||||
public ButtonClickCommand SelectOverlayImage { get; set; }
|
||||
|
||||
public ButtonClickCommand ClearOverlayImage { get; set; }
|
||||
|
||||
private void ClearOverlayImageAction()
|
||||
{
|
||||
CameraImageOverlayPath = string.Empty;
|
||||
Settings.Properties.CameraOverlayImagePath = string.Empty;
|
||||
RaisePropertyChanged(nameof(CameraImageOverlayPath));
|
||||
}
|
||||
|
||||
private void SelectOverlayImageAction()
|
||||
{
|
||||
try
|
||||
{
|
||||
string pickedImage = null;
|
||||
using (OpenFileDialog openFileDialog = new OpenFileDialog())
|
||||
{
|
||||
openFileDialog.Filter = "Image Files (*.jpeg;*.jpg;*.png)|*.jpeg;*.jpg;*.png";
|
||||
openFileDialog.RestoreDirectory = true;
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
pickedImage = openFileDialog.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
if (pickedImage != null)
|
||||
{
|
||||
CameraImageOverlayPath = pickedImage;
|
||||
Settings.Properties.CameraOverlayImagePath = pickedImage;
|
||||
RaisePropertyChanged(nameof(CameraImageOverlayPath));
|
||||
}
|
||||
}
|
||||
#pragma warning disable CA1031 // Do not catch general exception types
|
||||
catch
|
||||
#pragma warning restore CA1031 // Do not catch general exception types
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public int SelectedCameraIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return _selectedCameraIndex;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (_selectedCameraIndex != value)
|
||||
{
|
||||
_selectedCameraIndex = value;
|
||||
if (_selectedCameraIndex >= 0 && _selectedCameraIndex < CameraNames.Count)
|
||||
{
|
||||
Settings.Properties.SelectedCamera.Value = CameraNames[_selectedCameraIndex];
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int SelectedMicrophoneIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return _selectedMicrophoneIndex;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (_selectedMicrophoneIndex != value)
|
||||
{
|
||||
_selectedMicrophoneIndex = value;
|
||||
if (_selectedMicrophoneIndex >= 0 && _selectedMicrophoneIndex < MicrophoneNames.Count)
|
||||
{
|
||||
Settings.Properties.SelectedMicrophone.Value = MicrophoneNames[_selectedMicrophoneIndex];
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isEnabled;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _isEnabled)
|
||||
{
|
||||
_isEnabled = value;
|
||||
GeneralSettingsConfig.Enabled.VideoConference = value;
|
||||
OutGoingGeneralSettings snd = new OutGoingGeneralSettings(GeneralSettingsConfig);
|
||||
|
||||
SendConfigMSG(snd.ToString());
|
||||
OnPropertyChanged(nameof(IsEnabled));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsElevated
|
||||
{
|
||||
get
|
||||
{
|
||||
return GeneralSettingsConfig.IsElevated;
|
||||
}
|
||||
}
|
||||
|
||||
public HotkeySettings CameraAndMicrophoneMuteHotkey
|
||||
{
|
||||
get
|
||||
{
|
||||
return _cameraAndMicrophoneMuteHotkey;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _cameraAndMicrophoneMuteHotkey)
|
||||
{
|
||||
_cameraAndMicrophoneMuteHotkey = value;
|
||||
Settings.Properties.MuteCameraAndMicrophoneHotkey.Value = value;
|
||||
RaisePropertyChanged(nameof(CameraAndMicrophoneMuteHotkey));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HotkeySettings MicrophoneMuteHotkey
|
||||
{
|
||||
get
|
||||
{
|
||||
return _mirophoneMuteHotkey;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _mirophoneMuteHotkey)
|
||||
{
|
||||
_mirophoneMuteHotkey = value;
|
||||
Settings.Properties.MuteMicrophoneHotkey.Value = value;
|
||||
RaisePropertyChanged(nameof(MicrophoneMuteHotkey));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HotkeySettings CameraMuteHotkey
|
||||
{
|
||||
get
|
||||
{
|
||||
return _cameraMuteHotkey;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _cameraMuteHotkey)
|
||||
{
|
||||
_cameraMuteHotkey = value;
|
||||
Settings.Properties.MuteCameraHotkey.Value = value;
|
||||
RaisePropertyChanged(nameof(CameraMuteHotkey));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int ToolbarPostionIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return _toolbarPositionIndex;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (_toolbarPositionIndex != value)
|
||||
{
|
||||
_toolbarPositionIndex = value;
|
||||
switch (_toolbarPositionIndex)
|
||||
{
|
||||
case 0:
|
||||
Settings.Properties.ToolbarPosition.Value = "Top left corner";
|
||||
break;
|
||||
|
||||
case 1:
|
||||
Settings.Properties.ToolbarPosition.Value = "Top center";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
Settings.Properties.ToolbarPosition.Value = "Top right corner";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
Settings.Properties.ToolbarPosition.Value = "Bottom left corner";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
Settings.Properties.ToolbarPosition.Value = "Bottom center";
|
||||
break;
|
||||
|
||||
case 5:
|
||||
Settings.Properties.ToolbarPosition.Value = "Bottom right corner";
|
||||
break;
|
||||
}
|
||||
|
||||
RaisePropertyChanged(nameof(ToolbarPostionIndex));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int ToolbarMonitorIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return _toolbarMonitorIndex;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (_toolbarMonitorIndex != value)
|
||||
{
|
||||
_toolbarMonitorIndex = value;
|
||||
switch (_toolbarMonitorIndex)
|
||||
{
|
||||
case 0:
|
||||
Settings.Properties.ToolbarMonitor.Value = "Main monitor";
|
||||
break;
|
||||
|
||||
case 1:
|
||||
Settings.Properties.ToolbarMonitor.Value = "All monitors";
|
||||
break;
|
||||
}
|
||||
|
||||
RaisePropertyChanged(nameof(ToolbarMonitorIndex));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool HideToolbarWhenUnmuted
|
||||
{
|
||||
get
|
||||
{
|
||||
return _hideToolbarWhenUnmuted;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _hideToolbarWhenUnmuted)
|
||||
{
|
||||
_hideToolbarWhenUnmuted = value;
|
||||
Settings.Properties.HideToolbarWhenUnmuted.Value = value;
|
||||
RaisePropertyChanged(nameof(HideToolbarWhenUnmuted));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string GetSettingsSubPath()
|
||||
{
|
||||
return _settingsConfigFileFolder + "\\" + ModuleName;
|
||||
}
|
||||
|
||||
#pragma warning disable CA1030 // Use events where appropriate
|
||||
public void RaisePropertyChanged([CallerMemberName] string propertyName = null)
|
||||
#pragma warning restore CA1030 // Use events where appropriate
|
||||
{
|
||||
OnPropertyChanged(propertyName);
|
||||
SndVideoConferenceSettings outsettings = new SndVideoConferenceSettings(Settings);
|
||||
SndModuleSettings<SndVideoConferenceSettings> ipcMessage = new SndModuleSettings<SndVideoConferenceSettings>(outsettings);
|
||||
|
||||
SendConfigMSG(ipcMessage.ToJsonString());
|
||||
}
|
||||
}
|
||||
|
||||
[ComImport]
|
||||
[Guid("3E68D4BD-7135-4D10-8018-9FB6D9F33FA1")]
|
||||
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
public interface IInitializeWithWindow
|
||||
{
|
||||
void Initialize(IntPtr hwnd);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user