mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
[warningsAsErrors] Getting settings online (#6053)
* getting everything to compile * fixing json
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
<AssemblyCompany>Microsoft Corp.</AssemblyCompany>
|
||||
<AssemblyCopyright>Copyright (C) 2020 Microsoft Corp.</AssemblyCopyright>
|
||||
<AssemblyProduct>PowerToys</AssemblyProduct>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<AssemblyVersionFiles Include="Generated Files\AssemblyInfo.cs" />
|
||||
@@ -297,6 +298,12 @@
|
||||
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
|
||||
<EnableXBindDiagnostics>false</EnableXBindDiagnostics>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
|
||||
public FancyZonesPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
InitializeComponent();
|
||||
ViewModel = new FancyZonesViewModel(ShellPage.SendDefaultIPCMessage);
|
||||
DataContext = ViewModel;
|
||||
}
|
||||
|
||||
@@ -25,12 +25,12 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
/// </summary>
|
||||
public GeneralPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
InitializeComponent();
|
||||
|
||||
// Load string resources
|
||||
ResourceLoader loader = ResourceLoader.GetForViewIndependentUse();
|
||||
|
||||
this.ViewModel = new GeneralViewModel(
|
||||
ViewModel = new GeneralViewModel(
|
||||
loader.GetString("GeneralSettings_RunningAsAdminText"),
|
||||
loader.GetString("GeneralSettings_RunningAsUserText"),
|
||||
ShellPage.IsElevated,
|
||||
|
||||
@@ -2,9 +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 Microsoft.PowerToys.Settings.UI.Lib.ViewModels;
|
||||
using Windows.UI.Popups;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
@@ -30,7 +28,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
int rowNum = int.Parse(deleteRowButton.CommandParameter.ToString());
|
||||
ViewModel.DeleteImageSize(rowNum);
|
||||
}
|
||||
catch (Exception exp)
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -41,7 +39,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
ViewModel.AddRow();
|
||||
}
|
||||
catch (Exception exp)
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
|
||||
watcher = Helper.GetFileWatcher(
|
||||
PowerToyName,
|
||||
ViewModel.settings.Properties.ActiveConfiguration.Value + ".json",
|
||||
ViewModel.Settings.Properties.ActiveConfiguration.Value + ".json",
|
||||
OnConfigFileUpdate);
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
@@ -12,13 +12,13 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
/// </summary>
|
||||
public sealed partial class PowerPreviewPage : Page
|
||||
{
|
||||
public PowerPreviewViewModel viewModel { get; set; }
|
||||
public PowerPreviewViewModel ViewModel { get; set; }
|
||||
|
||||
public PowerPreviewPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
viewModel = new PowerPreviewViewModel(ShellPage.SendDefaultIPCMessage);
|
||||
DataContext = viewModel;
|
||||
InitializeComponent();
|
||||
ViewModel = new PowerPreviewViewModel(ShellPage.SendDefaultIPCMessage);
|
||||
DataContext = ViewModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
|
||||
public PowerRenamePage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
InitializeComponent();
|
||||
ViewModel = new PowerRenameViewModel(ShellPage.SendDefaultIPCMessage);
|
||||
|
||||
DataContext = ViewModel;
|
||||
|
||||
Reference in New Issue
Block a user