From f721c1f226144a5cd25bf8d0dedd38f2a2a09a60 Mon Sep 17 00:00:00 2001
From: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
Date: Tue, 18 Jan 2022 16:55:09 +0100
Subject: [PATCH] Remove FancyZonesEditor_DPI_netcore_test &
FancyZones_DPI_test (#15617)
---
.../App.xaml | 9 -
.../App.xaml.cs | 17 --
.../AssemblyInfo.cs | 10 --
.../FancyZonesEditor_DPI_netcore_test.csproj | 15 --
.../FancyZonesEditor_DPI_netcore_test.sln | 25 ---
.../MainWindow.xaml | 15 --
.../MainWindow.xaml.cs | 120 --------------
.../MonitorsInfo.cs | 156 ------------------
.../OverlayWindow.xaml | 14 --
.../OverlayWindow.xaml.cs | 25 ---
.../app.manifest | 74 ---------
.../FancyZonesEditor_DPI_test.sln | 25 ---
.../FancyZonesEditor_DPI_test/App.config | 9 -
.../FancyZonesEditor_DPI_test/App.xaml | 9 -
.../FancyZonesEditor_DPI_test/App.xaml.cs | 17 --
.../FancyZonesEditor_DPI_test.csproj | 144 ----------------
.../FancyZonesEditor_DPI_test/MainWindow.xaml | 15 --
.../MainWindow.xaml.cs | 119 -------------
.../FancyZonesEditor_DPI_test/MonitorInfo.cs | 156 ------------------
.../OverlayWindow.xaml | 14 --
.../OverlayWindow.xaml.cs | 22 ---
.../Properties/AssemblyInfo.cs | 55 ------
.../Properties/Resources.Designer.cs | 71 --------
.../Properties/Resources.resx | 117 -------------
.../Properties/Settings.Designer.cs | 30 ----
.../Properties/Settings.settings | 7 -
.../FancyZonesEditor_DPI_test/app.manifest | 74 ---------
.../FancyZonesEditor_DPI_test/packages.config | 4 -
28 files changed, 1368 deletions(-)
delete mode 100644 tools/FancyZonesEditor_DPI_netcore_test/App.xaml
delete mode 100644 tools/FancyZonesEditor_DPI_netcore_test/App.xaml.cs
delete mode 100644 tools/FancyZonesEditor_DPI_netcore_test/AssemblyInfo.cs
delete mode 100644 tools/FancyZonesEditor_DPI_netcore_test/FancyZonesEditor_DPI_netcore_test.csproj
delete mode 100644 tools/FancyZonesEditor_DPI_netcore_test/FancyZonesEditor_DPI_netcore_test.sln
delete mode 100644 tools/FancyZonesEditor_DPI_netcore_test/MainWindow.xaml
delete mode 100644 tools/FancyZonesEditor_DPI_netcore_test/MainWindow.xaml.cs
delete mode 100644 tools/FancyZonesEditor_DPI_netcore_test/MonitorsInfo.cs
delete mode 100644 tools/FancyZonesEditor_DPI_netcore_test/OverlayWindow.xaml
delete mode 100644 tools/FancyZonesEditor_DPI_netcore_test/OverlayWindow.xaml.cs
delete mode 100644 tools/FancyZonesEditor_DPI_netcore_test/app.manifest
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test.sln
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/App.config
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/App.xaml
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/App.xaml.cs
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test.csproj
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/MainWindow.xaml
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/MainWindow.xaml.cs
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/MonitorInfo.cs
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/OverlayWindow.xaml
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/OverlayWindow.xaml.cs
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/AssemblyInfo.cs
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Resources.Designer.cs
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Resources.resx
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Settings.Designer.cs
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Settings.settings
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/app.manifest
delete mode 100644 tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/packages.config
diff --git a/tools/FancyZonesEditor_DPI_netcore_test/App.xaml b/tools/FancyZonesEditor_DPI_netcore_test/App.xaml
deleted file mode 100644
index d08b834106..0000000000
--- a/tools/FancyZonesEditor_DPI_netcore_test/App.xaml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
diff --git a/tools/FancyZonesEditor_DPI_netcore_test/App.xaml.cs b/tools/FancyZonesEditor_DPI_netcore_test/App.xaml.cs
deleted file mode 100644
index 06cf0394ca..0000000000
--- a/tools/FancyZonesEditor_DPI_netcore_test/App.xaml.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace FancyZonesEditor_DPI_netcore_test
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- }
-}
diff --git a/tools/FancyZonesEditor_DPI_netcore_test/AssemblyInfo.cs b/tools/FancyZonesEditor_DPI_netcore_test/AssemblyInfo.cs
deleted file mode 100644
index 8b5504ecfb..0000000000
--- a/tools/FancyZonesEditor_DPI_netcore_test/AssemblyInfo.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using System.Windows;
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
diff --git a/tools/FancyZonesEditor_DPI_netcore_test/FancyZonesEditor_DPI_netcore_test.csproj b/tools/FancyZonesEditor_DPI_netcore_test/FancyZonesEditor_DPI_netcore_test.csproj
deleted file mode 100644
index 9f34e72c0b..0000000000
--- a/tools/FancyZonesEditor_DPI_netcore_test/FancyZonesEditor_DPI_netcore_test.csproj
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- WinExe
- netcoreapp3.1
- true
- true
- app.manifest
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tools/FancyZonesEditor_DPI_netcore_test/FancyZonesEditor_DPI_netcore_test.sln b/tools/FancyZonesEditor_DPI_netcore_test/FancyZonesEditor_DPI_netcore_test.sln
deleted file mode 100644
index b52d1334e0..0000000000
--- a/tools/FancyZonesEditor_DPI_netcore_test/FancyZonesEditor_DPI_netcore_test.sln
+++ /dev/null
@@ -1,25 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30621.155
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FancyZonesEditor_DPI_netcore_test", "FancyZonesEditor_DPI_netcore_test.csproj", "{1764AC88-EE10-4613-AB77-F213EF8043D6}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {1764AC88-EE10-4613-AB77-F213EF8043D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1764AC88-EE10-4613-AB77-F213EF8043D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1764AC88-EE10-4613-AB77-F213EF8043D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1764AC88-EE10-4613-AB77-F213EF8043D6}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {F95C5E3B-3EC1-42AC-A24C-6A9350B72807}
- EndGlobalSection
-EndGlobal
diff --git a/tools/FancyZonesEditor_DPI_netcore_test/MainWindow.xaml b/tools/FancyZonesEditor_DPI_netcore_test/MainWindow.xaml
deleted file mode 100644
index fdecd89eae..0000000000
--- a/tools/FancyZonesEditor_DPI_netcore_test/MainWindow.xaml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
diff --git a/tools/FancyZonesEditor_DPI_netcore_test/MainWindow.xaml.cs b/tools/FancyZonesEditor_DPI_netcore_test/MainWindow.xaml.cs
deleted file mode 100644
index ab9d91c9a3..0000000000
--- a/tools/FancyZonesEditor_DPI_netcore_test/MainWindow.xaml.cs
+++ /dev/null
@@ -1,120 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Windows;
-using System.Windows.Media;
-using Microsoft.VisualStudio.Utilities;
-
-namespace FancyZonesEditor_DPI_netcore_test
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow : Window
- {
- struct ScreenInfo
- {
- public int MonitorDPI { get; set; }
-
- public double WindowDPI { get; set; }
-
- public Rect Resolution { get; set; }
-
- public Rect WorkArea { get; set; }
-
- public override string ToString()
- {
- var resolution = String.Format("X:{0,5}, Y:{1,5}, W:{2,5}, H:{3,5}", Resolution.Left, Resolution.Top, Resolution.Width, Resolution.Height);
- var workArea = String.Format("X:{0,5}, Y:{1,5}, W:{2,5}, H:{3,5}", WorkArea.Left, WorkArea.Top, WorkArea.Width, WorkArea.Height);
-
- return "Monitor DPI: " + MonitorDPI + " - Resolution: " + resolution + " - WorkArea: " + workArea;
- }
- }
-
- private List workAreaWindows;
-
- public MainWindow()
- {
- InitializeComponent();
-
- double primaryMonitorDPI = 96f;
-
- var colors = new Brush[] { Brushes.Green, Brushes.Blue, Brushes.Red };
-
- var screens = System.Windows.Forms.Screen.AllScreens;
- List screenInfoList = new List();
-
- workAreaWindows = new List();
-
- var monitors = MonitorsInfo.GetMonitors();
-
- for (int i = 0; i < screens.Length; i++)
- {
- if (screens[i].Primary)
- {
- double monitorDPI;
- DpiAwareness.GetMonitorDpi(monitors[i].MonitorHandle, out monitorDPI, out monitorDPI);
- primaryMonitorDPI = monitorDPI;
- break;
- }
- }
-
- for (int i = 0; i < screens.Length; i++)
- {
- var monitor = monitors[i];
- ScreenInfo screenInfo = new ScreenInfo();
- var window = new OverlayWindow
- {
- Opacity = 0.8,
- Background = colors[i % colors.Length],
- BorderBrush = Brushes.White,
- BorderThickness = new Thickness(4, 4, 4, 4)
- };
-
- // get monitor dpi
- double monitorDPI;
- DpiAwareness.GetMonitorDpi(monitors[i].MonitorHandle, out monitorDPI, out monitorDPI);
- screenInfo.MonitorDPI = (int)monitorDPI;
-
- // resolution
- screenInfo.Resolution = new Rect(monitor.MonitorInfo.monitor.left, monitor.MonitorInfo.monitor.top,
- monitor.MonitorInfo.monitor.width, monitor.MonitorInfo.monitor.height);
-
- // work area
- Rect workedArea = new Rect(monitor.MonitorInfo.work.left, monitor.MonitorInfo.work.top,
- monitor.MonitorInfo.work.width, monitor.MonitorInfo.work.height);
-
- double scalePosition = 96f / primaryMonitorDPI;
- workedArea.X *= scalePosition;
- workedArea.Y *= scalePosition;
-
- double scaleSize = 96f / monitorDPI;
- workedArea.Width *= scaleSize;
- workedArea.Height *= scaleSize;
-
- screenInfo.WorkArea = workedArea;
-
- screenInfo.WindowDPI = window.GetDpiX();
- screenInfoList.Add(screenInfo);
-
- // open window
- window.Left = workedArea.X;
- window.Top = workedArea.Y;
- window.Width = workedArea.Width;
- window.Height = workedArea.Height;
-
- workAreaWindows.Add(window);
- window.Show();
- }
-
- MonitorList.ItemsSource = screenInfoList;
- }
-
- private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
- {
- foreach (OverlayWindow window in workAreaWindows)
- {
- window.Close();
- }
- }
- }
-}
diff --git a/tools/FancyZonesEditor_DPI_netcore_test/MonitorsInfo.cs b/tools/FancyZonesEditor_DPI_netcore_test/MonitorsInfo.cs
deleted file mode 100644
index b68c73fc24..0000000000
--- a/tools/FancyZonesEditor_DPI_netcore_test/MonitorsInfo.cs
+++ /dev/null
@@ -1,156 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-
-namespace FancyZonesEditor_DPI_netcore_test
-{
- public class MonitorsInfo
- {
- ///
- /// Rectangle
- ///
- [StructLayout(LayoutKind.Sequential)]
- public struct RECT
- {
- public int left;
- public int top;
- public int right;
- public int bottom;
-
- public int width
- {
- get
- {
- return right - left;
- }
- }
-
- public int height
- {
- get
- {
- return bottom - top;
- }
- }
- }
-
-
- ///
- /// Monitor information.
- ///
- [StructLayout(LayoutKind.Sequential)]
- public struct MONITORINFO
- {
- public uint size;
- public RECT monitor;
- public RECT work;
- public uint flags;
- }
-
- ///
- /// Monitor Enum Delegate
- ///
- /// A handle to the display monitor.
- /// A handle to a device context.
- /// A pointer to a RECT structure.
- /// Application-defined data that EnumDisplayMonitors passes directly to the enumeration function.
- ///
- public delegate bool MonitorEnumDelegate(IntPtr hMonitor, IntPtr hdcMonitor,
- ref RECT lprcMonitor, IntPtr dwData);
-
- ///
- /// Enumerates through the display monitors.
- ///
- /// A handle to a display device context that defines the visible region of interest.
- /// A pointer to a RECT structure that specifies a clipping rectangle.
- /// A pointer to a MonitorEnumProc application-defined callback function.
- /// Application-defined data that EnumDisplayMonitors passes directly to the MonitorEnumProc function.
- ///
- [DllImport("user32.dll")]
- public static extern bool EnumDisplayMonitors(IntPtr hdc, IntPtr lprcClip,
- MonitorEnumDelegate lpfnEnum, IntPtr dwData);
-
- ///
- /// Gets the monitor information.
- ///
- /// A handle to the display monitor of interest.
- /// A pointer to a MONITORINFO instance created by this method.
- ///
- [DllImport("user32.dll")]
- public static extern bool GetMonitorInfo(IntPtr hmon, ref MONITORINFO mi);
-
- ///
- /// Monitor information with handle interface.
- ///
- public interface IMonitorInfoWithHandle
- {
- IntPtr MonitorHandle { get; }
- MONITORINFO MonitorInfo { get; }
- }
-
- ///
- /// Monitor information with handle.
- ///
- public class MonitorInfoWithHandle : IMonitorInfoWithHandle
- {
- ///
- /// Gets the monitor handle.
- ///
- ///
- /// The monitor handle.
- ///
- public IntPtr MonitorHandle { get; private set; }
-
- ///
- /// Gets the monitor information.
- ///
- ///
- /// The monitor information.
- ///
- public MONITORINFO MonitorInfo { get; private set; }
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The monitor handle.
- /// The monitor information.
- public MonitorInfoWithHandle(IntPtr monitorHandle, MONITORINFO monitorInfo)
- {
- MonitorHandle = monitorHandle;
- MonitorInfo = monitorInfo;
- }
- }
-
- ///
- /// Monitor Enum Delegate
- ///
- /// A handle to the display monitor.
- /// A handle to a device context.
- /// A pointer to a RECT structure.
- /// Application-defined data that EnumDisplayMonitors passes directly to the enumeration function.
- ///
- public static bool MonitorEnum(IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData)
- {
- var mi = new MONITORINFO();
- mi.size = (uint)Marshal.SizeOf(mi);
- GetMonitorInfo(hMonitor, ref mi);
-
- // Add to monitor info
- _monitorInfos.Add(new MonitorInfoWithHandle(hMonitor, mi));
- return true;
- }
-
- ///
- /// Gets the monitors.
- ///
- ///
- public static MonitorInfoWithHandle[] GetMonitors()
- {
- _monitorInfos = new List();
- EnumDisplayMonitors(IntPtr.Zero, IntPtr.Zero, MonitorEnum, IntPtr.Zero);
- return _monitorInfos.ToArray();
- }
-
- private static List _monitorInfos;
- }
-}
diff --git a/tools/FancyZonesEditor_DPI_netcore_test/OverlayWindow.xaml b/tools/FancyZonesEditor_DPI_netcore_test/OverlayWindow.xaml
deleted file mode 100644
index f455217193..0000000000
--- a/tools/FancyZonesEditor_DPI_netcore_test/OverlayWindow.xaml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
diff --git a/tools/FancyZonesEditor_DPI_netcore_test/OverlayWindow.xaml.cs b/tools/FancyZonesEditor_DPI_netcore_test/OverlayWindow.xaml.cs
deleted file mode 100644
index 5828179c7c..0000000000
--- a/tools/FancyZonesEditor_DPI_netcore_test/OverlayWindow.xaml.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Shapes;
-
-namespace FancyZonesEditor_DPI_netcore_test
-{
- ///
- /// Interaction logic for OverlayWindow.xaml
- ///
- public partial class OverlayWindow : Window
- {
- public OverlayWindow()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/tools/FancyZonesEditor_DPI_netcore_test/app.manifest b/tools/FancyZonesEditor_DPI_netcore_test/app.manifest
deleted file mode 100644
index ed2909e9e1..0000000000
--- a/tools/FancyZonesEditor_DPI_netcore_test/app.manifest
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PerMonitorV2
-
-
-
-
-
-
-
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test.sln b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test.sln
deleted file mode 100644
index 5c50ac7932..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test.sln
+++ /dev/null
@@ -1,25 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30621.155
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FancyZonesEditor_DPI_test", "FancyZonesEditor_DPI_test\FancyZonesEditor_DPI_test.csproj", "{B1708F5E-78F8-4646-86B5-0E83E3C79860}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {B1708F5E-78F8-4646-86B5-0E83E3C79860}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B1708F5E-78F8-4646-86B5-0E83E3C79860}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B1708F5E-78F8-4646-86B5-0E83E3C79860}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B1708F5E-78F8-4646-86B5-0E83E3C79860}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {B6C181B9-2BFF-4057-89D2-9BFDEBCC87F6}
- EndGlobalSection
-EndGlobal
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/App.config b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/App.config
deleted file mode 100644
index dd82da42e4..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/App.config
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/App.xaml b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/App.xaml
deleted file mode 100644
index e662c82e58..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/App.xaml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/App.xaml.cs b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/App.xaml.cs
deleted file mode 100644
index e50dd14830..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/App.xaml.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace FancyZonesEditor_DPI_test
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- }
-}
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test.csproj b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test.csproj
deleted file mode 100644
index bd954c353c..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test.csproj
+++ /dev/null
@@ -1,144 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {B1708F5E-78F8-4646-86B5-0E83E3C79860}
- WinExe
- FancyZonesEditor_DPI_test
- FancyZonesEditor_DPI_test
- v4.7.2
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
- true
- true
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
- 0
- 1.0.0.%2a
- false
- false
- true
-
-
- x64
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
- app.manifest
-
-
-
- ..\packages\Microsoft.VisualStudio.DpiAwareness.6.7.30328\lib\net46\Microsoft.VisualStudio.DpiAwareness.dll
-
-
-
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
- MainWindow.xaml
- Code
-
-
- Designer
- MSBuild:Compile
-
-
-
-
-
- OverlayWindow.xaml
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
-
-
- False
- Microsoft .NET Framework 4.7.2 %28x86 and x64%29
- true
-
-
- False
- .NET Framework 3.5 SP1
- false
-
-
-
-
\ No newline at end of file
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/MainWindow.xaml b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/MainWindow.xaml
deleted file mode 100644
index 9dc523da41..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/MainWindow.xaml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/MainWindow.xaml.cs b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/MainWindow.xaml.cs
deleted file mode 100644
index 043aee2cdd..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/MainWindow.xaml.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Windows;
-using System.Windows.Media;
-using Microsoft.VisualStudio.Utilities;
-
-namespace FancyZonesEditor_DPI_test
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow : Window
- {
- struct ScreenInfo
- {
- public int MonitorDPI { get; set; }
-
- public double WindowDPI { get; set; }
-
- public Rect Resolution { get; set; }
-
- public Rect WorkArea { get; set; }
-
- public override string ToString()
- {
- var resolution = String.Format("X:{0,5}, Y:{1,5}, W:{2,5}, H:{3,5}", Resolution.Left, Resolution.Top, Resolution.Width, Resolution.Height);
- var workArea = String.Format("X:{0,5}, Y:{1,5}, W:{2,5}, H:{3,5}", WorkArea.Left, WorkArea.Top, WorkArea.Width, WorkArea.Height);
-
- return "Monitor DPI: " + MonitorDPI + " - Resolution: " + resolution + " - WorkArea: " + workArea;
- }
- }
-
- private List workAreaWindows;
-
- public MainWindow()
- {
- InitializeComponent();
-
- double primaryMonitorDPI = 96f;
-
- var colors = new Brush[] { Brushes.Green, Brushes.Blue, Brushes.Red };
-
- var screens = System.Windows.Forms.Screen.AllScreens;
- List screenInfoList = new List();
-
- workAreaWindows = new List();
-
- var monitors = MonitorsInfo.GetMonitors();
-
- for (int i = 0; i < screens.Length; i++)
- {
- if (screens[i].Primary)
- {
- double monitorDPI;
- DpiAwareness.GetMonitorDpi(monitors[i].MonitorHandle, out monitorDPI, out monitorDPI);
- primaryMonitorDPI = monitorDPI;
- break;
- }
- }
-
- for (int i = 0; i < screens.Length; i++)
- {
- var monitor = monitors[i];
- ScreenInfo screenInfo = new ScreenInfo();
- var window = new OverlayWindow
- {
- Opacity = 0.8,
- Background = colors[i % colors.Length],
- BorderBrush = Brushes.White,
- BorderThickness = new Thickness(4, 4, 4, 4)
- };
-
- // get monitor dpi
- double monitorDPI;
- DpiAwareness.GetMonitorDpi(monitors[i].MonitorHandle, out monitorDPI, out monitorDPI);
- screenInfo.MonitorDPI = (int)monitorDPI;
-
- // screen resolution
- screenInfo.Resolution = new Rect(monitor.MonitorInfo.monitor.left, monitor.MonitorInfo.monitor.top,
- monitor.MonitorInfo.monitor.width, monitor.MonitorInfo.monitor.height);
-
- // work area
- Rect workedArea = new Rect(monitor.MonitorInfo.work.left, monitor.MonitorInfo.work.top,
- monitor.MonitorInfo.work.width, monitor.MonitorInfo.work.height);
-
- double scaleFactor = 96f / primaryMonitorDPI;
- workedArea.X *= scaleFactor;
- workedArea.Y *= scaleFactor;
- workedArea.Width *= scaleFactor;
- workedArea.Height *= scaleFactor;
-
- screenInfo.WorkArea = workedArea;
-
- screenInfo.WindowDPI = window.GetDpiX();
- screenInfoList.Add(screenInfo);
-
- // open window
- window.Left = workedArea.X;
- window.Top = workedArea.Y;
- window.Width = workedArea.Width;
- window.Height = workedArea.Height;
-
- workAreaWindows.Add(window);
- window.Show();
-
- }
-
- MonitorList.ItemsSource = screenInfoList;
- }
-
- private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
- {
- foreach (OverlayWindow window in workAreaWindows)
- {
- window.Close();
- }
- }
- }
-}
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/MonitorInfo.cs b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/MonitorInfo.cs
deleted file mode 100644
index c3adb09df6..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/MonitorInfo.cs
+++ /dev/null
@@ -1,156 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-
-namespace FancyZonesEditor_DPI_test
-{
- class MonitorsInfo
- {
- ///
- /// Rectangle
- ///
- [StructLayout(LayoutKind.Sequential)]
- public struct RECT
- {
- public int left;
- public int top;
- public int right;
- public int bottom;
-
- public int width
- {
- get
- {
- return right - left;
- }
- }
-
- public int height
- {
- get
- {
- return bottom - top;
- }
- }
- }
-
-
- ///
- /// Monitor information.
- ///
- [StructLayout(LayoutKind.Sequential)]
- public struct MONITORINFO
- {
- public uint size;
- public RECT monitor;
- public RECT work;
- public uint flags;
- }
-
- ///
- /// Monitor Enum Delegate
- ///
- /// A handle to the display monitor.
- /// A handle to a device context.
- /// A pointer to a RECT structure.
- /// Application-defined data that EnumDisplayMonitors passes directly to the enumeration function.
- ///
- public delegate bool MonitorEnumDelegate(IntPtr hMonitor, IntPtr hdcMonitor,
- ref RECT lprcMonitor, IntPtr dwData);
-
- ///
- /// Enumerates through the display monitors.
- ///
- /// A handle to a display device context that defines the visible region of interest.
- /// A pointer to a RECT structure that specifies a clipping rectangle.
- /// A pointer to a MonitorEnumProc application-defined callback function.
- /// Application-defined data that EnumDisplayMonitors passes directly to the MonitorEnumProc function.
- ///
- [DllImport("user32.dll")]
- public static extern bool EnumDisplayMonitors(IntPtr hdc, IntPtr lprcClip,
- MonitorEnumDelegate lpfnEnum, IntPtr dwData);
-
- ///
- /// Gets the monitor information.
- ///
- /// A handle to the display monitor of interest.
- /// A pointer to a MONITORINFO instance created by this method.
- ///
- [DllImport("user32.dll")]
- public static extern bool GetMonitorInfo(IntPtr hmon, ref MONITORINFO mi);
-
- ///
- /// Monitor information with handle interface.
- ///
- public interface IMonitorInfoWithHandle
- {
- IntPtr MonitorHandle { get; }
- MONITORINFO MonitorInfo { get; }
- }
-
- ///
- /// Monitor information with handle.
- ///
- public class MonitorInfoWithHandle : IMonitorInfoWithHandle
- {
- ///
- /// Gets the monitor handle.
- ///
- ///
- /// The monitor handle.
- ///
- public IntPtr MonitorHandle { get; private set; }
-
- ///
- /// Gets the monitor information.
- ///
- ///
- /// The monitor information.
- ///
- public MONITORINFO MonitorInfo { get; private set; }
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The monitor handle.
- /// The monitor information.
- public MonitorInfoWithHandle(IntPtr monitorHandle, MONITORINFO monitorInfo)
- {
- MonitorHandle = monitorHandle;
- MonitorInfo = monitorInfo;
- }
- }
-
- ///
- /// Monitor Enum Delegate
- ///
- /// A handle to the display monitor.
- /// A handle to a device context.
- /// A pointer to a RECT structure.
- /// Application-defined data that EnumDisplayMonitors passes directly to the enumeration function.
- ///
- public static bool MonitorEnum(IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData)
- {
- var mi = new MONITORINFO();
- mi.size = (uint)Marshal.SizeOf(mi);
- GetMonitorInfo(hMonitor, ref mi);
-
- // Add to monitor info
- _monitorInfos.Add(new MonitorInfoWithHandle(hMonitor, mi));
- return true;
- }
-
- ///
- /// Gets the monitors.
- ///
- ///
- public static MonitorInfoWithHandle[] GetMonitors()
- {
- _monitorInfos = new List();
- EnumDisplayMonitors(IntPtr.Zero, IntPtr.Zero, MonitorEnum, IntPtr.Zero);
- return _monitorInfos.ToArray();
- }
-
- private static List _monitorInfos;
- }
-}
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/OverlayWindow.xaml b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/OverlayWindow.xaml
deleted file mode 100644
index 56624884d8..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/OverlayWindow.xaml
+++ /dev/null
@@ -1,14 +0,0 @@
-
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/OverlayWindow.xaml.cs b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/OverlayWindow.xaml.cs
deleted file mode 100644
index cfeb750fc1..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/OverlayWindow.xaml.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System;
-using System.Windows;
-using System.Windows.Media;
-
-namespace FancyZonesEditor_DPI_test
-{
- ///
- /// Interaction logic for OverlayWindow.xaml
- ///
- public partial class OverlayWindow : Window
- {
- public OverlayWindow()
- {
- InitializeComponent();
- }
-
- private void Window_DpiChanged(object sender, DpiChangedEventArgs e)
- {
- }
- }
-
-}
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/AssemblyInfo.cs b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/AssemblyInfo.cs
deleted file mode 100644
index 3da7e63006..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("FancyZonesEditor_DPI_test")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("FancyZonesEditor_DPI_test")]
-[assembly: AssemblyCopyright("Copyright © 2020")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set
-//CultureYouAreCodingWith in your .csproj file
-//inside a . For example, if you are using US english
-//in your source files, set the to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Resources.Designer.cs b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Resources.Designer.cs
deleted file mode 100644
index 056d87497c..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace FancyZonesEditor_DPI_test.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FancyZonesEditor_DPI_test.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Resources.resx b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Resources.resx
deleted file mode 100644
index af7dbebbac..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Settings.Designer.cs b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Settings.Designer.cs
deleted file mode 100644
index efde417872..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace FancyZonesEditor_DPI_test.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Settings.settings b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Settings.settings
deleted file mode 100644
index 033d7a5e9e..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/app.manifest b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/app.manifest
deleted file mode 100644
index 26c1b51261..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/app.manifest
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- System
-
-
-
-
-
-
-
diff --git a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/packages.config b/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/packages.config
deleted file mode 100644
index 1cb755e9da..0000000000
--- a/tools/FancyZonesEditor_DPI_test/FancyZonesEditor_DPI_test/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file