mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
[VCM]Deprecate the Video Conference Mute utility (#36772)
* Remove all VideoConferenceMute related code and files * Clean up vcm driver registry keys * Also remove the Webcam report tool * Also clean out video conference on the installer * Fix spellcheck * Remove comment about video conf * Update gpo files revision * Revert removing the VCM policies * Deprecate VCM GPO policy * Change deprecation message to show first supported version * Tweak supported strings in the adml
This commit is contained in:
@@ -440,7 +440,6 @@ namespace Microsoft.PowerToys.Settings.UI
|
||||
case "FileExplorer": return typeof(PowerPreviewPage);
|
||||
case "ShortcutGuide": return typeof(ShortcutGuidePage);
|
||||
case "PowerOcr": return typeof(PowerOcrPage);
|
||||
case "VideoConference": return typeof(VideoConferencePage);
|
||||
case "MeasureTool": return typeof(MeasureToolPage);
|
||||
case "Hosts": return typeof(HostsPage);
|
||||
case "RegistryPreview": return typeof(RegistryPreviewPage);
|
||||
|
||||
@@ -157,10 +157,6 @@
|
||||
x:Uid="Shell_TextExtractor"
|
||||
Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/TextExtractor.png}"
|
||||
Tag="TextExtractor" />
|
||||
<NavigationViewItem
|
||||
x:Uid="Shell_VideoConference"
|
||||
Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/VideoConferenceMute.png}"
|
||||
Tag="VideoConference" />
|
||||
<NavigationViewItem
|
||||
x:Uid="Shell_Workspaces"
|
||||
Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/Workspaces.png}"
|
||||
|
||||
@@ -174,12 +174,6 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
IsNew = false,
|
||||
});
|
||||
|
||||
Modules.Insert((int)PowerToysModules.VideoConference, new OobePowerToysModule()
|
||||
{
|
||||
ModuleName = "VideoConference",
|
||||
IsNew = false,
|
||||
});
|
||||
|
||||
Modules.Insert((int)PowerToysModules.MeasureTool, new OobePowerToysModule()
|
||||
{
|
||||
ModuleName = "MeasureTool",
|
||||
@@ -286,7 +280,6 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
case "FileExplorer": NavigationFrame.Navigate(typeof(OobeFileExplorer)); break;
|
||||
case "ShortcutGuide": NavigationFrame.Navigate(typeof(OobeShortcutGuide)); break;
|
||||
case "TextExtractor": NavigationFrame.Navigate(typeof(OobePowerOCR)); break;
|
||||
case "VideoConference": NavigationFrame.Navigate(typeof(OobeVideoConference)); break;
|
||||
case "MouseUtils": NavigationFrame.Navigate(typeof(OobeMouseUtils)); break;
|
||||
case "MouseWithoutBorders": NavigationFrame.Navigate(typeof(OobeMouseWithoutBorders)); break;
|
||||
case "MeasureTool": NavigationFrame.Navigate(typeof(OobeMeasureTool)); break;
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
<Page
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeVideoConference"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:tk7controls="using:CommunityToolkit.WinUI.UI.Controls"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<controls:OOBEPageControl x:Uid="Oobe_VideoConference" HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/VideoConferenceMute.png">
|
||||
<controls:OOBEPageControl.PageContent>
|
||||
<StackPanel Orientation="Vertical" Spacing="12">
|
||||
<TextBlock x:Uid="Oobe_HowToLaunch" Style="{ThemeResource OobeSubtitleStyle}" />
|
||||
|
||||
<StackPanel>
|
||||
<controls:ShortcutWithTextLabelControl x:Name="HotkeyMicVidControl" x:Uid="Oobe_VideoConference_ToggleMicVid" />
|
||||
<controls:ShortcutWithTextLabelControl x:Name="HotkeyMicControl" x:Uid="Oobe_VideoConference_ToggleMic" />
|
||||
<controls:ShortcutWithTextLabelControl x:Name="HotkeyPushToTalkControl" x:Uid="Oobe_VideoConference_PushToTalkMic" />
|
||||
<controls:ShortcutWithTextLabelControl x:Name="HotkeyVidControl" x:Uid="Oobe_VideoConference_ToggleVid" />
|
||||
</StackPanel>
|
||||
|
||||
<tk7controls:MarkdownTextBlock x:Uid="Oobe_VideoConference_HowToLaunch" Background="Transparent" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<Button x:Uid="OOBE_Settings" Click="SettingsLaunchButton_Click" />
|
||||
|
||||
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_VideoConference" Style="{StaticResource TextButtonStyle}">
|
||||
<TextBlock x:Uid="LearnMore_VCM" TextWrapping="Wrap" />
|
||||
</HyperlinkButton>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</controls:OOBEPageControl.PageContent>
|
||||
</controls:OOBEPageControl>
|
||||
</Page>
|
||||
@@ -1,52 +0,0 @@
|
||||
// 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 Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.PowerToys.Settings.UI.OOBE.Enums;
|
||||
using Microsoft.PowerToys.Settings.UI.OOBE.ViewModel;
|
||||
using Microsoft.PowerToys.Settings.UI.Views;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class OobeVideoConference : Page
|
||||
{
|
||||
public OobePowerToysModule ViewModel { get; set; }
|
||||
|
||||
public OobeVideoConference()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
ViewModel = new OobePowerToysModule(OobeShellPage.OobeShellHandler.Modules[(int)PowerToysModules.VideoConference]);
|
||||
DataContext = ViewModel;
|
||||
}
|
||||
|
||||
private void SettingsLaunchButton_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
if (OobeShellPage.OpenMainWindowCallback != null)
|
||||
{
|
||||
OobeShellPage.OpenMainWindowCallback(typeof(VideoConferencePage));
|
||||
}
|
||||
|
||||
ViewModel.LogOpeningSettingsEvent();
|
||||
}
|
||||
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
ViewModel.LogOpeningModuleEvent();
|
||||
HotkeyMicVidControl.Keys = SettingsRepository<VideoConferenceSettings>.GetInstance(new SettingsUtils()).SettingsConfig.Properties.MuteCameraAndMicrophoneHotkey.Value.GetKeysList();
|
||||
HotkeyMicControl.Keys = SettingsRepository<VideoConferenceSettings>.GetInstance(new SettingsUtils()).SettingsConfig.Properties.MuteMicrophoneHotkey.Value.GetKeysList();
|
||||
HotkeyPushToTalkControl.Keys = SettingsRepository<VideoConferenceSettings>.GetInstance(new SettingsUtils()).SettingsConfig.Properties.PushToTalkMicrophoneHotkey.Value.GetKeysList();
|
||||
HotkeyVidControl.Keys = SettingsRepository<VideoConferenceSettings>.GetInstance(new SettingsUtils()).SettingsConfig.Properties.MuteCameraHotkey.Value.GetKeysList();
|
||||
}
|
||||
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
ViewModel.LogClosingModuleEvent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -191,12 +191,6 @@
|
||||
x:Uid="Shell_QuickAccent"
|
||||
helpers:NavHelper.NavigateTo="views:PowerAccentPage"
|
||||
Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/QuickAccent.png}" />
|
||||
<!-- Mouse pointer cross hair -->
|
||||
<NavigationViewItem
|
||||
x:Uid="Shell_VideoConference"
|
||||
helpers:NavHelper.NavigateTo="views:VideoConferencePage"
|
||||
Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/VideoConferenceMute.png}"
|
||||
IsEnabled="{x:Bind ViewModel.IsVideoConferenceBuild, Mode=OneWay}" />
|
||||
</NavigationViewItem.MenuItems>
|
||||
</NavigationViewItem>
|
||||
|
||||
|
||||
@@ -1,171 +0,0 @@
|
||||
<Page
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.VideoConferencePage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:tkcontrols="using:CommunityToolkit.WinUI.Controls"
|
||||
xmlns:tkconverters="using:CommunityToolkit.WinUI.Converters"
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Page.Resources>
|
||||
<tkconverters:StringVisibilityConverter
|
||||
x:Name="EmptyToCollapsedConverter"
|
||||
EmptyValue="Collapsed"
|
||||
NotEmptyValue="Visible" />
|
||||
<tkconverters:StringVisibilityConverter
|
||||
x:Name="EmptyToBoolConverter"
|
||||
EmptyValue="False"
|
||||
NotEmptyValue="True" />
|
||||
</Page.Resources>
|
||||
|
||||
<controls:SettingsPageControl x:Uid="VideoConference" ModuleImageSource="ms-appx:///Assets/Settings/Modules/VideoConference.png">
|
||||
<controls:SettingsPageControl.ModuleContent>
|
||||
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
|
||||
<InfoBar
|
||||
x:Uid="VideoConference_DeprecationWarning"
|
||||
IsClosable="False"
|
||||
IsOpen="True"
|
||||
IsTabStop="True"
|
||||
Severity="Informational">
|
||||
<InfoBar.ActionButton>
|
||||
<HyperlinkButton
|
||||
x:Uid="VideoConference_DeprecationWarningButton"
|
||||
HorizontalAlignment="Right"
|
||||
NavigateUri="https://github.com/microsoft/PowerToys/issues/21473"
|
||||
Style="{StaticResource TextButtonStyle}" />
|
||||
</InfoBar.ActionButton>
|
||||
</InfoBar>
|
||||
|
||||
<tkcontrols:SettingsCard
|
||||
x:Uid="VideoConference_Enable"
|
||||
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/VideoConferenceMute.png}"
|
||||
IsEnabled="{x:Bind ViewModel.IsElevated, Mode=OneWay}">
|
||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
|
||||
</tkcontrols:SettingsCard>
|
||||
<InfoBar
|
||||
x:Uid="VideoConference_RunAsAdminRequired"
|
||||
IsClosable="False"
|
||||
IsOpen="{x:Bind ViewModel.IsElevated, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}"
|
||||
IsTabStop="True"
|
||||
Severity="Informational" />
|
||||
<InfoBar
|
||||
x:Uid="GPO_SettingIsManaged"
|
||||
IsClosable="False"
|
||||
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
|
||||
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
|
||||
Severity="Informational" />
|
||||
<controls:SettingsGroup x:Uid="VideoConference_Shortcuts" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
||||
<tkcontrols:SettingsCard x:Uid="VideoConference_CameraAndMicrophoneMuteHotkeyControl_Header">
|
||||
<controls:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind ViewModel.CameraAndMicrophoneMuteHotkey, Mode=TwoWay}" />
|
||||
</tkcontrols:SettingsCard>
|
||||
|
||||
<tkcontrols:SettingsCard x:Uid="VideoConference_MicrophoneMuteHotkeyControl_Header">
|
||||
<controls:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind ViewModel.MicrophoneMuteHotkey, Mode=TwoWay}" />
|
||||
</tkcontrols:SettingsCard>
|
||||
|
||||
<tkcontrols:SettingsCard x:Uid="VideoConference_MicrophonePushToTalkHotkeyControl_Header">
|
||||
<controls:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind ViewModel.MicrophonePushToTalkHotkey, Mode=TwoWay}" />
|
||||
</tkcontrols:SettingsCard>
|
||||
|
||||
<tkcontrols:SettingsCard x:Uid="VideoConference_CameraMuteHotkeyControl_Header">
|
||||
<controls:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind ViewModel.CameraMuteHotkey, Mode=TwoWay}" />
|
||||
</tkcontrols:SettingsCard>
|
||||
</controls:SettingsGroup>
|
||||
|
||||
<controls:SettingsGroup x:Uid="VideoConference_Microphone" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
||||
<tkcontrols:SettingsCard x:Uid="VideoConference_SelectedMicrophone" HeaderIcon="{ui:FontIcon Glyph=}">
|
||||
<ComboBox
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
ItemsSource="{x:Bind ViewModel.MicrophoneNames, Mode=OneTime}"
|
||||
SelectedIndex="{x:Bind ViewModel.SelectedMicrophoneIndex, Mode=TwoWay}" />
|
||||
</tkcontrols:SettingsCard>
|
||||
|
||||
<tkcontrols:SettingsCard x:Uid="VideoConference_PushToReverse">
|
||||
<ToggleSwitch x:Uid="PushToReverseSwitch" IsOn="{x:Bind ViewModel.PushToReverseEnabled, Mode=TwoWay}" />
|
||||
</tkcontrols:SettingsCard>
|
||||
</controls:SettingsGroup>
|
||||
|
||||
<controls:SettingsGroup x:Uid="VideoConference_Camera" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
||||
<tkcontrols:SettingsExpander
|
||||
x:Uid="VideoConference_SelectedCamera"
|
||||
HeaderIcon="{ui:FontIcon Glyph=}"
|
||||
IsExpanded="True">
|
||||
<ComboBox
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}"
|
||||
ItemsSource="{x:Bind ViewModel.CameraNames, Mode=OneTime}"
|
||||
SelectedIndex="{x:Bind ViewModel.SelectedCameraIndex, Mode=TwoWay}" />
|
||||
<tkcontrols:SettingsExpander.Items>
|
||||
<tkcontrols:SettingsCard x:Uid="VideoConference_CameraOverlayImagePathHeader">
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<Button x:Uid="VideoConference_CameraOverlayImageBrowse" Command="{x:Bind ViewModel.SelectOverlayImage, Mode=OneWay}" />
|
||||
<Button
|
||||
x:Uid="VideoConference_CameraOverlayImageClear"
|
||||
Command="{x:Bind ViewModel.ClearOverlayImage, Mode=OneWay}"
|
||||
IsEnabled="{x:Bind ViewModel.CameraImageOverlayPath, Mode=OneWay, Converter={StaticResource EmptyToBoolConverter}}" />
|
||||
</StackPanel>
|
||||
</tkcontrols:SettingsCard>
|
||||
<tkcontrols:SettingsCard Visibility="{x:Bind ViewModel.CameraImageOverlayPath, Mode=OneWay, Converter={StaticResource EmptyToCollapsedConverter}}">
|
||||
<Border
|
||||
MaxHeight="100"
|
||||
HorizontalAlignment="Right"
|
||||
CornerRadius="4">
|
||||
<Image
|
||||
x:Uid="VideoConference_CameraOverlayImageAlt"
|
||||
Source="{Binding Mode=OneWay, Path=CameraImageOverlayPath}"
|
||||
ToolTipService.ToolTip="{x:Bind ViewModel.CameraImageOverlayPath, Mode=OneWay}" />
|
||||
</Border>
|
||||
</tkcontrols:SettingsCard>
|
||||
</tkcontrols:SettingsExpander.Items>
|
||||
</tkcontrols:SettingsExpander>
|
||||
</controls:SettingsGroup>
|
||||
|
||||
<controls:SettingsGroup x:Uid="VideoConference_Toolbar" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
||||
<tkcontrols:SettingsExpander x:Uid="VideoConference_ToolbarPosition" IsExpanded="True">
|
||||
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind ViewModel.ToolbarPositionIndex, Mode=TwoWay}">
|
||||
<ComboBoxItem x:Uid="VideoConference_ToolbarPosition_TopLeftCorner" />
|
||||
<ComboBoxItem x:Uid="VideoConference_ToolbarPosition_TopCenter" />
|
||||
<ComboBoxItem x:Uid="VideoConference_ToolbarPosition_TopRightCorner" />
|
||||
<ComboBoxItem x:Uid="VideoConference_ToolbarPosition_BottomLeftCorner" />
|
||||
<ComboBoxItem x:Uid="VideoConference_ToolbarPosition_BottomCenter" />
|
||||
<ComboBoxItem x:Uid="VideoConference_ToolbarPosition_BottomRightCorner" />
|
||||
</ComboBox>
|
||||
<tkcontrols:SettingsExpander.Items>
|
||||
<tkcontrols:SettingsCard x:Uid="VideoConference_ToolbarMonitor">
|
||||
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind ViewModel.ToolbarMonitorIndex, Mode=TwoWay}">
|
||||
<ComboBoxItem x:Uid="VideoConference_ToolbarMonitor_Main" />
|
||||
<ComboBoxItem x:Uid="VideoConference_ToolbarMonitor_All" />
|
||||
</ComboBox>
|
||||
</tkcontrols:SettingsCard>
|
||||
<tkcontrols:SettingsCard x:Uid="VideoConference_ToolbarHide">
|
||||
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind ViewModel.ToolbarHideIndex, Mode=TwoWay}">
|
||||
<ComboBoxItem x:Uid="VideoConference_ToolbarHideNever" />
|
||||
<ComboBoxItem x:Uid="VideoConference_ToolbarHideUnmuted" />
|
||||
<ComboBoxItem x:Uid="VideoConference_ToolbarHideMuted" />
|
||||
<ComboBoxItem x:Uid="VideoConference_ToolbarHideTimeout" />
|
||||
</ComboBox>
|
||||
</tkcontrols:SettingsCard>
|
||||
</tkcontrols:SettingsExpander.Items>
|
||||
</tkcontrols:SettingsExpander>
|
||||
</controls:SettingsGroup>
|
||||
|
||||
<controls:SettingsGroup x:Uid="VideoConference_Behavior" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
||||
<tkcontrols:SettingsCard x:Uid="VideoConference_StartupAction">
|
||||
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind ViewModel.StartupActionIndex, Mode=TwoWay}">
|
||||
<ComboBoxItem x:Uid="VideoConference_StartupActionNothing" />
|
||||
<ComboBoxItem x:Uid="VideoConference_StartupActionUnmute" />
|
||||
<ComboBoxItem x:Uid="VideoConference_StartupActionMute" />
|
||||
</ComboBox>
|
||||
</tkcontrols:SettingsCard>
|
||||
</controls:SettingsGroup>
|
||||
</StackPanel>
|
||||
</controls:SettingsPageControl.ModuleContent>
|
||||
|
||||
<controls:SettingsPageControl.PrimaryLinks>
|
||||
<controls:PageLink x:Uid="LearnMore_VCM" Link="https://aka.ms/PowerToysOverview_VideoConference" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</Page>
|
||||
@@ -1,65 +0,0 @@
|
||||
// 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.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Microsoft.PowerToys.Settings.UI.Helpers;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.PowerToys.Settings.UI.ViewModels;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class VideoConferencePage : Page, IRefreshablePage
|
||||
{
|
||||
private VideoConferenceViewModel ViewModel { get; set; }
|
||||
|
||||
private static string PickFileDialog()
|
||||
{
|
||||
// this code was changed to solve the problem with WinUI3 that prevents to select a file
|
||||
// while running elevated, when the issue is solved in WinUI3 it should be changed back
|
||||
OpenFileName openFileName = new OpenFileName();
|
||||
openFileName.StructSize = Marshal.SizeOf(openFileName);
|
||||
openFileName.Filter = "Images(*.jpg,*.jpeg,*.png)\0*.jpg;*.jpeg;*.png\0";
|
||||
|
||||
// make buffer 65k bytes big as the MAX_PATH can be ~32k chars if long path is enable
|
||||
// and unicode uses 2 bytes per character
|
||||
openFileName.File = new string(new char[65000]);
|
||||
openFileName.MaxFile = openFileName.File.Length;
|
||||
openFileName.FileTitle = new string(new char[65000]);
|
||||
openFileName.MaxFileTitle = openFileName.FileTitle.Length;
|
||||
openFileName.InitialDir = null;
|
||||
openFileName.Title = string.Empty;
|
||||
openFileName.DefExt = null;
|
||||
|
||||
bool result = NativeMethods.GetOpenFileName(openFileName);
|
||||
if (result)
|
||||
{
|
||||
return openFileName.File;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public VideoConferencePage()
|
||||
{
|
||||
var settingsUtils = new SettingsUtils();
|
||||
ViewModel = new VideoConferenceViewModel(
|
||||
settingsUtils,
|
||||
SettingsRepository<GeneralSettings>.GetInstance(settingsUtils),
|
||||
SettingsRepository<VideoConferenceSettings>.GetInstance(settingsUtils),
|
||||
ShellPage.SendDefaultIPCMessage,
|
||||
PickFileDialog);
|
||||
DataContext = ViewModel;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void RefreshEnabledState()
|
||||
{
|
||||
ViewModel.RefreshEnabledState();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user