Remove UWP/WinApplication
|
@ -9,8 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleInterface", "Console
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageCore.Tests", "ImageCore.Tests\ImageCore.Tests.csproj", "{8EB81515-E62C-4408-84E0-6C27E0293902}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageCore.Tests", "ImageCore.Tests\ImageCore.Tests.csproj", "{8EB81515-E62C-4408-84E0-6C27E0293902}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsApplication", "WindowsApplication\WindowsApplication.csproj", "{122A284C-5944-4AAF-B2CC-56180C882483}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -85,36 +83,6 @@ Global
|
||||||
{8EB81515-E62C-4408-84E0-6C27E0293902}.Release|x64.Build.0 = Release|Any CPU
|
{8EB81515-E62C-4408-84E0-6C27E0293902}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{8EB81515-E62C-4408-84E0-6C27E0293902}.Release|x86.ActiveCfg = Release|Any CPU
|
{8EB81515-E62C-4408-84E0-6C27E0293902}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{8EB81515-E62C-4408-84E0-6C27E0293902}.Release|x86.Build.0 = Release|Any CPU
|
{8EB81515-E62C-4408-84E0-6C27E0293902}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|Any CPU.ActiveCfg = Debug|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|Any CPU.Build.0 = Debug|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|Any CPU.Deploy.0 = Debug|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|ARM.ActiveCfg = Debug|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|ARM.Build.0 = Debug|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|ARM.Deploy.0 = Debug|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|ARM64.ActiveCfg = Debug|arm64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|ARM64.Build.0 = Debug|arm64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|ARM64.Deploy.0 = Debug|arm64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|x64.Deploy.0 = Debug|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|x86.ActiveCfg = Debug|x86
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|x86.Build.0 = Debug|x86
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Debug|x86.Deploy.0 = Debug|x86
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|Any CPU.ActiveCfg = Release|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|Any CPU.Build.0 = Release|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|Any CPU.Deploy.0 = Release|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|ARM.ActiveCfg = Release|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|ARM.Build.0 = Release|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|ARM.Deploy.0 = Release|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|ARM64.ActiveCfg = Release|arm64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|ARM64.Build.0 = Release|arm64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|ARM64.Deploy.0 = Release|arm64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|x64.Build.0 = Release|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|x64.Deploy.0 = Release|x64
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|x86.ActiveCfg = Release|x86
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|x86.Build.0 = Release|x86
|
|
||||||
{122A284C-5944-4AAF-B2CC-56180C882483}.Release|x86.Deploy.0 = Release|x86
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
<Application
|
|
||||||
x:Class="WindowsApplication.App"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:local="using:WindowsApplication">
|
|
||||||
<Application.Resources>
|
|
||||||
<ResourceDictionary>
|
|
||||||
<ResourceDictionary.MergedDictionaries>
|
|
||||||
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
|
|
||||||
<!-- Other merged dictionaries here -->
|
|
||||||
</ResourceDictionary.MergedDictionaries>
|
|
||||||
<!-- Other app resources here -->
|
|
||||||
</ResourceDictionary>
|
|
||||||
</Application.Resources>
|
|
||||||
</Application>
|
|
|
@ -1,51 +0,0 @@
|
||||||
using Microsoft.UI.Xaml;
|
|
||||||
using Microsoft.UI.Xaml.Controls;
|
|
||||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
|
||||||
using Microsoft.UI.Xaml.Data;
|
|
||||||
using Microsoft.UI.Xaml.Input;
|
|
||||||
using Microsoft.UI.Xaml.Media;
|
|
||||||
using Microsoft.UI.Xaml.Navigation;
|
|
||||||
using Microsoft.UI.Xaml.Shapes;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
|
||||||
using Windows.ApplicationModel;
|
|
||||||
using Windows.ApplicationModel.Activation;
|
|
||||||
using Windows.Foundation;
|
|
||||||
using Windows.Foundation.Collections;
|
|
||||||
|
|
||||||
// To learn more about WinUI, the WinUI project structure,
|
|
||||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
|
||||||
|
|
||||||
namespace WindowsApplication
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Provides application-specific behavior to supplement the default Application class.
|
|
||||||
/// </summary>
|
|
||||||
public partial class App : Application
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes the singleton application object. This is the first line of authored code
|
|
||||||
/// executed, and as such is the logical equivalent of main() or WinMain().
|
|
||||||
/// </summary>
|
|
||||||
public App()
|
|
||||||
{
|
|
||||||
this.InitializeComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Invoked when the application is launched normally by the end user. Other entry points
|
|
||||||
/// will be used such as when the application is launched to open a specific file.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="args">Details about the launch request and process.</param>
|
|
||||||
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
|
|
||||||
{
|
|
||||||
m_window = new MainWindow();
|
|
||||||
m_window.Activate();
|
|
||||||
}
|
|
||||||
|
|
||||||
private Window m_window;
|
|
||||||
}
|
|
||||||
}
|
|
Before Width: | Height: | Size: 432 B |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 637 B |
Before Width: | Height: | Size: 283 B |
Before Width: | Height: | Size: 456 B |
Before Width: | Height: | Size: 2 KiB |
|
@ -1,18 +0,0 @@
|
||||||
<Window
|
|
||||||
x:Class="WindowsApplication.MainWindow"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:local="using:WindowsApplication"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
mc:Ignorable="d">
|
|
||||||
|
|
||||||
<StackPanel x:Name="MainStackPanel">
|
|
||||||
<Button x:Name="PickFilesButton" Click="PickFilesButton_Click">Pick Files</Button>
|
|
||||||
<TextBlock x:Name="NumberOfFiles" />
|
|
||||||
<!-- Files Viewer -->
|
|
||||||
<ListView x:Name="FilesListView"/>
|
|
||||||
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
</Window>
|
|
|
@ -1,61 +0,0 @@
|
||||||
using Microsoft.UI.Xaml;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// To learn more about WinUI, the WinUI project structure,
|
|
||||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
|
||||||
|
|
||||||
namespace WindowsApplication
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// An empty window that can be used on its own or navigated to within a Frame.
|
|
||||||
/// </summary>
|
|
||||||
public sealed partial class MainWindow : Window
|
|
||||||
{
|
|
||||||
public MainWindow()
|
|
||||||
{
|
|
||||||
this.InitializeComponent();
|
|
||||||
UpdateNumberOfFilesText(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void PickFilesButton_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
var folderPicker = new Windows.Storage.Pickers.FolderPicker();
|
|
||||||
|
|
||||||
// Get the current window's HWND by passing in the Window object
|
|
||||||
var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
|
|
||||||
|
|
||||||
// Associate the HWND with the file picker
|
|
||||||
WinRT.Interop.InitializeWithWindow.Initialize(folderPicker, hwnd);
|
|
||||||
|
|
||||||
folderPicker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.Desktop;
|
|
||||||
folderPicker.FileTypeFilter.Add("*");
|
|
||||||
|
|
||||||
Windows.Storage.StorageFolder folder = await folderPicker.PickSingleFolderAsync();
|
|
||||||
if (folder != null)
|
|
||||||
{
|
|
||||||
// Application now has read/write access to all contents in the picked folder
|
|
||||||
// (including other sub-folder contents)
|
|
||||||
Windows.Storage.AccessCache.StorageApplicationPermissions.FutureAccessList.AddOrReplace("PickedFolderToken", folder);
|
|
||||||
|
|
||||||
List<string> fileNames = new List<string>();
|
|
||||||
var folderItems = await folder.GetItemsAsync();
|
|
||||||
foreach (var item in folderItems)
|
|
||||||
{
|
|
||||||
if (item.Attributes == Windows.Storage.FileAttributes.Archive || item.Attributes == Windows.Storage.FileAttributes.Normal)
|
|
||||||
{
|
|
||||||
fileNames.Add(item.Name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FilesListView.ItemsSource = fileNames;
|
|
||||||
UpdateNumberOfFilesText(fileNames.Count);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateNumberOfFilesText(int nrOfFiles)
|
|
||||||
{
|
|
||||||
NumberOfFiles.Text = $"Total files {nrOfFiles}.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,48 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<Package
|
|
||||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
|
||||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
|
||||||
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
|
|
||||||
IgnorableNamespaces="uap rescap">
|
|
||||||
|
|
||||||
<Identity
|
|
||||||
Name="89402d70-c7a0-48b0-8828-1943ec43355e"
|
|
||||||
Publisher="CN=nutiu"
|
|
||||||
Version="1.0.0.0" />
|
|
||||||
|
|
||||||
<Properties>
|
|
||||||
<DisplayName>WindowsApplication</DisplayName>
|
|
||||||
<PublisherDisplayName>nutiu</PublisherDisplayName>
|
|
||||||
<Logo>Assets\StoreLogo.png</Logo>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Dependencies>
|
|
||||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
|
||||||
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
|
||||||
</Dependencies>
|
|
||||||
|
|
||||||
<Resources>
|
|
||||||
<Resource Language="x-generate"/>
|
|
||||||
</Resources>
|
|
||||||
|
|
||||||
<Applications>
|
|
||||||
<Application Id="App"
|
|
||||||
Executable="$targetnametoken$.exe"
|
|
||||||
EntryPoint="$targetentrypoint$">
|
|
||||||
<uap:VisualElements
|
|
||||||
DisplayName="WindowsApplication"
|
|
||||||
Description="WindowsApplication"
|
|
||||||
BackgroundColor="transparent"
|
|
||||||
Square150x150Logo="Assets\Square150x150Logo.png"
|
|
||||||
Square44x44Logo="Assets\Square44x44Logo.png">
|
|
||||||
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
|
|
||||||
<uap:SplashScreen Image="Assets\SplashScreen.png" />
|
|
||||||
</uap:VisualElements>
|
|
||||||
</Application>
|
|
||||||
</Applications>
|
|
||||||
|
|
||||||
<Capabilities>
|
|
||||||
<rescap:Capability Name="runFullTrust" />
|
|
||||||
</Capabilities>
|
|
||||||
</Package>
|
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
"profiles": {
|
|
||||||
"WindowsApplication (Package)": {
|
|
||||||
"commandName": "MsixPackage"
|
|
||||||
},
|
|
||||||
"WindowsApplication (Unpackaged)": {
|
|
||||||
"commandName": "Project"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
<PropertyGroup>
|
|
||||||
<OutputType>WinExe</OutputType>
|
|
||||||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
|
|
||||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
|
||||||
<RootNamespace>WindowsApplication</RootNamespace>
|
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
|
||||||
<Platforms>x86;x64;arm64</Platforms>
|
|
||||||
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
|
|
||||||
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
|
|
||||||
<UseWinUI>true</UseWinUI>
|
|
||||||
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="Assets\SplashScreen.scale-200.png" />
|
|
||||||
<Content Include="Assets\LockScreenLogo.scale-200.png" />
|
|
||||||
<Content Include="Assets\Square150x150Logo.scale-200.png" />
|
|
||||||
<Content Include="Assets\Square44x44Logo.scale-200.png" />
|
|
||||||
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
|
|
||||||
<Content Include="Assets\StoreLogo.png" />
|
|
||||||
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0" />
|
|
||||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.194" />
|
|
||||||
<Manifest Include="$(ApplicationManifest)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<!-- Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging
|
|
||||||
Tools extension to be activated for this project even if the Windows App SDK Nuget
|
|
||||||
package has not yet been restored -->
|
|
||||||
<ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnablePreviewMsixTooling)'=='true'">
|
|
||||||
<ProjectCapability Include="Msix"/>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<assemblyIdentity version="1.0.0.0" name="WindowsApplication.app"/>
|
|
||||||
|
|
||||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<windowsSettings>
|
|
||||||
<!-- The combination of below two tags have the following effect:
|
|
||||||
1) Per-Monitor for >= Windows 10 Anniversary Update
|
|
||||||
2) System < Windows 10 Anniversary Update
|
|
||||||
-->
|
|
||||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
|
|
||||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
|
|
||||||
</windowsSettings>
|
|
||||||
</application>
|
|
||||||
</assembly>
|
|