diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/ClipboardCanvas.Package (Package).wapproj b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/ClipboardCanvas.Package (Package).wapproj
deleted file mode 100644
index 429d9606..00000000
--- a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/ClipboardCanvas.Package (Package).wapproj
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
- 15.0
-
-
-
- Debug
- x86
-
-
- Release
- x86
-
-
- Debug
- x64
-
-
- Release
- x64
-
-
- Debug
- arm64
-
-
- Release
- arm64
-
-
-
- $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\
- ClipboardCanvas.Package\
-
-
-
- eb0170ce-7213-48c2-8340-aeab2a0d40f8
- 10.0.22000.0
- 10.0.17763.0
- net6.0-windows$(TargetPlatformVersion);$(AssetTargetFallback)
- en-US
- false
- ..\..\ClipboardCanvas\ClipboardCanvas.csproj
- False
- False
- False
- en-US
- Scale|DXFeatureLevel
- Language=en-US;de-DE;pt-PT;ro-RO;ru-RU;zh-CN
- x86|x64|arm64
- True
- 0
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
-
- build
-
-
- build
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
-
-
\ No newline at end of file
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-100.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-100.png
deleted file mode 100644
index ef35cda6..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-100.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-125.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-125.png
deleted file mode 100644
index 6c6e885d..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-125.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-150.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-150.png
deleted file mode 100644
index ba2d145a..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-150.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-200.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-200.png
deleted file mode 100644
index b86336b0..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-200.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-400.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-400.png
deleted file mode 100644
index 1679f9cc..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/LargeTile.scale-400.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-100.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-100.png
deleted file mode 100644
index 2e2e9c2f..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-100.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-125.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-125.png
deleted file mode 100644
index 19c61dda..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-125.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-150.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-150.png
deleted file mode 100644
index dfb2782f..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-150.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-200.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-200.png
deleted file mode 100644
index d62de8f5..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-200.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-400.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-400.png
deleted file mode 100644
index 92bc4720..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SmallTile.scale-400.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-100.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-100.png
deleted file mode 100644
index b2658bb0..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-100.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-125.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-125.png
deleted file mode 100644
index 574a5b52..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-125.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-150.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-150.png
deleted file mode 100644
index 1c842a18..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-150.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-200.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-200.png
deleted file mode 100644
index ea15e888..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-200.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-400.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-400.png
deleted file mode 100644
index 4d74d48f..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/SplashScreen.scale-400.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-100.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-100.png
deleted file mode 100644
index becd9a34..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-100.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-125.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-125.png
deleted file mode 100644
index 2fdbe33e..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-125.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-150.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-150.png
deleted file mode 100644
index b5ef2a1d..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-150.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-200.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-200.png
deleted file mode 100644
index 6c6ecb2a..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-200.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-400.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-400.png
deleted file mode 100644
index f88a3650..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square150x150Logo.scale-400.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png
deleted file mode 100644
index 5ba88c56..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png
deleted file mode 100644
index 0453592a..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png
deleted file mode 100644
index 0c6ac8ce..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png
deleted file mode 100644
index fa39f134..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png
deleted file mode 100644
index 27765d40..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-16.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-16.png
deleted file mode 100644
index 5ba88c56..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-16.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-24.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-24.png
deleted file mode 100644
index 0453592a..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-24.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-256.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-256.png
deleted file mode 100644
index 0c6ac8ce..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-256.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-32.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-32.png
deleted file mode 100644
index fa39f134..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-32.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-48.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-48.png
deleted file mode 100644
index 27765d40..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.altform-unplated_targetsize-48.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-100.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-100.png
deleted file mode 100644
index ee254e63..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-100.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-125.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-125.png
deleted file mode 100644
index 8d0afa2f..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-125.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-150.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-150.png
deleted file mode 100644
index 94b7b62d..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-150.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-200.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-200.png
deleted file mode 100644
index 0b183523..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-200.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-400.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-400.png
deleted file mode 100644
index 7a0d2e6d..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.scale-400.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-16.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-16.png
deleted file mode 100644
index 5ba88c56..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-16.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-24.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-24.png
deleted file mode 100644
index 0453592a..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-24.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-256.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-256.png
deleted file mode 100644
index 0c6ac8ce..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-256.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-32.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-32.png
deleted file mode 100644
index fa39f134..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-32.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-48.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-48.png
deleted file mode 100644
index 27765d40..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Square44x44Logo.targetsize-48.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-100.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-100.png
deleted file mode 100644
index 27f2c879..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-100.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-125.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-125.png
deleted file mode 100644
index b383adc0..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-125.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-150.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-150.png
deleted file mode 100644
index 4ce2b519..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-150.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-200.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-200.png
deleted file mode 100644
index 40e00991..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-200.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-400.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-400.png
deleted file mode 100644
index 74ef4dc0..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/StoreLogo.scale-400.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-100.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-100.png
deleted file mode 100644
index 7c89d166..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-100.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-125.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-125.png
deleted file mode 100644
index 93dbb92b..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-125.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-150.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-150.png
deleted file mode 100644
index d61f24eb..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-150.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-200.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-200.png
deleted file mode 100644
index b2658bb0..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-200.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-400.png b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-400.png
deleted file mode 100644
index ea15e888..00000000
Binary files a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Images/Wide310x150Logo.scale-400.png and /dev/null differ
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Package.appxmanifest b/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Package.appxmanifest
deleted file mode 100644
index e9d12735..00000000
--- a/ClipboardCanvas.Package/ClipboardCanvas.Package (Package)/Package.appxmanifest
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
-
- Clipboard Canvas
- d2dyno
- Images\StoreLogo.png
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package/App.xaml b/ClipboardCanvas.Package/ClipboardCanvas.Package/App.xaml
deleted file mode 100644
index c2d91310..00000000
--- a/ClipboardCanvas.Package/ClipboardCanvas.Package/App.xaml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package/App.xaml.cs b/ClipboardCanvas.Package/ClipboardCanvas.Package/App.xaml.cs
deleted file mode 100644
index 96b00e4a..00000000
--- a/ClipboardCanvas.Package/ClipboardCanvas.Package/App.xaml.cs
+++ /dev/null
@@ -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 ClipboardCanvas.Package
-{
- ///
- /// Provides application-specific behavior to supplement the default Application class.
- ///
- public partial class App : Application
- {
- ///
- /// 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().
- ///
- public App()
- {
- this.InitializeComponent();
- }
-
- ///
- /// 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.
- ///
- /// Details about the launch request and process.
- protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
- {
- m_window = new MainWindow();
- m_window.Activate();
- }
-
- private Window m_window;
- }
-}
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package/ClipboardCanvas.Package.csproj b/ClipboardCanvas.Package/ClipboardCanvas.Package/ClipboardCanvas.Package.csproj
deleted file mode 100644
index 09e35c27..00000000
--- a/ClipboardCanvas.Package/ClipboardCanvas.Package/ClipboardCanvas.Package.csproj
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
- WinExe
- net6.0-windows10.0.19041.0
- 10.0.17763.0
- ClipboardCanvas.Package
- app.manifest
- x86;x64;arm64
- win10-x86;win10-x64;win10-arm64
- true
-
-
-
-
-
-
-
-
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package/MainWindow.xaml b/ClipboardCanvas.Package/ClipboardCanvas.Package/MainWindow.xaml
deleted file mode 100644
index 3308195d..00000000
--- a/ClipboardCanvas.Package/ClipboardCanvas.Package/MainWindow.xaml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
diff --git a/ClipboardCanvas.Package/ClipboardCanvas.Package/app.manifest b/ClipboardCanvas.Package/ClipboardCanvas.Package/app.manifest
deleted file mode 100644
index a1c3bc17..00000000
--- a/ClipboardCanvas.Package/ClipboardCanvas.Package/app.manifest
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
- true/PM
- PerMonitorV2, PerMonitor
-
-
-
diff --git a/ClipboardCanvas.sln b/ClipboardCanvas.sln
index 9726e00c..b0675225 100644
--- a/ClipboardCanvas.sln
+++ b/ClipboardCanvas.sln
@@ -1,63 +1,119 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
-VisualStudioVersion = 17.0.31912.275
+VisualStudioVersion = 17.8.34309.116
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClipboardCanvas", "ClipboardCanvas\ClipboardCanvas.csproj", "{719C97A4-8A77-4B8E-97DF-3B01BA32C16E}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{18CB587D-DFE1-4C01-92E5-7FDBE43BBEFF}"
EndProject
-Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "ClipboardCanvas.Package (Package)", "ClipboardCanvas.Package\ClipboardCanvas.Package (Package)\ClipboardCanvas.Package (Package).wapproj", "{EB0170CE-7213-48C2-8340-AEAB2A0D40F8}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sdk", "Sdk", "{595861A4-F6B2-4231-816B-21EB0BEE71CB}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Platforms", "Platforms", "{E216C759-D5F9-4DC0-B48B-A5D68394A5F4}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClipboardCanvas.WinUI", "src\Platforms\ClipboardCanvas.WinUI\ClipboardCanvas.WinUI.csproj", "{31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClipboardCanvas.Sdk", "src\ClipboardCanvas.Sdk\ClipboardCanvas.Sdk.csproj", "{0C11D681-11A3-4074-AE57-57734A138473}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClipboardCanvas.UI", "src\Platforms\ClipboardCanvas.UI\ClipboardCanvas.UI.csproj", "{FECB96DE-B383-4A58-92B7-6B35DDC64A66}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClipboardCanvas.Shared", "src\ClipboardCanvas.Shared\ClipboardCanvas.Shared.csproj", "{8278EA42-4458-4144-9815-D2C7CE5D8183}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|arm64 = Debug|arm64
+ Debug|Any CPU = Debug|Any CPU
+ Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
- Release|arm64 = Release|arm64
+ Release|Any CPU = Release|Any CPU
+ Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Debug|arm64.ActiveCfg = Debug|arm64
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Debug|arm64.Build.0 = Debug|arm64
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Debug|arm64.Deploy.0 = Debug|arm64
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Debug|x64.ActiveCfg = Debug|x64
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Debug|x64.Build.0 = Debug|x64
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Debug|x64.Deploy.0 = Debug|x64
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Debug|x86.ActiveCfg = Debug|x86
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Debug|x86.Build.0 = Debug|x86
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Debug|x86.Deploy.0 = Debug|x86
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Release|arm64.ActiveCfg = Release|arm64
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Release|arm64.Build.0 = Release|arm64
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Release|arm64.Deploy.0 = Release|arm64
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Release|x64.ActiveCfg = Release|x64
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Release|x64.Build.0 = Release|x64
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Release|x64.Deploy.0 = Release|x64
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Release|x86.ActiveCfg = Release|x86
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Release|x86.Build.0 = Release|x86
- {719C97A4-8A77-4B8E-97DF-3B01BA32C16E}.Release|x86.Deploy.0 = Release|x86
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Debug|arm64.ActiveCfg = Debug|arm64
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Debug|arm64.Build.0 = Debug|arm64
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Debug|arm64.Deploy.0 = Debug|arm64
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Debug|x64.ActiveCfg = Debug|x64
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Debug|x64.Build.0 = Debug|x64
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Debug|x64.Deploy.0 = Debug|x64
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Debug|x86.ActiveCfg = Debug|x86
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Debug|x86.Build.0 = Debug|x86
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Debug|x86.Deploy.0 = Debug|x86
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Release|arm64.ActiveCfg = Release|arm64
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Release|arm64.Build.0 = Release|arm64
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Release|arm64.Deploy.0 = Release|arm64
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Release|x64.ActiveCfg = Release|x64
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Release|x64.Build.0 = Release|x64
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Release|x64.Deploy.0 = Release|x64
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Release|x86.ActiveCfg = Release|x86
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Release|x86.Build.0 = Release|x86
- {EB0170CE-7213-48C2-8340-AEAB2A0D40F8}.Release|x86.Deploy.0 = Release|x86
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Debug|Any CPU.ActiveCfg = Debug|x64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Debug|Any CPU.Build.0 = Debug|x64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Debug|Any CPU.Deploy.0 = Debug|x64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Debug|ARM64.Build.0 = Debug|ARM64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Debug|x64.ActiveCfg = Debug|x64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Debug|x64.Build.0 = Debug|x64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Debug|x64.Deploy.0 = Debug|x64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Debug|x86.ActiveCfg = Debug|x86
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Debug|x86.Build.0 = Debug|x86
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Debug|x86.Deploy.0 = Debug|x86
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Release|Any CPU.ActiveCfg = Release|x64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Release|Any CPU.Build.0 = Release|x64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Release|Any CPU.Deploy.0 = Release|x64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Release|ARM64.ActiveCfg = Release|ARM64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Release|ARM64.Build.0 = Release|ARM64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Release|ARM64.Deploy.0 = Release|ARM64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Release|x64.ActiveCfg = Release|x64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Release|x64.Build.0 = Release|x64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Release|x64.Deploy.0 = Release|x64
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Release|x86.ActiveCfg = Release|x86
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Release|x86.Build.0 = Release|x86
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76}.Release|x86.Deploy.0 = Release|x86
+ {0C11D681-11A3-4074-AE57-57734A138473}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Debug|x64.Build.0 = Debug|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Debug|x86.Build.0 = Debug|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Release|ARM64.Build.0 = Release|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Release|x64.ActiveCfg = Release|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Release|x64.Build.0 = Release|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Release|x86.ActiveCfg = Release|Any CPU
+ {0C11D681-11A3-4074-AE57-57734A138473}.Release|x86.Build.0 = Release|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Debug|x64.Build.0 = Debug|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Debug|x86.Build.0 = Debug|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Release|ARM64.Build.0 = Release|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Release|x64.ActiveCfg = Release|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Release|x64.Build.0 = Release|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Release|x86.ActiveCfg = Release|Any CPU
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66}.Release|x86.Build.0 = Release|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Debug|x64.Build.0 = Debug|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Debug|x86.Build.0 = Debug|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Release|ARM64.Build.0 = Release|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Release|x64.ActiveCfg = Release|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Release|x64.Build.0 = Release|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Release|x86.ActiveCfg = Release|Any CPU
+ {8278EA42-4458-4144-9815-D2C7CE5D8183}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {31DB0DD6-A5F4-4620-8AE9-5DAD218E9F76} = {E216C759-D5F9-4DC0-B48B-A5D68394A5F4}
+ {595861A4-F6B2-4231-816B-21EB0BEE71CB} = {18CB587D-DFE1-4C01-92E5-7FDBE43BBEFF}
+ {E216C759-D5F9-4DC0-B48B-A5D68394A5F4} = {18CB587D-DFE1-4C01-92E5-7FDBE43BBEFF}
+ {0C11D681-11A3-4074-AE57-57734A138473} = {595861A4-F6B2-4231-816B-21EB0BEE71CB}
+ {FECB96DE-B383-4A58-92B7-6B35DDC64A66} = {E216C759-D5F9-4DC0-B48B-A5D68394A5F4}
+ {8278EA42-4458-4144-9815-D2C7CE5D8183} = {595861A4-F6B2-4231-816B-21EB0BEE71CB}
+ EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {E0B2E803-C8A6-4838-88C0-4C9F87A0A480}
+ SolutionGuid = {A79E5126-51C1-4BE8-8CFD-1CD4482CF341}
EndGlobalSection
EndGlobal
diff --git a/ClipboardCanvas/App.xaml b/ClipboardCanvas/App.xaml
deleted file mode 100644
index d2009231..00000000
--- a/ClipboardCanvas/App.xaml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- 641
- 1008
-
-
-
-
-
- 4
-
-
-
-
-
-
-
diff --git a/ClipboardCanvas/App.xaml.cs b/ClipboardCanvas/App.xaml.cs
deleted file mode 100644
index 67afd05e..00000000
--- a/ClipboardCanvas/App.xaml.cs
+++ /dev/null
@@ -1,221 +0,0 @@
-using System;
-using Microsoft.UI.Xaml;
-using System.Diagnostics;
-using System.Threading.Tasks;
-using Windows.UI.Notifications;
-using System.Runtime.ExceptionServices;
-using Microsoft.Extensions.DependencyInjection;
-using CommunityToolkit.Mvvm.DependencyInjection;
-using CommunityToolkit.WinUI.Notifications;
-using ClipboardCanvas.GlobalizationExtensions;
-using ClipboardCanvas.Helpers;
-using ClipboardCanvas.Services;
-using ClipboardCanvas.Services.Implementation;
-using Microsoft.AppCenter;
-using Microsoft.AppCenter.Analytics;
-using Microsoft.AppCenter.Crashes;
-
-// To learn more about WinUI, the WinUI project structure,
-// and more about our project templates, see: http://aka.ms/winui-project-info.
-
-namespace ClipboardCanvas
-{
- ///
- /// Provides application-specific behavior to supplement the default Application class.
- ///
- public partial class App : Application
- {
- private Window m_window;
-
- ///
- /// to resolve application services.
- ///
- public IServiceProvider Services { get; private set; }
-
- ///
- /// 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().
- ///
- public App()
- {
- this.InitializeComponent();
-
- // Configure exception handlers
- this.UnhandledException += App_UnhandledException;
- TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;
- if (Constants.Debugging.FIRST_CHANCE_EXCEPTION_DEBUGGING)
- {
- AppDomain.CurrentDomain.FirstChanceException += CurrentDomain_FirstChanceException;
- }
-
- // Configure services
- Services = ConfigureServices();
- Ioc.Default.ConfigureServices(Services);
-
- // Start AppCenter
-#if !DEBUG
- AppCenter.Start("c7fb111e-c2ba-4c4e-80f9-a919c9939224", typeof(Analytics), typeof(Crashes));
-#endif
- }
-
- ///
- /// 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.
- ///
- /// Details about the launch request and process.
- protected override void OnLaunched(LaunchActivatedEventArgs args)
- {
- m_window = new MainWindow();
- m_window.Activate();
- }
-
- private IServiceProvider ConfigureServices()
- {
- ServiceCollection services = new ServiceCollection();
-
- services
- .AddSingleton()
- .AddSingleton()
- .AddSingleton()
- .AddSingleton()
- .AddSingleton()
- .AddSingleton()
- .AddSingleton()
- .AddSingleton()
-
- // Settings services
- .AddSingleton((sp) => new UserSettingsService(sp.GetService()))
- .AddSingleton()
- .AddSingleton()
- .AddSingleton()
- .AddSingleton()
- .AddSingleton();
-
- return services.BuildServiceProvider();
- }
-
- private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e) => LogException(e.Exception);
-
- private void App_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e) => LogException(e.Exception, () => e.Handled = true);
-
- private void CurrentDomain_FirstChanceException(object sender, FirstChanceExceptionEventArgs e) => LogException(e.Exception);
-
- private void LogException(Exception e, Action tryHandleException = null)
- {
-#if DEBUG
- if (tryHandleException == null)
- {
- tryHandleException = () => { };
- }
-
- Debug.WriteLine("--------- UNHANDLED EXCEPTION ---------");
- if (e != null)
- {
- Debug.WriteLine($"\n>>>> HRESULT: {e.HResult} (0x{e.HResult.ToString("X")})\n");
- if (!string.IsNullOrEmpty(e.Message))
- {
- Debug.WriteLine("\n--- MESSAGE ---");
- Debug.WriteLine(e.Message);
- }
- if (!string.IsNullOrEmpty(e.StackTrace))
- {
- Debug.WriteLine("\n--- STACKTRACE ---");
- Debug.WriteLine(e.StackTrace);
- }
- if (!string.IsNullOrEmpty(e.Source))
- {
- Debug.WriteLine("\n--- SOURCE ---");
- Debug.WriteLine(e.Source);
- }
- if (e.InnerException != null)
- {
- Debug.WriteLine("\n--- INNER ---");
- Debug.WriteLine(e.InnerException);
- }
- if (!string.IsNullOrEmpty(e.HelpLink))
- {
- Debug.WriteLine("\n--- HELP LINK ---");
- Debug.WriteLine(e.HelpLink);
- }
- }
- else
- {
- Debug.WriteLine("\nException is null!\n");
- }
-
- Debug.WriteLine("---------------------------------------");
-
- Debugger.Break(); // Please check "Output Window" for exception details (View -> Output Window) (CTRL + ALT + O)
-
- if (false) // Can only step-in manually in debug mode
- {
-#pragma warning disable CS0162 // Unreachable code detected
- tryHandleException();
-#pragma warning restore CS0162 // Unreachable code detected
- }
-#else
- LogExceptionToFile(e);
-
- IUserSettingsService userSettingsService = null;
- try
- {
- userSettingsService = Ioc.Default.GetService();
- }
- catch { }
-
- bool pushErrorNotification = userSettingsService?.PushErrorNotification ?? false;
-
- if (pushErrorNotification)
- {
- PushErrorNotification();
- }
-#endif
- }
-
- private void LogExceptionToFile(Exception e)
- {
- LoggingHelpers.SafeLogExceptionToFile(e);
- }
-
- private void PushErrorNotification()
- {
- // Create custom notification
- ToastContent toastContent = new ToastContent()
- {
- Visual = new ToastVisual()
- {
- BindingGeneric = new ToastBindingGeneric()
- {
- Children =
- {
- new AdaptiveText()
- {
- Text = "ClipboardCanvasCrashTitle".GetLocalized2()
- },
- new AdaptiveText()
- {
- Text = "ClipboardCanvasCrashSubtitle".GetLocalized2()
- }
- }
- }
- },
- Actions = new ToastActionsCustom()
- {
- Buttons =
- {
- new ToastButton("ClipboardCanvasCrashReportIssue".GetLocalized2(), Constants.UI.Notifications.TOAST_NOTIFICATION_ERROR_ARGUMENT)
- {
- ActivationType = ToastActivationType.Foreground
- }
- }
- }
- };
-
- // Compile the notification to native ToastNotification
- ToastNotification toastNotificationNative = new ToastNotification(toastContent.GetXml());
-
- // Push the native ToastNotification
- ToastNotificationManager.CreateToastNotifier().Show(toastNotificationNative);
- }
- }
-}
diff --git a/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-100.png b/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-100.png
deleted file mode 100644
index ef35cda6..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-100.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-125.png b/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-125.png
deleted file mode 100644
index 6c6e885d..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-125.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-150.png b/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-150.png
deleted file mode 100644
index ba2d145a..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-150.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-200.png b/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-200.png
deleted file mode 100644
index b86336b0..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-200.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-400.png b/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-400.png
deleted file mode 100644
index 1679f9cc..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/LargeTile.scale-400.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-100.png b/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-100.png
deleted file mode 100644
index 2e2e9c2f..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-100.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-125.png b/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-125.png
deleted file mode 100644
index 19c61dda..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-125.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-150.png b/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-150.png
deleted file mode 100644
index dfb2782f..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-150.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-200.png b/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-200.png
deleted file mode 100644
index d62de8f5..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-200.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-400.png b/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-400.png
deleted file mode 100644
index 92bc4720..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/SmallTile.scale-400.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-100.png b/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-100.png
deleted file mode 100644
index b2658bb0..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-100.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-125.png b/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-125.png
deleted file mode 100644
index 574a5b52..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-125.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-150.png b/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-150.png
deleted file mode 100644
index 1c842a18..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-150.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-200.png b/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-200.png
deleted file mode 100644
index ea15e888..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-200.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-400.png b/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-400.png
deleted file mode 100644
index 4d74d48f..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/SplashScreen.scale-400.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-100.png b/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-100.png
deleted file mode 100644
index becd9a34..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-100.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-125.png b/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-125.png
deleted file mode 100644
index 2fdbe33e..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-125.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-150.png b/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-150.png
deleted file mode 100644
index b5ef2a1d..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-150.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-200.png b/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-200.png
deleted file mode 100644
index 6c6ecb2a..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-200.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-400.png b/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-400.png
deleted file mode 100644
index f88a3650..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square150x150Logo.scale-400.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-16.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-16.png
deleted file mode 100644
index 5ba88c56..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-16.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-24.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-24.png
deleted file mode 100644
index 0453592a..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-24.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-256.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-256.png
deleted file mode 100644
index 0c6ac8ce..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-256.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-32.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-32.png
deleted file mode 100644
index fa39f134..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-32.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-48.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-48.png
deleted file mode 100644
index 27765d40..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-lightunplated_targetsize-48.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-16.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-16.png
deleted file mode 100644
index 5ba88c56..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-16.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-24.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-24.png
deleted file mode 100644
index 0453592a..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-24.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-256.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-256.png
deleted file mode 100644
index 0c6ac8ce..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-256.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-32.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-32.png
deleted file mode 100644
index fa39f134..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-32.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-48.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-48.png
deleted file mode 100644
index 27765d40..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.altform-unplated_targetsize-48.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-100.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-100.png
deleted file mode 100644
index ee254e63..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-100.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-125.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-125.png
deleted file mode 100644
index 8d0afa2f..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-125.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-150.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-150.png
deleted file mode 100644
index 94b7b62d..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-150.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-200.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-200.png
deleted file mode 100644
index 0b183523..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-200.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-400.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-400.png
deleted file mode 100644
index 7a0d2e6d..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.scale-400.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-16.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-16.png
deleted file mode 100644
index 5ba88c56..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-16.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-24.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-24.png
deleted file mode 100644
index 0453592a..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-24.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-256.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-256.png
deleted file mode 100644
index 0c6ac8ce..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-256.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-32.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-32.png
deleted file mode 100644
index fa39f134..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-32.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-48.png b/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-48.png
deleted file mode 100644
index 27765d40..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Square44x44Logo.targetsize-48.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-100.png b/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-100.png
deleted file mode 100644
index 27f2c879..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-100.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-125.png b/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-125.png
deleted file mode 100644
index b383adc0..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-125.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-150.png b/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-150.png
deleted file mode 100644
index 4ce2b519..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-150.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-200.png b/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-200.png
deleted file mode 100644
index 40e00991..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-200.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-400.png b/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-400.png
deleted file mode 100644
index 74ef4dc0..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/StoreLogo.scale-400.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-100.png b/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-100.png
deleted file mode 100644
index 7c89d166..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-100.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-125.png b/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-125.png
deleted file mode 100644
index 93dbb92b..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-125.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-150.png b/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-150.png
deleted file mode 100644
index d61f24eb..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-150.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-200.png b/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-200.png
deleted file mode 100644
index b2658bb0..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-200.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-400.png b/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-400.png
deleted file mode 100644
index ea15e888..00000000
Binary files a/ClipboardCanvas/Assets/AppIcon/Wide310x150Logo.scale-400.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/AppLogo.png b/ClipboardCanvas/Assets/AppLogo.png
deleted file mode 100644
index f88a3650..00000000
Binary files a/ClipboardCanvas/Assets/AppLogo.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/Fonts/CalcMDL2.ttf b/ClipboardCanvas/Assets/Fonts/CalcMDL2.ttf
deleted file mode 100644
index fda49927..00000000
Binary files a/ClipboardCanvas/Assets/Fonts/CalcMDL2.ttf and /dev/null differ
diff --git a/ClipboardCanvas/Assets/HomepageImage.png b/ClipboardCanvas/Assets/HomepageImage.png
deleted file mode 100644
index ff9ff012..00000000
Binary files a/ClipboardCanvas/Assets/HomepageImage.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/InfiniteCanvasImage.png b/ClipboardCanvas/Assets/InfiniteCanvasImage.png
deleted file mode 100644
index dda2ecdd..00000000
Binary files a/ClipboardCanvas/Assets/InfiniteCanvasImage.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/NewCanvasImage.png b/ClipboardCanvas/Assets/NewCanvasImage.png
deleted file mode 100644
index e9524790..00000000
Binary files a/ClipboardCanvas/Assets/NewCanvasImage.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/OOBE/OOBE_CollectionPreview.png b/ClipboardCanvas/Assets/OOBE/OOBE_CollectionPreview.png
deleted file mode 100644
index e23d7756..00000000
Binary files a/ClipboardCanvas/Assets/OOBE/OOBE_CollectionPreview.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/OOBE/OOBE_Collections.png b/ClipboardCanvas/Assets/OOBE/OOBE_Collections.png
deleted file mode 100644
index 8842fe3c..00000000
Binary files a/ClipboardCanvas/Assets/OOBE/OOBE_Collections.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/OOBE/OOBE_InfiniteCanvas.png b/ClipboardCanvas/Assets/OOBE/OOBE_InfiniteCanvas.png
deleted file mode 100644
index a0e7fa72..00000000
Binary files a/ClipboardCanvas/Assets/OOBE/OOBE_InfiniteCanvas.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/OOBE/OOBE_OneCanvas.png b/ClipboardCanvas/Assets/OOBE/OOBE_OneCanvas.png
deleted file mode 100644
index d1a331e4..00000000
Binary files a/ClipboardCanvas/Assets/OOBE/OOBE_OneCanvas.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/OOBE/OOBE_ReferenceFiles.png b/ClipboardCanvas/Assets/OOBE/OOBE_ReferenceFiles.png
deleted file mode 100644
index e1b46e2b..00000000
Binary files a/ClipboardCanvas/Assets/OOBE/OOBE_ReferenceFiles.png and /dev/null differ
diff --git a/ClipboardCanvas/Assets/OOBE/OOBE_Timeline.png b/ClipboardCanvas/Assets/OOBE/OOBE_Timeline.png
deleted file mode 100644
index 85068ab7..00000000
Binary files a/ClipboardCanvas/Assets/OOBE/OOBE_Timeline.png and /dev/null differ
diff --git a/ClipboardCanvas/AttachedProperties/BaseAttachedProperty.cs b/ClipboardCanvas/AttachedProperties/BaseAttachedProperty.cs
deleted file mode 100644
index 81258754..00000000
--- a/ClipboardCanvas/AttachedProperties/BaseAttachedProperty.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-using System;
-using Microsoft.UI.Xaml;
-
-namespace ClipboardCanvas.AttachedProperties
-{
- ///
- /// A control tied wrapper for to attach properties
- ///
- /// The parent class to be the attached property
- /// The type of this attached property
- /// The type that this property can be attached to
- public abstract class BaseAttachedProperty
- where TParent : new()
- where TTarget : DependencyObject
- {
- #region Public Events
-
- ///
- /// Fired when the value changes
- ///
- public event Action ValueChanged;
-
- #endregion
-
- #region Public Properties
-
- ///
- /// A singleton instance of our parent class
- ///
- public static TParent Instance { get; private set; } = new TParent();
-
- #endregion
-
- #region Attached Property Definitions
-
- ///
- /// The attached property for this class
- ///
- public static readonly DependencyProperty ValueProperty = DependencyProperty.RegisterAttached(
- "Value",
- typeof(TProperty),
- typeof(TTarget),
- new PropertyMetadata(
- default(TProperty),
- new PropertyChangedCallback(OnValuePropertyChanged)));
-
- ///
- /// The callback event when the is changed
- ///
- /// The UI element that had it's property changed
- /// The arguments for the event
- private static void OnValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- // Call the parent function
- (Instance as BaseAttachedProperty)?.OnValueChanged(d, e);
-
- // Call event listeners
- (Instance as BaseAttachedProperty)?.ValueChanged?.Invoke(d, e);
- }
-
- ///
- /// Gets the attached property
- ///
- /// The element to get the property from
- ///
- public static TProperty GetValue(DependencyObject d) => (TProperty)d.GetValue(ValueProperty);
-
- ///
- /// Sets the attached property
- ///
- /// The element to get the property from
- /// The value to set the property to
- public static void SetValue(DependencyObject d, TProperty value) => d.SetValue(ValueProperty, value);
-
- #endregion
-
- #region Event Methods
-
- ///
- /// The method that is called when any attached property of this type is changed
- ///
- /// The UI element that this property was changed for
- /// The arguments for this event
- public virtual void OnValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
- {
- this.OnValueChanged((TTarget)sender, (TProperty)e.NewValue);
- }
-
- protected abstract void OnValueChanged(TTarget sender, TProperty newValue);
-
- #endregion
- }
-}
diff --git a/ClipboardCanvas/AttachedProperties/BaseGenericAttachedProperty.cs b/ClipboardCanvas/AttachedProperties/BaseGenericAttachedProperty.cs
deleted file mode 100644
index efe4b3f5..00000000
--- a/ClipboardCanvas/AttachedProperties/BaseGenericAttachedProperty.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-using Microsoft.UI.Xaml;
-
-namespace ClipboardCanvas.AttachedProperties
-{
- ///
- /// Generic control tied wrapper for to attach properties
- ///
- /// The parent class to be the attached property
- /// The type of this attached property
- public abstract class BaseGenericAttachedProperty : BaseAttachedProperty
- where TParent : new()
- {
- }
-}
diff --git a/ClipboardCanvas/AttachedProperties/BaseObservableCollectionAttachedProperty.cs b/ClipboardCanvas/AttachedProperties/BaseObservableCollectionAttachedProperty.cs
deleted file mode 100644
index a74933ce..00000000
--- a/ClipboardCanvas/AttachedProperties/BaseObservableCollectionAttachedProperty.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using Microsoft.UI.Xaml;
-using System.Collections.Specialized;
-using System.Collections.ObjectModel;
-
-namespace ClipboardCanvas.AttachedProperties
-{
- public abstract class BaseObservableCollectionAttachedProperty : BaseAttachedProperty, TTarget>
- where TParent : new()
- where TTarget : DependencyObject
- {
- private ObservableCollection _collection;
-
- private TTarget _sender;
-
- protected override void OnValueChanged(TTarget sender, ObservableCollection newValue)
- {
- this._collection = newValue;
- this._sender = sender;
- }
-
- public override void OnValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
- {
- if (e.OldValue is INotifyCollectionChanged notifyCollectionChangedOld)
- {
- notifyCollectionChangedOld.CollectionChanged -= ObservableCollection_CollectionChangedInternal;
- }
-
- if (e.NewValue is INotifyCollectionChanged notifyCollectionChangedNew)
- {
- notifyCollectionChangedNew.CollectionChanged -= ObservableCollection_CollectionChangedInternal;
- notifyCollectionChangedNew.CollectionChanged += ObservableCollection_CollectionChangedInternal;
- }
-
- base.OnValueChanged(sender, e);
- }
-
- private void ObservableCollection_CollectionChangedInternal(object sender, NotifyCollectionChangedEventArgs e)
- {
- ObservableCollection_CollectionChanged(this._sender, this._collection, e);
- }
-
- protected abstract void ObservableCollection_CollectionChanged(object sender, ObservableCollection collection, NotifyCollectionChangedEventArgs e);
- }
-}
diff --git a/ClipboardCanvas/AttachedProperties/FrameAttachedProperties.cs b/ClipboardCanvas/AttachedProperties/FrameAttachedProperties.cs
deleted file mode 100644
index c3bcc099..00000000
--- a/ClipboardCanvas/AttachedProperties/FrameAttachedProperties.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using Microsoft.UI.Xaml.Controls;
-
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Pages.SettingsPages;
-using ClipboardCanvas.DataModels.Navigation;
-
-namespace ClipboardCanvas.AttachedProperties
-{
- public class SettingsFrameNavigationAttachedProperty : BaseAttachedProperty
- {
- protected override void OnValueChanged(Frame sender, SettingsFrameNavigationDataModel newValue)
- {
- switch (newValue.pageType)
- {
- case SettingsPageType.General:
- {
- sender.Navigate(typeof(SettingsGeneralPage), newValue, newValue.transitionInfo);
- break;
- }
-
- case SettingsPageType.Pasting:
- {
- sender.Navigate(typeof(SettingsPastingPage), newValue, newValue.transitionInfo);
- break;
- }
-
- case SettingsPageType.Notifications:
- {
- sender.Navigate(typeof(SettingsNotificationsPage), newValue, newValue.transitionInfo);
- break;
- }
-
- case SettingsPageType.About:
- {
- sender.Navigate(typeof(SettingsAboutPage), newValue, newValue.transitionInfo);
- break;
- }
- }
- }
- }
-}
diff --git a/ClipboardCanvas/AttachedProperties/InAppNotificationAttachedProperties.cs b/ClipboardCanvas/AttachedProperties/InAppNotificationAttachedProperties.cs
deleted file mode 100644
index b19b97d6..00000000
--- a/ClipboardCanvas/AttachedProperties/InAppNotificationAttachedProperties.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using CommunityToolkit.WinUI.UI.Controls;
-
-namespace ClipboardCanvas.AttachedProperties
-{
- public class InAppNotificationShowHideControlAttachedProperty : BaseAttachedProperty
- {
- protected override void OnValueChanged(InAppNotification sender, bool newValue)
- {
- if (newValue)
- {
- sender.Show();
- }
- else
- {
- sender.Dismiss();
- }
- }
- }
-}
diff --git a/ClipboardCanvas/AttachedProperties/MenuFlyoutAttachedProperties.cs b/ClipboardCanvas/AttachedProperties/MenuFlyoutAttachedProperties.cs
deleted file mode 100644
index b439564e..00000000
--- a/ClipboardCanvas/AttachedProperties/MenuFlyoutAttachedProperties.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using Microsoft.UI.Xaml.Controls;
-using System.Collections.Specialized;
-using System.Collections;
-using System.Linq;
-using ClipboardCanvas.Helpers;
-using ClipboardCanvas.ViewModels.ContextMenu;
-
-namespace ClipboardCanvas.AttachedProperties
-{
- public class FlyoutItemsSourceAttachedProperty : BaseObservableCollectionAttachedProperty
- {
- protected override void ObservableCollection_CollectionChanged(object sender, ObservableCollection collection, NotifyCollectionChangedEventArgs e)
- {
- if (sender is not MenuFlyout menuFlyout || collection == null)
- {
- return;
- }
-
- UpdateMenuFlyoutItems(menuFlyout, collection, e.NewItems);
- }
-
- protected override void OnValueChanged(MenuFlyout sender, ObservableCollection newValue)
- {
- base.OnValueChanged(sender, newValue);
-
- UpdateMenuFlyoutItems(sender, newValue, newValue);
- }
-
- private void UpdateMenuFlyoutItems(MenuFlyout menuFlyout, IList collection, IList newItems)
- {
- if (newItems == null || newItems.Count == 0)
- {
- menuFlyout.Items.Clear();
- return;
- }
-
- IEnumerable flyoutItems = FlyoutHelpers.GetMenuFlyoutItems(collection);
-
- menuFlyout.Items.Clear();
- foreach (var item in flyoutItems)
- {
- menuFlyout.Items.Add(item);
- }
- }
- }
-}
diff --git a/ClipboardCanvas/AttachedProperties/TextBoxAttachedProperties.cs b/ClipboardCanvas/AttachedProperties/TextBoxAttachedProperties.cs
deleted file mode 100644
index 9245d15e..00000000
--- a/ClipboardCanvas/AttachedProperties/TextBoxAttachedProperties.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using Microsoft.UI.Xaml;
-using Microsoft.UI.Xaml.Controls;
-
-namespace ClipboardCanvas.AttachedProperties
-{
- public class TextBoxFocusAttachedProperty : BaseGenericAttachedProperty
- {
- protected override void OnValueChanged(DependencyObject sender, bool newValue)
- {
- if (sender is not TextBox textBox)
- {
- return;
- }
-
- // Focus
- if (newValue)
- {
- textBox.Focus(FocusState.Programmatic);
- textBox.SelectAll();
- }
- else // Unfocus
- {
- // Cannot be unfocused
- }
- }
- }
-}
diff --git a/ClipboardCanvas/AttachedProperties/ViewModelAttachedProperties.cs b/ClipboardCanvas/AttachedProperties/ViewModelAttachedProperties.cs
deleted file mode 100644
index 84cca8dc..00000000
--- a/ClipboardCanvas/AttachedProperties/ViewModelAttachedProperties.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using CommunityToolkit.Mvvm.ComponentModel;
-using Microsoft.UI.Xaml;
-
-namespace ClipboardCanvas.AttachedProperties
-{
- public class BaseViewModelAttachedProperty : BaseAttachedProperty, TViewModel, TTarget>
- where TViewModel : ObservableObject
- where TTarget : FrameworkElement
- {
- protected override void OnValueChanged(TTarget sender, TViewModel newValue)
- {
- sender.DataContext = newValue;
- }
- }
-}
diff --git a/ClipboardCanvas/CanavsPasteModels/BasePasteModel.cs b/ClipboardCanvas/CanavsPasteModels/BasePasteModel.cs
deleted file mode 100644
index 7bfadd55..00000000
--- a/ClipboardCanvas/CanavsPasteModels/BasePasteModel.cs
+++ /dev/null
@@ -1,191 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-using Windows.ApplicationModel.DataTransfer;
-using Windows.Storage;
-
-using ClipboardCanvas.DataModels;
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Helpers.Filesystem;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using ClipboardCanvas.ReferenceItems;
-using ClipboardCanvas.CanvasFileReceivers;
-using ClipboardCanvas.EventArguments.CanvasControl;
-using ClipboardCanvas.Contexts.Operations;
-using ClipboardCanvas.CanvasLoadModels;
-using ClipboardCanvas.Helpers;
-using ClipboardCanvas.Extensions;
-
-namespace ClipboardCanvas.CanavsPasteModels
-{
- public abstract class BasePasteModel : IPasteModel, ILoadModel
- {
- protected IStorageItem pastedItem;
-
- protected string customName;
-
- protected ICanvasItemReceiverModel canvasItemReceiver;
-
- protected IOperationContext operationContext;
-
- protected IOperationContextReceiver operationContextReceiver;
-
- protected CancellationToken cancellationToken;
-
- protected CanvasItem canvasItem;
-
- protected IStorageItem associatedItem => canvasItem.AssociatedItem;
-
- protected StorageFile associatedFile => associatedItem as StorageFile;
-
- protected Task sourceItem => canvasItem.SourceItem;
-
- protected Task sourceFile => Task.Run(async () => (await sourceItem) as StorageFile);
-
- protected readonly SafeWrapperResult ItemIsNotAFileResult = new SafeWrapperResult(OperationErrorCode.InvalidArgument, new ArgumentException(), "The provided item is not a file.");
-
- public bool IsContentAsReference { get; protected set; }
-
- public bool CanPasteReference { get; protected set; }
-
- #region Events
-
- public event EventHandler OnTipTextUpdateRequestedEvent;
-
- #endregion
-
- public BasePasteModel(ICanvasItemReceiverModel canvasFileReceiver, IOperationContextReceiver operationContextReceiver)
- {
- this.canvasItemReceiver = canvasFileReceiver;
- this.operationContextReceiver = operationContextReceiver;
- }
-
- public virtual async Task> PasteData(DataPackageView dataPackage, bool pasteAsReference, CancellationToken cancellationToken)
- {
- SafeWrapperResult result;
-
- this.cancellationToken = cancellationToken;
- this.IsContentAsReference = pasteAsReference;
-
- result = await SetDataFromDataPackageInternal(dataPackage);
- if (!result)
- {
- return (null, result);
- }
-
- result = await SetCanvasItemInternal();
- if (!result)
- {
- return (null, result);
- }
-
- result = await SaveDataToFileInternal();
- if (!result)
- {
- return (null, result);
- }
-
- return (canvasItem, result);
- }
-
- protected async Task SetDataFromDataPackageInternal(DataPackageView dataPackage)
- {
- if (dataPackage.AvailableFormats.ContainsOnly(StandardDataFormats.StorageItems))
- {
- SafeWrapper> items = await dataPackage.SafeGetStorageItemsAsync();
-
- if (!items)
- {
- return items;
- }
-
- this.pastedItem = items.Result.First();
-
- return await SetDataFromExistingItem(pastedItem);
- }
- else
- {
- IsContentAsReference = false;
- return await SetDataFromDataPackage(dataPackage);
- }
- }
-
- protected async Task SetCanvasItemInternal()
- {
- SafeWrapper canvasItem;
-
- if (IsContentAsReference && pastedItem != null)
- {
- canvasItem = await canvasItemReceiver.CreateNewCanvasItemFromExtension(Constants.FileSystem.REFERENCE_FILE_EXTENSION);
- }
- else
- {
- if (!string.IsNullOrWhiteSpace(customName))
- {
- canvasItem = await canvasItemReceiver.CreateNewCanvasItem(customName);
- }
- else
- {
- canvasItem = await GetCanvasFileFromExtension(canvasItemReceiver);
- }
- }
-
- this.canvasItem = canvasItem;
- return canvasItem;
- }
-
- protected async Task SaveDataToFileInternal()
- {
- if (IsContentAsReference && await sourceItem == null)
- {
- // We need to update the reference file because the one we created is empty
- ReferenceFile referenceFile = await ReferenceFile.CreateReferenceFileFromFile(associatedFile, pastedItem);
- return referenceFile.LastError;
- }
- else
- {
- // If pasting a file and not raw data from clipboard...
- if (pastedItem is StorageFile pastedFile && pastedFile.Path != associatedItem.Path)
- {
- // Signalize that the file is being pasted
- RaiseOnTipTextUpdateRequestedEvent(this, new TipTextUpdateRequestedEventArgs("The file is being pasted, please wait.", TimeSpan.FromMilliseconds(Constants.UI.CanvasContent.FILE_PASTING_TIP_DELAY)));
-
- this.operationContext = operationContextReceiver.GetOperationContext("Pasting file", StatusCenterOperationType.Paste);
-
- // Copy the file data directly when pasting a file and not raw data from clipboard
- return await FilesystemOperations.CopyFileAsync(pastedFile, associatedFile, operationContext);
- }
- else
- {
- return await SaveDataToFile();
- }
- }
- }
-
- public virtual bool CheckCanPasteReference()
- {
- return true;
- }
-
- protected abstract Task> GetCanvasFileFromExtension(ICanvasItemReceiverModel canvasFileReceiver);
-
- protected abstract Task SetDataFromDataPackage(DataPackageView dataPackage);
-
- protected abstract Task SaveDataToFile();
-
- public abstract Task SetDataFromExistingItem(IStorageItem item);
-
- #region Event Raisers
-
- protected void RaiseOnTipTextUpdateRequestedEvent(object s, TipTextUpdateRequestedEventArgs e) => OnTipTextUpdateRequestedEvent?.Invoke(s, e);
-
- #endregion
-
- public virtual void Dispose()
- {
- // TODO: Should anything be put here?
- }
- }
-}
diff --git a/ClipboardCanvas/CanavsPasteModels/FallbackPasteModel.cs b/ClipboardCanvas/CanavsPasteModels/FallbackPasteModel.cs
deleted file mode 100644
index da2f0b97..00000000
--- a/ClipboardCanvas/CanavsPasteModels/FallbackPasteModel.cs
+++ /dev/null
@@ -1,103 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Windows.ApplicationModel.DataTransfer;
-using Windows.Storage;
-using Windows.Storage.FileProperties;
-using Microsoft.UI.Xaml.Media.Imaging;
-using System.IO;
-
-using ClipboardCanvas.CanvasFileReceivers;
-using ClipboardCanvas.Contexts.Operations;
-using ClipboardCanvas.DataModels;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-
-namespace ClipboardCanvas.CanavsPasteModels
-{
- public class FallbackPasteModel : BasePasteModel
- {
- private bool _isFolder;
-
- public StorageItemThumbnail ItemThumbnail { get; private set; }
-
- public string FileName { get; private set; }
-
- public string FilePath { get; private set; }
-
- public DateTime DateCreated { get; private set; }
-
- public DateTime DateModified { get; private set; }
-
- public BitmapImage FileIcon { get; private set; }
-
- public FallbackPasteModel(ICanvasItemReceiverModel canvasFileReceiver, IOperationContextReceiver operationContextReceiver)
- : base(canvasFileReceiver, operationContextReceiver)
- {
- }
-
- protected override Task> GetCanvasFileFromExtension(ICanvasItemReceiverModel canvasFileReceiver)
- {
- return Task.FromResult>((null, SafeWrapperResult.SUCCESS));
- }
-
- protected override Task SaveDataToFile()
- {
- return Task.FromResult(SafeWrapperResult.SUCCESS);
- }
-
- protected override Task SetDataFromDataPackage(DataPackageView dataPackage)
- {
- return Task.FromResult(SafeWrapperResult.SUCCESS);
- }
-
- public override async Task SetDataFromExistingItem(IStorageItem item)
- {
- // Read file properties
- if (item is StorageFile file)
- {
- ItemThumbnail = await file.GetThumbnailAsync(ThumbnailMode.SingleItem);
- }
- else if (item is StorageFolder folder)
- {
- _isFolder = true;
- ItemThumbnail = await folder.GetThumbnailAsync(ThumbnailMode.SingleItem);
- }
-
- this.FileName = item.Name;
- this.FilePath = item.Path;
- this.DateCreated = item.DateCreated.DateTime;
-
- var properties = await item.GetBasicPropertiesAsync();
- this.DateModified = properties.DateModified.DateTime;
-
- FileIcon = new BitmapImage();
- await FileIcon.SetSourceAsync(ItemThumbnail);
-
- return SafeWrapperResult.SUCCESS;
- }
-
- public override bool CheckCanPasteReference()
- {
- return !_isFolder;
- }
-
- public void UpdatePathProperty(string newPath)
- {
- this.FilePath = newPath;
- this.FileName = Path.GetFileName(newPath);
- }
-
- #region IDisposable
-
- public override void Dispose()
- {
- base.Dispose();
-
- ItemThumbnail?.Dispose();
-
- ItemThumbnail = null;
- FileIcon = null;
- }
-
- #endregion
- }
-}
diff --git a/ClipboardCanvas/CanavsPasteModels/IPasteModel.cs b/ClipboardCanvas/CanavsPasteModels/IPasteModel.cs
deleted file mode 100644
index 27ee3386..00000000
--- a/ClipboardCanvas/CanavsPasteModels/IPasteModel.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using Windows.ApplicationModel.DataTransfer;
-
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using ClipboardCanvas.DataModels;
-
-namespace ClipboardCanvas.CanavsPasteModels
-{
- public interface IPasteModel : IDisposable
- {
- bool IsContentAsReference { get; }
-
- Task> PasteData(DataPackageView dataPackage, bool pasteAsReference, CancellationToken cancellationToken);
-
- bool CheckCanPasteReference();
- }
-}
diff --git a/ClipboardCanvas/CanavsPasteModels/ImagePasteModel.cs b/ClipboardCanvas/CanavsPasteModels/ImagePasteModel.cs
deleted file mode 100644
index 7fc13b6f..00000000
--- a/ClipboardCanvas/CanavsPasteModels/ImagePasteModel.cs
+++ /dev/null
@@ -1,213 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Windows.ApplicationModel.DataTransfer;
-using Windows.Graphics.Imaging;
-using Windows.Storage;
-using Windows.Storage.Streams;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
-using Microsoft.UI.Xaml.Media.Imaging;
-
-using ClipboardCanvas.DataModels;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using ClipboardCanvas.Extensions;
-using ClipboardCanvas.CanvasFileReceivers;
-using ClipboardCanvas.Contexts.Operations;
-using ClipboardCanvas.Helpers;
-using ClipboardCanvas.Helpers.Filesystem;
-using System.IO;
-
-namespace ClipboardCanvas.CanavsPasteModels
-{
- public class ImagePasteModel : BasePasteModel
- {
- private bool _wasPastedAsReference;
-
- public SoftwareBitmap SoftwareBitmap { get; private set; }
-
- public BitmapImage GifBitmapImage;
-
- public ImagePasteModel(ICanvasItemReceiverModel canvasFileReceiver, IOperationContextReceiver operationContextReceiver)
- : base (canvasFileReceiver, operationContextReceiver)
- {
- }
-
- public override Task> PasteData(DataPackageView dataPackage, bool pasteAsReference, CancellationToken cancellationToken)
- {
- _wasPastedAsReference = pasteAsReference;
- return base.PasteData(dataPackage, pasteAsReference, cancellationToken);
- }
-
- protected override async Task SetDataFromDataPackage(DataPackageView dataPackage)
- {
- SafeWrapper openedStream = null;
-
- if (dataPackage.Contains(StandardDataFormats.Text)) // Url to file
- {
- if (dataPackage.Contains(StandardDataFormats.StorageItems)) // Url to StorageFile
- {
- SafeWrapper> items = await dataPackage.SafeGetStorageItemsAsync();
-
- if (!items)
- {
- return items;
- }
-
- StorageFile imageFile = items.Result.First() as StorageFile;
- customName = imageFile.Name;
-
- openedStream = await SafeWrapperRoutines.SafeWrapAsync(
- () => imageFile.OpenReadAsync().AsTask());
- }
- else // Download from url
- {
- SafeWrapper url = await dataPackage.SafeGetTextAsync();
-
- if (!url)
- {
- return url;
- }
-
- openedStream = await SafeWrapperRoutines.SafeWrapAsync(
- async () => await (RandomAccessStreamReference.CreateFromUri(new Uri(url))).OpenReadAsync());
- }
- }
- else if (dataPackage.Contains(StandardDataFormats.Bitmap)) // Just image
- {
- SafeWrapper bitmap = await dataPackage.SafeGetBitmapAsync();
- SafeWrapper uri = await dataPackage.SafeGetUriAsync();
-
- if (uri)
- {
- customName = Path.GetFileName(uri.Result.LocalPath);
- if (!Path.HasExtension(customName))
- {
- customName = $"{customName}.png";
- }
- }
-
- if (!bitmap)
- {
- return bitmap;
- }
-
- openedStream = await SafeWrapperRoutines.SafeWrapAsync(
- () => bitmap.Result.OpenReadAsync().AsTask());
-
- }
- else if (dataPackage.Contains(StandardDataFormats.StorageItems)) // File to image
- {
- SafeWrapper> items = await dataPackage.SafeGetStorageItemsAsync();
-
- if (!items)
- {
- return items;
- }
-
- IsContentAsReference = _wasPastedAsReference;
-
- this.pastedItem = items.Result.First();
- return await SetDataFromExistingItem(pastedItem);
- }
-
- openedStream ??= new SafeWrapper(null, ItemIsNotAFileResult);
- if (!openedStream)
- {
- openedStream.Result?.Dispose();
- return openedStream;
- }
-
- return await SafeWrapperRoutines.SafeWrapAsync(async () =>
- {
- using (openedStream.Result)
- {
- BitmapDecoder bitmapDecoder = await BitmapDecoder.CreateAsync(openedStream.Result);
- SoftwareBitmap = await bitmapDecoder.GetSoftwareBitmapAsync();
- }
- });
- }
-
- protected override async Task> GetCanvasFileFromExtension(ICanvasItemReceiverModel canvasFileReceiver)
- {
- return await canvasFileReceiver.CreateNewCanvasItemFromExtension(".png");
- }
-
- protected override async Task SaveDataToFile()
- {
- SafeWrapperResult result;
-
- BitmapEncoder bitmapEncoder = null;
- result = await SafeWrapperRoutines.SafeWrapAsync(async () =>
- {
- using (IRandomAccessStream fileStream = await (await sourceFile).OpenAsync(FileAccessMode.ReadWrite))
- {
- bitmapEncoder = await BitmapEncoder.CreateAsync(BitmapEncoder.PngEncoderId, fileStream);
- bitmapEncoder.SetSoftwareBitmap(SoftwareBitmap);
- await bitmapEncoder.FlushAsync();
- }
- });
-
- if (!result)
- {
- const int WINCODEC_ERR_UNSUPPORTEDOPERATION = unchecked((int)0x88982F81);
- int hresult = result.Exception.HResult;
-
- result = await SafeWrapperRoutines.SafeWrapAsync(async () =>
- {
- if (hresult == WINCODEC_ERR_UNSUPPORTEDOPERATION)
- {
- using (IRandomAccessStream fileStream = await (await sourceFile).OpenAsync(FileAccessMode.ReadWrite))
- {
- bitmapEncoder.IsThumbnailGenerated = false;
- await bitmapEncoder.FlushAsync();
- }
- }
- });
- }
-
- return result;
- }
-
- public override async Task SetDataFromExistingItem(IStorageItem item)
- {
- if (item is not StorageFile file)
- {
- return ItemIsNotAFileResult;
- }
-
- SafeWrapper openedStream = await SafeWrapperRoutines.SafeWrapAsync(
- () => file.OpenAsync(FileAccessMode.Read).AsTask());
-
- if (!openedStream)
- {
- return openedStream;
- }
-
- return await SafeWrapperRoutines.SafeWrapAsync(async () =>
- {
- using (openedStream.Result)
- {
- if (FileHelpers.IsPathEqualExtension(item.Path, ".gif"))
- {
- GifBitmapImage = new BitmapImage();
- await GifBitmapImage.SetSourceAsync(openedStream.Result);
- }
- else
- {
- BitmapDecoder bitmapDecoder = await BitmapDecoder.CreateAsync(openedStream.Result);
- SoftwareBitmap = await bitmapDecoder.GetSoftwareBitmapAsync();
- }
- }
- });
- }
-
- public override void Dispose()
- {
- base.Dispose();
-
- SoftwareBitmap?.Dispose();
- SoftwareBitmap = null;
- }
- }
-}
diff --git a/ClipboardCanvas/CanavsPasteModels/MarkdownPasteModel.cs b/ClipboardCanvas/CanavsPasteModels/MarkdownPasteModel.cs
deleted file mode 100644
index 8352ef18..00000000
--- a/ClipboardCanvas/CanavsPasteModels/MarkdownPasteModel.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Windows.ApplicationModel.DataTransfer;
-using Windows.Storage;
-using ClipboardCanvas.CanvasFileReceivers;
-
-using ClipboardCanvas.DataModels;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using ClipboardCanvas.Helpers.Filesystem;
-using ClipboardCanvas.Contexts.Operations;
-using ClipboardCanvas.Helpers;
-
-namespace ClipboardCanvas.CanavsPasteModels
-{
- public class MarkdownPasteModel : BasePasteModel
- {
- public string MarkdownText { get; private set; }
-
- public MarkdownPasteModel(ICanvasItemReceiverModel canvasFileReceiver, IOperationContextReceiver operationContextReceiver)
- : base(canvasFileReceiver, operationContextReceiver)
- {
- }
-
- protected override async Task> GetCanvasFileFromExtension(ICanvasItemReceiverModel canvasFileReceiver)
- {
- return await canvasFileReceiver.CreateNewCanvasItemFromExtension(".md");
- }
-
- protected async override Task SaveDataToFile()
- {
- return await FilesystemOperations.WriteFileText(await sourceFile, MarkdownText);
- }
-
- protected override async Task SetDataFromDataPackage(DataPackageView dataPackage)
- {
- SafeWrapper text = await dataPackage.SafeGetTextAsync();
-
- MarkdownText = text;
-
- return text;
- }
-
- public override async Task SetDataFromExistingItem(IStorageItem item)
- {
- if (item is not StorageFile file)
- {
- return ItemIsNotAFileResult;
- }
-
- SafeWrapper text = await FilesystemOperations.ReadFileText(file);
-
- this.MarkdownText = text;
-
- return text;
- }
- }
-}
diff --git a/ClipboardCanvas/CanavsPasteModels/MediaPasteModel.cs b/ClipboardCanvas/CanavsPasteModels/MediaPasteModel.cs
deleted file mode 100644
index 19287a16..00000000
--- a/ClipboardCanvas/CanavsPasteModels/MediaPasteModel.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using System.Threading.Tasks;
-using Windows.ApplicationModel.DataTransfer;
-using Windows.Storage;
-
-using ClipboardCanvas.CanvasFileReceivers;
-using ClipboardCanvas.DataModels;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using ClipboardCanvas.Contexts.Operations;
-
-namespace ClipboardCanvas.CanavsPasteModels
-{
- public class MediaPasteModel : BasePasteModel
- {
- public MediaPasteModel(ICanvasItemReceiverModel canvasFileReceiver, IOperationContextReceiver operationContextReceiver)
- : base(canvasFileReceiver, operationContextReceiver)
- {
- }
-
- protected override Task> GetCanvasFileFromExtension(ICanvasItemReceiverModel canvasFileReceiver)
- {
- return Task.FromResult>((null, SafeWrapperResult.SUCCESS));
- }
-
- protected override Task SaveDataToFile()
- {
- return Task.FromResult(SafeWrapperResult.SUCCESS);
- }
-
- protected override Task SetDataFromDataPackage(DataPackageView dataPackage)
- {
- return Task.FromResult(SafeWrapperResult.SUCCESS);
- }
-
- public override Task SetDataFromExistingItem(IStorageItem item)
- {
- return Task.FromResult(SafeWrapperResult.SUCCESS);
- }
- }
-}
diff --git a/ClipboardCanvas/CanavsPasteModels/TextPasteModel.cs b/ClipboardCanvas/CanavsPasteModels/TextPasteModel.cs
deleted file mode 100644
index 574532e6..00000000
--- a/ClipboardCanvas/CanavsPasteModels/TextPasteModel.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Windows.ApplicationModel.DataTransfer;
-using Windows.Storage;
-
-using ClipboardCanvas.DataModels;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using ClipboardCanvas.CanvasFileReceivers;
-using ClipboardCanvas.Helpers.Filesystem;
-using ClipboardCanvas.Contexts.Operations;
-using ClipboardCanvas.Helpers;
-
-namespace ClipboardCanvas.CanavsPasteModels
-{
- public class TextPasteModel : BasePasteModel
- {
- public string Text { get; private set; }
-
- public TextPasteModel(ICanvasItemReceiverModel canvasFileReceiver, IOperationContextReceiver operationContextReceiver)
- : base(canvasFileReceiver, operationContextReceiver)
- {
- }
-
- protected async override Task> GetCanvasFileFromExtension(ICanvasItemReceiverModel canvasFileReceiver)
- {
- return await canvasFileReceiver.CreateNewCanvasItemFromExtension(".txt");
- }
-
- protected override async Task SaveDataToFile()
- {
- return await FilesystemOperations.WriteFileText(await sourceFile, Text);
- }
-
- protected async override Task SetDataFromDataPackage(DataPackageView dataPackage)
- {
- SafeWrapper text = await dataPackage.SafeGetTextAsync();
-
- Text = text;
-
- return text;
- }
-
- public async override Task SetDataFromExistingItem(IStorageItem item)
- {
- if (item is not StorageFile file)
- {
- return ItemIsNotAFileResult;
- }
-
- SafeWrapper text = await FilesystemOperations.ReadFileText(file);
-
- this.Text = text;
-
- return text;
- }
- }
-}
diff --git a/ClipboardCanvas/CanavsPasteModels/UrlPasteModel.cs b/ClipboardCanvas/CanavsPasteModels/UrlPasteModel.cs
deleted file mode 100644
index 62044308..00000000
--- a/ClipboardCanvas/CanavsPasteModels/UrlPasteModel.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Windows.ApplicationModel.DataTransfer;
-using Windows.Storage;
-
-using ClipboardCanvas.CanvasFileReceivers;
-using ClipboardCanvas.Contexts.Operations;
-using ClipboardCanvas.DataModels;
-using ClipboardCanvas.Helpers.Filesystem;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using ClipboardCanvas.Helpers;
-
-namespace ClipboardCanvas.CanavsPasteModels
-{
- public class UrlPasteModel : BasePasteModel
- {
- public string Url { get; private set; }
-
- public UrlPasteModel(ICanvasItemReceiverModel canvasFileReceiver, IOperationContextReceiver operationContextReceiver)
- : base(canvasFileReceiver, operationContextReceiver)
- {
- }
-
- public override async Task SetDataFromExistingItem(IStorageItem item)
- {
- if (item is not StorageFile file)
- {
- return ItemIsNotAFileResult;
- }
-
- SafeWrapper url = await FilesystemOperations.ReadFileText(file);
-
- this.Url = url;
-
- return url;
- }
-
- protected override async Task> GetCanvasFileFromExtension(ICanvasItemReceiverModel canvasFileReceiver)
- {
- return await canvasFileReceiver.CreateNewCanvasItemFromExtension(Constants.FileSystem.URL_CANVAS_FILE_EXTENSION);
- }
-
- protected override async Task SaveDataToFile()
- {
- return await FilesystemOperations.WriteFileText(await sourceFile, Url);
- }
-
- protected override async Task SetDataFromDataPackage(DataPackageView dataPackage)
- {
- SafeWrapper url = await dataPackage.SafeGetTextAsync();
-
- Url = url;
-
- return url;
- }
- }
-}
diff --git a/ClipboardCanvas/CanavsPasteModels/WebViewPasteModel.cs b/ClipboardCanvas/CanavsPasteModels/WebViewPasteModel.cs
deleted file mode 100644
index d5059fe3..00000000
--- a/ClipboardCanvas/CanavsPasteModels/WebViewPasteModel.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Windows.ApplicationModel.DataTransfer;
-using Windows.Storage;
-
-using ClipboardCanvas.CanvasFileReceivers;
-using ClipboardCanvas.Contexts.Operations;
-using ClipboardCanvas.DataModels;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Helpers.Filesystem;
-using ClipboardCanvas.Helpers;
-
-namespace ClipboardCanvas.CanavsPasteModels
-{
- public class WebViewPasteModel : BasePasteModel
- {
- private readonly WebViewCanvasMode _mode;
-
- public string HtmlText { get; private set; }
-
- public string Source { get; private set; }
-
- public WebViewPasteModel(WebViewCanvasMode mode, ICanvasItemReceiverModel canvasFileReceiver, IOperationContextReceiver operationContextReceiver)
- : base(canvasFileReceiver, operationContextReceiver)
- {
- this._mode = mode;
- }
-
- public override async Task SetDataFromExistingItem(IStorageItem item)
- {
- if (item is not StorageFile file)
- {
- return ItemIsNotAFileResult;
- }
-
- SafeWrapper text = await FilesystemOperations.ReadFileText(file);
-
- if (_mode == WebViewCanvasMode.ReadWebsite)
- {
- Source = text;
- }
- else
- {
- HtmlText = text;
- }
-
- return text;
- }
-
- protected override async Task> GetCanvasFileFromExtension(ICanvasItemReceiverModel canvasFileReceiver)
- {
- if (_mode == WebViewCanvasMode.ReadWebsite)
- {
- return await canvasFileReceiver.CreateNewCanvasItemFromExtension(Constants.FileSystem.WEBSITE_LINK_FILE_EXTENSION);
- }
- else
- {
- return await canvasFileReceiver.CreateNewCanvasItemFromExtension(".html");
- }
- }
-
- protected override async Task SaveDataToFile()
- {
- SafeWrapperResult result;
-
- if (associatedFile == null)
- {
- return ItemIsNotAFileResult;
- }
-
- if (_mode == WebViewCanvasMode.ReadWebsite)
- {
- result = await FilesystemOperations.WriteFileText(associatedFile, Source);
- }
- else
- {
- result = await FilesystemOperations.WriteFileText(associatedFile, HtmlText);
- }
-
- return result;
- }
-
- protected override async Task SetDataFromDataPackage(DataPackageView dataPackage)
- {
- SafeWrapper text = await dataPackage.SafeGetTextAsync();
-
- if (_mode == WebViewCanvasMode.ReadWebsite)
- {
- Source = text;
- }
- else
- {
- HtmlText = text;
- }
-
- return text;
- }
- }
-}
diff --git a/ClipboardCanvas/CanvasFileReceivers/ICanvasItemReceiverModel.cs b/ClipboardCanvas/CanvasFileReceivers/ICanvasItemReceiverModel.cs
deleted file mode 100644
index b99476ef..00000000
--- a/ClipboardCanvas/CanvasFileReceivers/ICanvasItemReceiverModel.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System.Threading.Tasks;
-using Windows.Storage;
-
-using ClipboardCanvas.DataModels;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-
-namespace ClipboardCanvas.CanvasFileReceivers
-{
- public interface ICanvasItemReceiverModel
- {
- Task> CreateNewCanvasFolder(string folderName = null);
-
- Task> CreateNewCanvasItemFromExtension(string extension);
-
- Task> CreateNewCanvasItem(string fileName);
-
- Task DeleteItem(IStorageItem itemToDelete, bool permanently);
- }
-}
diff --git a/ClipboardCanvas/CanvasFileReceivers/InfiniteCanvasFileReceiver.cs b/ClipboardCanvas/CanvasFileReceivers/InfiniteCanvasFileReceiver.cs
deleted file mode 100644
index c936d83e..00000000
--- a/ClipboardCanvas/CanvasFileReceivers/InfiniteCanvasFileReceiver.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using System;
-using System.IO;
-using System.Threading.Tasks;
-using Windows.Storage;
-
-using ClipboardCanvas.DataModels;
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Helpers.Filesystem;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-
-namespace ClipboardCanvas.CanvasFileReceivers
-{
- public class InfiniteCanvasFileReceiver : ICanvasItemReceiverModel
- {
- private CanvasItem _infiniteCanvasFolder;
-
- public InfiniteCanvasFileReceiver(CanvasItem infiniteCanvasFolder)
- {
- this._infiniteCanvasFolder = infiniteCanvasFolder;
- }
-
- public Task> CreateNewCanvasFolder(string folderName = null)
- {
- // TODO: In the future, allow cascading Infinite Canvases
- return Task.FromResult(new SafeWrapper(null, new SafeWrapperResult(OperationErrorCode.InvalidOperation, new InvalidOperationException(), "Cannot create folders inside Infinite Canvas.")));
- }
-
- public async Task> CreateNewCanvasItemFromExtension(string extension)
- {
- string fileName = DateTime.Now.ToString(Constants.FileSystem.CANVAS_FILE_FILENAME_DATE_FORMAT);
- fileName = $"{fileName}{extension}";
-
- return await CreateNewCanvasItem(fileName);
- }
-
- public async Task> CreateNewCanvasItem(string fileName)
- {
- if (_infiniteCanvasFolder == null || await _infiniteCanvasFolder.SourceItem is not StorageFolder folder)
- {
- return new SafeWrapper(null, OperationErrorCode.NotFound, new DirectoryNotFoundException(), "The Infinite Canvas folder was not found.");
- }
-
- SafeWrapper file = await FilesystemOperations.CreateFile(folder, fileName);
-
- return (new CanvasItem(file.Result), file.Details);
- }
-
- public async Task DeleteItem(IStorageItem itemToDelete, bool permanently)
- {
- return await FilesystemOperations.DeleteItem(itemToDelete, permanently);
- }
- }
-}
diff --git a/ClipboardCanvas/CanvasLoadModels/ILoadModel.cs b/ClipboardCanvas/CanvasLoadModels/ILoadModel.cs
deleted file mode 100644
index 828840e4..00000000
--- a/ClipboardCanvas/CanvasLoadModels/ILoadModel.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System.Threading.Tasks;
-using Windows.Storage;
-
-using ClipboardCanvas.Helpers.SafetyHelpers;
-
-namespace ClipboardCanvas.CanvasLoadModels
-{
- public interface ILoadModel
- {
- Task SetDataFromExistingItem(IStorageItem item);
- }
-}
diff --git a/ClipboardCanvas/ClipboardCanvas.csproj b/ClipboardCanvas/ClipboardCanvas.csproj
deleted file mode 100644
index 41cc1338..00000000
--- a/ClipboardCanvas/ClipboardCanvas.csproj
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
- WinExe
- net6.0-windows10.0.20348.0
- 10.0.17763.0
- ClipboardCanvas
- en-US
- Scale|DXFeatureLevel
- Language=en-US;de-DE;pt-PT;ro-RO;ru-RU;zh-CN
- app.manifest
- x86;x64;arm64
- win10-x86;win10-x64;win10-arm64
- true
- True
- false
- False
- False
- True
- False
- Always
- x86|x64|arm64
- 0
-
-
- 4.0
- en-US
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MSBuild:Compile
-
-
-
\ No newline at end of file
diff --git a/ClipboardCanvas/Constants.cs b/ClipboardCanvas/Constants.cs
deleted file mode 100644
index 3de378a3..00000000
--- a/ClipboardCanvas/Constants.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-namespace ClipboardCanvas
-{
- public static class Constants
- {
- public static class ClipboardCanvasRepository
- {
- public const string REPOSITORY_OWNER = "d2dyno1";
-
- public const string REPOSITORY_NAME = "ClipboardCanvas";
-
- public const string PRIVACY_POLICY_FILENAME = "Privacy.md";
- }
-
- public static class LocalSettings
- {
- public const string SETTINGS_FOLDERNAME = "app_settings";
-
- public const string HTML_TEMPDATA_FOLDERNAME = "tmp_htmlfiles";
-
- public const string USER_SETTINGS_FILENAME = "user_settings.json";
-
- public const string COLLECTION_SETTINGS_FILENAME = "collections_settings.json";
-
- public const string TIMELINE_SETTINGS_FILENAME = "timeline_settings.json";
-
- public const string CANVAS_SETTINGS_FILENAME = "canvas_settings.json";
-
- public const string AUTOPASTE_SETTINGS_FILENAME = "autopaste_settings.json";
-
- public const string APPLICATION_SETTINGS_FILENAME = "application_settings.json";
- }
-
- public static class UI
- {
- public const int CONTROL_LOAD_DELAY = 50;
-
- public const bool USE_GETLOCALIZED2 = true;
-
- public static class CanvasContent
- {
- public const long FALLBACK_TEXTLOAD_MAX_FILESIZE = 1048576L;
-
- public const int SHOW_LOADING_RING_DELAY = 100;
-
- public const int COLLECTION_RELOADING_TIP_DELAY = 400;
-
- public const int FILE_PASTING_TIP_DELAY = 150;
-
- public const uint SIMPLE_CANVAS_THUMBNAIL_SIZE = 128u;
-
- public const int INFINITE_CANVAS_SAVE_INTERVAL = 800;
-
- public const int INFINITE_CANVAS_ERROR_SHOW_TIME = 2000;
-
- public const string INFINITE_CANVAS_DRAGGED_OBJECT_ID = "clipboard_canvas__dragged_control_object";
-
- public static class UrlCanvas
- {
- public const int MAX_IMAGES_TO_DISPLAY = 4;
- }
- }
-
- public static class Imaging
- {
- public const int IMAGE_FROM_URI_TIMEOUT = 5000;
- }
-
- public static class Notifications
- {
- public const int NOTIFICATION_PROGRESSBAR_REFRESH_INTERVAL = 50;
-
- public const int NOTIFICATION_DEFAULT_SHOW_TIME = 4000;
-
- public const string TOAST_NOTIFICATION_ERROR_ARGUMENT = "clipboard_canvas__report_error";
- }
-
- public static class Animations
- {
- public const string CONNECTED_ANIMATION_COLLECTION_PREVIEW_ITEM_OPEN_REQUESTED_TOKEN = "collection_preview_item_opening_connected_animation";
- }
-
- public static class Timeline
- {
- public const int MAX_ITEMS_PER_SECTION = 10;
-
- public const int MAX_SECTIONS = 10;
- }
- }
-
- public static class FileSystem
- {
- public const string EXCEPTIONLOG_FILENAME = "clipboardcanvas_exceptionlog.log";
-
- public const string COLLECTION_ICONS_FOLDERNAME = "collections_icons";
-
- public const string REFERENCE_FILE_EXTENSION = ".ccvr";
-
- public const string WEBSITE_LINK_FILE_EXTENSION = ".ccvwl";
-
- public const string URL_CANVAS_FILE_EXTENSION = ".ccvurl";
-
- public const string INFINITE_CANVAS_EXTENSION = ".ccvic";
-
- public const string INFINITE_CANVAS_CONFIGURATION_FILE_EXTENSION = ".ccviccfg";
-
- public const string INFINITE_CANVAS_CONFIGURATION_FILENAME = "infinite_canvas_configuration.ccviccfg";
-
- public const string INFINITE_CANVAS_PREVIEW_IMAGE_FILENAME = "infinite_canvas_preview.png";
-
- public const string CANVAS_FILE_FILENAME_DATE_FORMAT = "dd.MM.yyyy HH_mm_ss";
-
- public const string EXCEPTION_BLOCK_DATE_FORMAT = "dd.MM.yyyy HH_mm_ss";
-
- public const int COPY_FILE_BUFFER_SIZE = 1024 * 1024; // 1mb
- }
-
- public static class Collections
- {
- public const string DEFAULT_COLLECTION_TOKEN = "$DEFAULT_COLLECTION$";
-
- public const int DOUBLE_CLICK_DELAY_MILLISECONDS = 300;
- }
-
- public static class Debugging
- {
- public const bool FIRST_CHANCE_EXCEPTION_DEBUGGING = false;
- }
- }
-}
diff --git a/ClipboardCanvas/Contexts/Operations/IOperationContext.cs b/ClipboardCanvas/Contexts/Operations/IOperationContext.cs
deleted file mode 100644
index 7eb7077e..00000000
--- a/ClipboardCanvas/Contexts/Operations/IOperationContext.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-using System.Threading;
-
-using ClipboardCanvas.EventArguments;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-
-namespace ClipboardCanvas.Contexts.Operations
-{
- public interface IOperationContext
- {
- event EventHandler OnOperationFinishedEvent;
-
- bool IsOperationStarted { get; }
-
- bool IsOperationFinished { get; }
-
- CancellationToken CancellationToken { get; }
-
- IProgress OperationProgress { get; }
-
- void StartOperation();
-
- void FinishOperation(SafeWrapperResult result);
- }
-}
diff --git a/ClipboardCanvas/Contexts/Operations/IOperationContextReceiver.cs b/ClipboardCanvas/Contexts/Operations/IOperationContextReceiver.cs
deleted file mode 100644
index e53f8568..00000000
--- a/ClipboardCanvas/Contexts/Operations/IOperationContextReceiver.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using ClipboardCanvas.Enums;
-
-namespace ClipboardCanvas.Contexts.Operations
-{
- public interface IOperationContextReceiver
- {
- IOperationContext GetOperationContext(string operationName, StatusCenterOperationType operationType);
- }
-}
diff --git a/ClipboardCanvas/Contexts/Operations/OperationContext.cs b/ClipboardCanvas/Contexts/Operations/OperationContext.cs
deleted file mode 100644
index 7cfce87c..00000000
--- a/ClipboardCanvas/Contexts/Operations/OperationContext.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using System;
-using System.Threading;
-
-using ClipboardCanvas.EventArguments;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-
-namespace ClipboardCanvas.Contexts.Operations
-{
- public sealed class OperationContext : IOperationContext
- {
- public event EventHandler OnOperationFinishedEvent;
-
- public bool IsEventAlreadyHooked { get; set; }
-
- public bool IsOperationStarted { get; set; }
-
- public CancellationToken CancellationToken { get; set; }
-
- public bool IsOperationFinished { get; private set; }
-
- IProgress IOperationContext.OperationProgress { get; }
-
- public void FinishOperation(SafeWrapperResult result)
- {
- IsOperationFinished = true;
- IsOperationStarted = false;
-
- OnOperationFinishedEvent?.Invoke(this, new OperationFinishedEventArgs(result));
- }
-
- public void StartOperation()
- {
- if (IsOperationFinished)
- {
- IsOperationStarted = false;
- return;
- }
-
- IsOperationStarted = true;
- }
- }
-}
diff --git a/ClipboardCanvas/Contexts/Operations/StatusCenterOperationReceiver.cs b/ClipboardCanvas/Contexts/Operations/StatusCenterOperationReceiver.cs
deleted file mode 100644
index b6cd6fbf..00000000
--- a/ClipboardCanvas/Contexts/Operations/StatusCenterOperationReceiver.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using CommunityToolkit.Mvvm.DependencyInjection;
-using System;
-using System.Threading;
-
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Services;
-
-namespace ClipboardCanvas.Contexts.Operations
-{
- public sealed class StatusCenterOperationReceiver : IOperationContextReceiver
- {
- private IStatusCenterService StatusCenterService { get; } = Ioc.Default.GetService();
-
- public IOperationContext GetOperationContext(string operationName, StatusCenterOperationType operationType)
- {
- return StatusCenterService.AppendOperationBanner(operationName, operationType, new CancellationTokenSource(), TimeSpan.FromMilliseconds(850));
- }
- }
-}
diff --git a/ClipboardCanvas/Contexts/SearchContext.cs b/ClipboardCanvas/Contexts/SearchContext.cs
deleted file mode 100644
index 0d786230..00000000
--- a/ClipboardCanvas/Contexts/SearchContext.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-namespace ClipboardCanvas.Contexts
-{
- public sealed class SearchContext
- {
- public readonly string phrase;
-
- public readonly int indexInSearch;
-
- public SearchContext(string phrase, int indexInSearch)
- {
- this.phrase = phrase;
- this.indexInSearch = indexInSearch;
- }
- }
-}
diff --git a/ClipboardCanvas/DataModels/AppLanguageModel.cs b/ClipboardCanvas/DataModels/AppLanguageModel.cs
deleted file mode 100644
index df600007..00000000
--- a/ClipboardCanvas/DataModels/AppLanguageModel.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using ClipboardCanvas.GlobalizationExtensions;
-using System;
-using System.Globalization;
-
-using ClipboardCanvas.Extensions;
-
-namespace ClipboardCanvas.DataModels
-{
- [Serializable]
- public sealed class AppLanguageModel
- {
- public string Id { get; set; }
-
- public string Name { get; set; }
-
- public AppLanguageModel(string id)
- {
- if (!string.IsNullOrEmpty(id))
- {
- var info = new CultureInfo(id);
- Id = info.Name;
- Name = info.NativeName.FirstToUpper();
- }
- else
- {
- Id = string.Empty;
- var systemDefaultLanguageOptionStr = "SettingsGeneralPageDefaultLanguage".GetLocalized2();
- Name = string.IsNullOrEmpty(systemDefaultLanguageOptionStr) ? "System Default" : systemDefaultLanguageOptionStr;
- }
- }
-
- public override string ToString()
- {
- return Name;
- }
- }
-}
diff --git a/ClipboardCanvas/DataModels/BaseAdditionalData.cs b/ClipboardCanvas/DataModels/BaseAdditionalData.cs
deleted file mode 100644
index 0b7d9b38..00000000
--- a/ClipboardCanvas/DataModels/BaseAdditionalData.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace ClipboardCanvas.DataModels
-{
- ///
- /// Abstract base class to implement for storing any type of data
- ///
- public abstract class BaseAdditionalData
- {
- public abstract object GetData();
- }
-}
diff --git a/ClipboardCanvas/DataModels/CanvasItem.cs b/ClipboardCanvas/DataModels/CanvasItem.cs
deleted file mode 100644
index e86ecbe6..00000000
--- a/ClipboardCanvas/DataModels/CanvasItem.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using System.Threading.Tasks;
-using Windows.Storage;
-using ClipboardCanvas.ReferenceItems;
-
-namespace ClipboardCanvas.DataModels
-{
- public class CanvasItem
- {
- #region Protected Members
-
- protected IStorageItem sourceItem;
-
- #endregion
-
- #region Public Properties
-
- public IStorageItem AssociatedItem { get; protected set; }
-
- public Task SourceItem => GetSourceItem();
-
- public bool IsFileAsReference => AssociatedItem is StorageFile file && ReferenceFile.IsReferenceFile(file);
-
- #endregion
-
- #region Constructor
-
- public CanvasItem(IStorageItem associatedItem)
- : this(associatedItem, null)
- {
- }
-
- public CanvasItem(IStorageItem associatedItem, IStorageItem sourceItem)
- {
- this.AssociatedItem = associatedItem;
- this.sourceItem = sourceItem;
- }
-
- #endregion
-
- #region Helpers
-
- protected virtual async Task GetSourceItem()
- {
- if (sourceItem != null)
- {
- return sourceItem;
- }
-
- if (AssociatedItem is StorageFile file && ReferenceFile.IsReferenceFile(file))
- {
- ReferenceFile referenceFile = await ReferenceFile.GetReferenceFile(file);
- sourceItem = referenceFile.ReferencedItem;
- }
- else
- {
- sourceItem = AssociatedItem;
- }
-
- return sourceItem;
- }
-
- public virtual void DangerousUpdateItem(IStorageItem newAssociatedItem, IStorageItem sourceItem = null)
- {
- this.AssociatedItem = newAssociatedItem;
- this.sourceItem = sourceItem;
- }
-
- #endregion
- }
-}
diff --git a/ClipboardCanvas/DataModels/ContentDataModels/BaseContentTypeModel.cs b/ClipboardCanvas/DataModels/ContentDataModels/BaseContentTypeModel.cs
deleted file mode 100644
index 0bada4c5..00000000
--- a/ClipboardCanvas/DataModels/ContentDataModels/BaseContentTypeModel.cs
+++ /dev/null
@@ -1,275 +0,0 @@
-using CommunityToolkit.Mvvm.DependencyInjection;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Threading.Tasks;
-using Windows.ApplicationModel.DataTransfer;
-using Windows.Storage;
-
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Helpers;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using ClipboardCanvas.ReferenceItems;
-using ClipboardCanvas.Services;
-using ClipboardCanvas.ViewModels.UserControls.CanvasDisplay;
-using ClipboardCanvas.Helpers.Filesystem;
-using ClipboardCanvas.ViewModels.UserControls.SimpleCanvasDisplay;
-using ClipboardCanvas.Extensions;
-
-namespace ClipboardCanvas.DataModels.ContentDataModels
-{
- public abstract class BaseContentTypeModel
- {
- public static readonly SafeWrapperResult CannotDisplayContentForTypeResult = new SafeWrapperResult(OperationErrorCode.InvalidOperation, new InvalidOperationException(), "Couldn't display content for this file");
-
- public static readonly SafeWrapperResult CannotReceiveClipboardDataResult = new SafeWrapperResult(OperationErrorCode.AccessUnauthorized, "Couldn't retrieve clipboard data");
-
- public static async Task GetContentType(CanvasItem canvasFile, BaseContentTypeModel contentType)
- {
- if (contentType is InvalidContentTypeDataModel invalidContentType)
- {
- if (!invalidContentType.needsReinitialization)
- {
- return invalidContentType;
- }
- }
-
- if (contentType != null)
- {
- return contentType;
- }
-
- if ((await canvasFile.SourceItem) is StorageFolder folder)
- {
- if (FileHelpers.IsPathEqualExtension(folder.Path, Constants.FileSystem.INFINITE_CANVAS_EXTENSION))
- {
- return new InfiniteCanvasContentType();
- }
- else
- {
- return new FallbackContentType();
- }
- }
- else if ((await canvasFile.SourceItem) is StorageFile file)
- {
- string ext = Path.GetExtension(file.Path);
-
- return await GetContentTypeFromExtension(file, ext);
- }
- else // The sourceFile was null
- {
- return new InvalidContentTypeDataModel(CannotDisplayContentForTypeResult, false);
- }
- }
-
- public static async Task GetContentType(IStorageItem item, BaseContentTypeModel contentType)
- {
- if (contentType is InvalidContentTypeDataModel invalidContentType)
- {
- if (!invalidContentType.needsReinitialization)
- {
- return invalidContentType;
- }
- }
-
- if (contentType != null)
- {
- return contentType;
- }
-
- if (item is StorageFile file)
- {
- string ext = Path.GetExtension(file.Path);
-
- if (ReferenceFile.IsReferenceFile(file))
- {
- // Reference File, get the destination file extension
- ReferenceFile referenceFile = await ReferenceFile.GetReferenceFile(file);
-
- if (referenceFile.ReferencedItem == null)
- {
- return new InvalidContentTypeDataModel(referenceFile.LastError, false);
- }
-
- return await GetContentType(referenceFile.ReferencedItem, contentType);
- }
-
- return await GetContentTypeFromExtension(file, ext);
- }
- else if (item is StorageFolder)
- {
- IUserSettingsService userSettingsService = Ioc.Default.GetService();
- IApplicationService applicationService = Ioc.Default.GetService();
-
- if (userSettingsService.AlwaysPasteFilesAsReference && !applicationService.IsInRestrictedAccessMode)
- {
- return new FallbackContentType();
- }
- else
- {
- return new InvalidContentTypeDataModel(new SafeWrapperResult(OperationErrorCode.InvalidOperation | OperationErrorCode.NotAFile, new InvalidOperationException(), "Cannot paste folders without Reference Files enabled in Settings."));
- }
- }
- else
- {
- return new InvalidContentTypeDataModel(CannotDisplayContentForTypeResult, false);
- }
- }
-
- public static async Task GetContentTypeFromExtension(IStorageItem item, string ext)
- {
- if (item is StorageFolder folder)
- {
- if (FileHelpers.IsPathEqualExtension(folder.Path, Constants.FileSystem.INFINITE_CANVAS_EXTENSION))
- {
- return new InfiniteCanvasContentType();
- }
- else
- {
- return new FallbackContentType();
- }
- }
-
- if (item is not StorageFile file)
- {
- // Shouldn't happen
- return null;
- }
-
- // Image
- if (ImageCanvasViewModel.Extensions.Contains(ext))
- {
- return new ImageContentType();
- }
-
- // Text
- if (TextCanvasViewModel.Extensions.Contains(ext))
- {
- return new TextContentType();
- }
-
- // Media
- if (MediaCanvasViewModel.Extensions.Contains(ext))
- {
- return new MediaContentType();
- }
-
- // WebView
- if (WebViewCanvasViewModel.Extensions.Contains(ext))
- {
- if (ext == Constants.FileSystem.WEBSITE_LINK_FILE_EXTENSION)
- {
- return new WebViewContentType(WebViewCanvasMode.ReadWebsite);
- }
-
- return new WebViewContentType(WebViewCanvasMode.ReadHtml);
- }
-
- // Markdown
- if (MarkdownCanvasViewModel.Extensions.Contains(ext))
- {
- return new MarkdownContentType();
- }
-
- // URL preview
- if (UrlSimpleCanvasViewModel.Extensions.Contains(ext)) // TODO change this later to UrlCanvasViewModel.Extensions
- {
- return new UrlPreviewContentType();
- }
-
- // Default, try as text
- if (await TextCanvasViewModel.CanLoadAsText(file))
- {
- return new TextContentType();
- }
-
- // Use fallback
- return new FallbackContentType();
- }
-
- public static async Task GetContentTypeFromDataPackage(DataPackageView dataPackage)
- {
- IUserSettingsService userSettings = Ioc.Default.GetService();
-
- // Decide content type and initialize view model
-
- // From raw clipboard data
- if (dataPackage.Contains("Art::GVML ClipFormat") || (dataPackage.Contains(StandardDataFormats.Bitmap) && !dataPackage.Contains("PowerPoint 12.0 Internal Theme")))
- {
- // Image
- return new ImageContentType();
- }
- else if (dataPackage.Contains("Art::Text ClipFormat") || (dataPackage.Contains(StandardDataFormats.Text) && !dataPackage.Contains("PowerPoint 12.0 Internal Theme")))
- {
- SafeWrapper text = await dataPackage.SafeGetTextAsync();
-
- if (!text)
- {
- Debugger.Break(); // What!?
- return new InvalidContentTypeDataModel(text);
- }
-
- // Check if it's url
- if (WebHelpers.IsUrl(text))
- {
- // The url may point to image
- if (await WebHelpers.IsUrlImage(text))
- {
- // Image
- return new ImageContentType();
- }
- else
- {
- if (await WebHelpers.IsValidUrl(text))
- {
- // Url preview
- return new UrlPreviewContentType();
- }
- }
- }
-
- // Fallback to text
- if (userSettings.PrioritizeMarkdownOverText)
- {
- // Markdown
- return new MarkdownContentType();
- }
- else
- {
- // Normal text
- return new TextContentType();
- }
- }
- else if (dataPackage.Contains(StandardDataFormats.StorageItems)) // From clipboard storage items
- {
- SafeWrapper> items = await dataPackage.SafeGetStorageItemsAsync();
-
- if (items && !items.Result.IsEmpty())
- {
- // One item, decide contentType for it
- IStorageItem item = items.Result.First();
-
- BaseContentTypeModel contentType = await BaseContentTypeModel.GetContentType(item, null);
-
- if (contentType is InvalidContentTypeDataModel invalidContentType && invalidContentType.error == null)
- {
- return new InvalidContentTypeDataModel(CannotReceiveClipboardDataResult);
- }
- else
- {
- return contentType;
- }
- }
- else
- {
- // No items
- return new InvalidContentTypeDataModel(CannotReceiveClipboardDataResult);
- }
- }
-
- return new InvalidContentTypeDataModel(CannotReceiveClipboardDataResult);
- }
- }
-}
diff --git a/ClipboardCanvas/DataModels/ContentDataModels/FallbackContentType.cs b/ClipboardCanvas/DataModels/ContentDataModels/FallbackContentType.cs
deleted file mode 100644
index f2f3f641..00000000
--- a/ClipboardCanvas/DataModels/ContentDataModels/FallbackContentType.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace ClipboardCanvas.DataModels.ContentDataModels
-{
- public sealed class FallbackContentType : BaseContentTypeModel
- {
- }
-}
diff --git a/ClipboardCanvas/DataModels/ContentDataModels/ImageContentType.cs b/ClipboardCanvas/DataModels/ContentDataModels/ImageContentType.cs
deleted file mode 100644
index a9ceb9d7..00000000
--- a/ClipboardCanvas/DataModels/ContentDataModels/ImageContentType.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace ClipboardCanvas.DataModels.ContentDataModels
-{
- ///
- /// Used for images that are directly copied from clipboard
- ///
- public sealed class ImageContentType : BaseContentTypeModel
- {
- }
-}
diff --git a/ClipboardCanvas/DataModels/ContentDataModels/InfiniteCanvasContentType.cs b/ClipboardCanvas/DataModels/ContentDataModels/InfiniteCanvasContentType.cs
deleted file mode 100644
index 45fcf6a8..00000000
--- a/ClipboardCanvas/DataModels/ContentDataModels/InfiniteCanvasContentType.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace ClipboardCanvas.DataModels.ContentDataModels
-{
- public sealed class InfiniteCanvasContentType : BaseContentTypeModel
- {
- }
-}
diff --git a/ClipboardCanvas/DataModels/ContentDataModels/InvalidContentTypeDataModel.cs b/ClipboardCanvas/DataModels/ContentDataModels/InvalidContentTypeDataModel.cs
deleted file mode 100644
index 9c2b0384..00000000
--- a/ClipboardCanvas/DataModels/ContentDataModels/InvalidContentTypeDataModel.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using ClipboardCanvas.Helpers.SafetyHelpers;
-
-namespace ClipboardCanvas.DataModels.ContentDataModels
-{
- public sealed class InvalidContentTypeDataModel : BaseContentTypeModel
- {
- public readonly SafeWrapperResult error;
-
- public readonly bool needsReinitialization;
-
- public InvalidContentTypeDataModel(SafeWrapperResult error)
- : this(error, false)
- {
- }
-
- public InvalidContentTypeDataModel(SafeWrapperResult error, bool needsReinitialization)
- {
- this.error = error;
- this.needsReinitialization = needsReinitialization;
- }
- }
-}
diff --git a/ClipboardCanvas/DataModels/ContentDataModels/MarkdownContentType.cs b/ClipboardCanvas/DataModels/ContentDataModels/MarkdownContentType.cs
deleted file mode 100644
index 1ce21758..00000000
--- a/ClipboardCanvas/DataModels/ContentDataModels/MarkdownContentType.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace ClipboardCanvas.DataModels.ContentDataModels
-{
- public sealed class MarkdownContentType : BaseContentTypeModel
- {
- }
-}
diff --git a/ClipboardCanvas/DataModels/ContentDataModels/MediaContentType.cs b/ClipboardCanvas/DataModels/ContentDataModels/MediaContentType.cs
deleted file mode 100644
index f2929a8f..00000000
--- a/ClipboardCanvas/DataModels/ContentDataModels/MediaContentType.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using System;
-
-namespace ClipboardCanvas.DataModels.ContentDataModels
-{
- public sealed class MediaContentType : BaseContentTypeModel
- {
- public TimeSpan savedPosition = TimeSpan.Zero;
- }
-}
diff --git a/ClipboardCanvas/DataModels/ContentDataModels/TextContentType.cs b/ClipboardCanvas/DataModels/ContentDataModels/TextContentType.cs
deleted file mode 100644
index 605c4c03..00000000
--- a/ClipboardCanvas/DataModels/ContentDataModels/TextContentType.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace ClipboardCanvas.DataModels.ContentDataModels
-{
- public sealed class TextContentType : BaseContentTypeModel
- {
- }
-}
diff --git a/ClipboardCanvas/DataModels/ContentDataModels/UrlPreviewContentType.cs b/ClipboardCanvas/DataModels/ContentDataModels/UrlPreviewContentType.cs
deleted file mode 100644
index 9e5a29e8..00000000
--- a/ClipboardCanvas/DataModels/ContentDataModels/UrlPreviewContentType.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace ClipboardCanvas.DataModels.ContentDataModels
-{
- public sealed class UrlPreviewContentType : BaseContentTypeModel
- {
- }
-}
diff --git a/ClipboardCanvas/DataModels/ContentDataModels/WebViewContentType.cs b/ClipboardCanvas/DataModels/ContentDataModels/WebViewContentType.cs
deleted file mode 100644
index 1bb638a3..00000000
--- a/ClipboardCanvas/DataModels/ContentDataModels/WebViewContentType.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using ClipboardCanvas.Enums;
-
-namespace ClipboardCanvas.DataModels.ContentDataModels
-{
- public sealed class WebViewContentType : BaseContentTypeModel
- {
- public readonly WebViewCanvasMode mode;
-
- public WebViewContentType(WebViewCanvasMode mode)
- {
- this.mode = mode;
- }
- }
-}
diff --git a/ClipboardCanvas/DataModels/InfiniteCanvasItem.cs b/ClipboardCanvas/DataModels/InfiniteCanvasItem.cs
deleted file mode 100644
index b06a2028..00000000
--- a/ClipboardCanvas/DataModels/InfiniteCanvasItem.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Windows.Storage;
-
-using ClipboardCanvas.Helpers.Filesystem;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using ClipboardCanvas.Enums;
-using System.IO;
-
-namespace ClipboardCanvas.DataModels
-{
- public class InfiniteCanvasItem : CanvasItem
- {
- public StorageFile ConfigurationFile { get; private set; }
-
- public StorageFile CanvasPreviewImageFile { get; private set; }
-
- public InfiniteCanvasItem(IStorageItem associatedItem)
- : base(associatedItem)
- {
- }
-
- public InfiniteCanvasItem(IStorageItem associatedItem, IStorageItem sourceItem)
- : base(associatedItem, sourceItem)
- {
- }
-
- public async Task InitializeCanvasFolder()
- {
- if ((await SourceItem) is not StorageFolder infiniteCanvasFolder)
- {
- return new SafeWrapperResult(OperationErrorCode.AccessUnauthorized, new UnauthorizedAccessException(), "Couldn't initialize Infinite Canvas folder.");
- }
-
- string configurationFileName = Constants.FileSystem.INFINITE_CANVAS_CONFIGURATION_FILENAME;
- string canvasPreviewImageFileName = Constants.FileSystem.INFINITE_CANVAS_PREVIEW_IMAGE_FILENAME;
-
- SafeWrapper result = await FilesystemOperations.CreateFile(infiniteCanvasFolder, configurationFileName, CreationCollisionOption.OpenIfExists);
- ConfigurationFile = result;
-
- if (!result)
- {
- return result;
- }
-
- result = await FilesystemOperations.CreateFile(infiniteCanvasFolder, canvasPreviewImageFileName, CreationCollisionOption.OpenIfExists);
- CanvasPreviewImageFile = result.Result;
-
- return result;
- }
-
- public static bool IsInfiniteCanvasAsParent(CanvasItem canvasItem)
- {
- string parentPath = Path.GetDirectoryName(canvasItem.AssociatedItem.Path);
- return FileHelpers.IsPathEqualExtension(parentPath, Constants.FileSystem.INFINITE_CANVAS_EXTENSION);
- }
- }
-}
diff --git a/ClipboardCanvas/DataModels/InteractableCanvasDataPackageComparisionDataModel.cs b/ClipboardCanvas/DataModels/InteractableCanvasDataPackageComparisionDataModel.cs
deleted file mode 100644
index 05a2e96c..00000000
--- a/ClipboardCanvas/DataModels/InteractableCanvasDataPackageComparisionDataModel.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using Windows.ApplicationModel.DataTransfer;
-using Windows.Foundation;
-
-namespace ClipboardCanvas.DataModels
-{
- public sealed class InteractableCanvasDataPackageComparisionDataModel
- {
- public readonly DataPackageView dataPackage;
-
- public readonly Point dropPoint;
-
- public InteractableCanvasDataPackageComparisionDataModel(DataPackageView dataPackage, Point dropPoint)
- {
- this.dataPackage = dataPackage;
- this.dropPoint = dropPoint;
- }
- }
-}
diff --git a/ClipboardCanvas/DataModels/Navigation/BaseDisplayFrameParameterDataModel.cs b/ClipboardCanvas/DataModels/Navigation/BaseDisplayFrameParameterDataModel.cs
deleted file mode 100644
index dfff3656..00000000
--- a/ClipboardCanvas/DataModels/Navigation/BaseDisplayFrameParameterDataModel.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Models;
-
-namespace ClipboardCanvas.DataModels.Navigation
-{
- public abstract class BaseDisplayFrameParameterDataModel
- {
- public readonly ICollectionModel collectionModel;
-
- public readonly CanvasType canvasType;
-
- public BaseDisplayFrameParameterDataModel(ICollectionModel collectionModel, CanvasType canvasType)
- {
- this.collectionModel = collectionModel;
- this.canvasType = canvasType;
- }
- }
-}
diff --git a/ClipboardCanvas/DataModels/Navigation/CanvasPageNavigationParameterModel.cs b/ClipboardCanvas/DataModels/Navigation/CanvasPageNavigationParameterModel.cs
deleted file mode 100644
index 37bb5f27..00000000
--- a/ClipboardCanvas/DataModels/Navigation/CanvasPageNavigationParameterModel.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-
-using ClipboardCanvas.Models;
-using ClipboardCanvas.Enums;
-
-namespace ClipboardCanvas.DataModels.Navigation
-{
- public class CanvasPageNavigationParameterModel : BaseDisplayFrameParameterDataModel
- {
- public IDisposable CollectionPreviewIDisposable { get; set; }
-
- public CanvasPageNavigationParameterModel(ICollectionModel collectionModel, CanvasType canvasType)
- : base(collectionModel, canvasType)
- {
- }
- }
-}
diff --git a/ClipboardCanvas/DataModels/Navigation/CollectionPreviewPageNavigationParameterModel.cs b/ClipboardCanvas/DataModels/Navigation/CollectionPreviewPageNavigationParameterModel.cs
deleted file mode 100644
index 9c1892d7..00000000
--- a/ClipboardCanvas/DataModels/Navigation/CollectionPreviewPageNavigationParameterModel.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Models;
-
-namespace ClipboardCanvas.DataModels.Navigation
-{
- public class CollectionPreviewPageNavigationParameterModel : BaseDisplayFrameParameterDataModel
- {
- public readonly CanvasItem itemToSelect;
-
- public CollectionPreviewPageNavigationParameterModel(ICollectionModel collectionModel, CanvasType canvasType, CanvasItem itemToSelect = null)
- : base(collectionModel, canvasType)
- {
- this.itemToSelect = itemToSelect;
- }
- }
-}
diff --git a/ClipboardCanvas/DataModels/Navigation/DisplayFrameNavigationDataModel.cs b/ClipboardCanvas/DataModels/Navigation/DisplayFrameNavigationDataModel.cs
deleted file mode 100644
index 722effdf..00000000
--- a/ClipboardCanvas/DataModels/Navigation/DisplayFrameNavigationDataModel.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using Microsoft.UI.Xaml.Media.Animation;
-
-using ClipboardCanvas.Enums;
-
-namespace ClipboardCanvas.DataModels.Navigation
-{
- public class DisplayFrameNavigationDataModel
- {
- public readonly DisplayPageType pageType;
-
- public readonly NavigationTransitionInfo transitionInfo;
-
- public readonly BaseDisplayFrameParameterDataModel parameter;
-
- public bool simulateNavigation;
-
- public DisplayFrameNavigationDataModel(DisplayPageType pageType, BaseDisplayFrameParameterDataModel parameter, bool simulateNavigation = false)
- : this(pageType, parameter, new DrillInNavigationTransitionInfo(), simulateNavigation)
- {
- }
-
- public DisplayFrameNavigationDataModel(DisplayPageType pageType, BaseDisplayFrameParameterDataModel parameter, NavigationTransitionInfo transitionInfo, bool simulateNavigation)
- {
- this.pageType = pageType;
- this.parameter = parameter;
- this.transitionInfo = transitionInfo;
- this.simulateNavigation = simulateNavigation;
- }
- }
-}
diff --git a/ClipboardCanvas/DataModels/Navigation/FromAutopasteHomepageNavigationParameterModel.cs b/ClipboardCanvas/DataModels/Navigation/FromAutopasteHomepageNavigationParameterModel.cs
deleted file mode 100644
index 1a873034..00000000
--- a/ClipboardCanvas/DataModels/Navigation/FromAutopasteHomepageNavigationParameterModel.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using ClipboardCanvas.Enums;
-
-namespace ClipboardCanvas.DataModels.Navigation
-{
- public class FromAutopasteHomepageNavigationParameterModel : HomepageNavigationParameterModel
- {
- public FromAutopasteHomepageNavigationParameterModel(CanvasType canvasType)
- : base(canvasType)
- {
- }
- }
-}
diff --git a/ClipboardCanvas/DataModels/Navigation/HomepageNavigationParameterModel.cs b/ClipboardCanvas/DataModels/Navigation/HomepageNavigationParameterModel.cs
deleted file mode 100644
index 63ade7de..00000000
--- a/ClipboardCanvas/DataModels/Navigation/HomepageNavigationParameterModel.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Models;
-
-namespace ClipboardCanvas.DataModels.Navigation
-{
- public class HomepageNavigationParameterModel : BaseDisplayFrameParameterDataModel
- {
- public HomepageNavigationParameterModel(CanvasType canvasType, ICollectionModel collectionModel = null)
- : base(collectionModel, canvasType)
- {
- }
- }
-}
diff --git a/ClipboardCanvas/DataModels/Navigation/SettingsFrameNavigationDataModel.cs b/ClipboardCanvas/DataModels/Navigation/SettingsFrameNavigationDataModel.cs
deleted file mode 100644
index b826dce8..00000000
--- a/ClipboardCanvas/DataModels/Navigation/SettingsFrameNavigationDataModel.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System;
-using Microsoft.UI.Xaml.Media.Animation;
-using ClipboardCanvas.Enums;
-
-namespace ClipboardCanvas.DataModels.Navigation
-{
- public class SettingsFrameNavigationDataModel : IEquatable
- {
- public readonly SettingsPageType pageType;
-
- public readonly NavigationTransitionInfo transitionInfo;
-
- public SettingsFrameNavigationDataModel(SettingsPageType pageType)
- : this(pageType, new EntranceNavigationTransitionInfo())
- {
- }
-
- public SettingsFrameNavigationDataModel(SettingsPageType pageType, NavigationTransitionInfo transitionInfo)
- {
- this.pageType = pageType;
- this.transitionInfo = transitionInfo;
- }
-
- public bool Equals(SettingsFrameNavigationDataModel other)
- {
- if (
- this.pageType == other.pageType
- )
- {
- return true;
- }
-
- return false;
- }
- }
-}
diff --git a/ClipboardCanvas/DataModels/SiteMetadata.cs b/ClipboardCanvas/DataModels/SiteMetadata.cs
deleted file mode 100644
index 67a5e530..00000000
--- a/ClipboardCanvas/DataModels/SiteMetadata.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace ClipboardCanvas.DataModels
-{
- public sealed class SiteMetadata
- {
- public string SiteUrl { get; set; }
-
- public string Title { get; set; }
-
- public string Description { get; set; }
-
- public string Keywords { get; set; }
-
- public string IconUrl { get; set; }
-
- public string SiteName { get; set; }
-
- public List ImageUrls { get; set; }
-
- public bool HasAnyData { get; set; }
-
- public SiteMetadata()
- {
- ImageUrls = new List();
- }
- }
-}
diff --git a/ClipboardCanvas/Dialogs/DeleteConfirmationDialog.xaml b/ClipboardCanvas/Dialogs/DeleteConfirmationDialog.xaml
deleted file mode 100644
index ec4c044e..00000000
--- a/ClipboardCanvas/Dialogs/DeleteConfirmationDialog.xaml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/ClipboardCanvas/Dialogs/DeleteConfirmationDialog.xaml.cs b/ClipboardCanvas/Dialogs/DeleteConfirmationDialog.xaml.cs
deleted file mode 100644
index 8d20ccf6..00000000
--- a/ClipboardCanvas/Dialogs/DeleteConfirmationDialog.xaml.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Microsoft.UI.Xaml.Controls;
-
-using ClipboardCanvas.ViewModels.Dialogs;
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Helpers;
-using ClipboardCanvas.ModelViews;
-
-// The Content Dialog item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
-
-namespace ClipboardCanvas.Dialogs
-{
- public sealed partial class DeleteConfirmationDialog : ContentDialog, IDialog, IDialogView
- {
- public DeleteConfirmationDialogViewModel ViewModel
- {
- get => (DeleteConfirmationDialogViewModel)DataContext;
- set => DataContext = value;
- }
-
- public DeleteConfirmationDialog()
- {
- this.InitializeComponent();
- }
-
- public async new Task ShowAsync() => (await base.ShowAsync()).ToDialogResult();
- }
-}
diff --git a/ClipboardCanvas/Dialogs/FileSystemAccessDialog.xaml b/ClipboardCanvas/Dialogs/FileSystemAccessDialog.xaml
deleted file mode 100644
index 3aa00c4b..00000000
--- a/ClipboardCanvas/Dialogs/FileSystemAccessDialog.xaml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ClipboardCanvas/Dialogs/FileSystemAccessDialog.xaml.cs b/ClipboardCanvas/Dialogs/FileSystemAccessDialog.xaml.cs
deleted file mode 100644
index 98a15899..00000000
--- a/ClipboardCanvas/Dialogs/FileSystemAccessDialog.xaml.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Microsoft.UI.Xaml.Controls;
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Helpers;
-using ClipboardCanvas.ViewModels.Dialogs;
-using ClipboardCanvas.ModelViews;
-
-// The Content Dialog item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
-
-namespace ClipboardCanvas.Dialogs
-{
- public sealed partial class FileSystemAccessDialog : ContentDialog, IDialog, IDialogView
- {
- public FileSystemAccessDialogViewModel ViewModel
- {
- get => (FileSystemAccessDialogViewModel)DataContext;
- set => DataContext = value;
- }
-
- public async new Task ShowAsync() => (await base.ShowAsync()).ToDialogResult();
-
- public FileSystemAccessDialog()
- {
- this.InitializeComponent();
- }
- }
-}
diff --git a/ClipboardCanvas/Dialogs/SettingsDialog.xaml b/ClipboardCanvas/Dialogs/SettingsDialog.xaml
deleted file mode 100644
index ff97b524..00000000
--- a/ClipboardCanvas/Dialogs/SettingsDialog.xaml
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
- 1300
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ClipboardCanvas/Dialogs/SettingsDialog.xaml.cs b/ClipboardCanvas/Dialogs/SettingsDialog.xaml.cs
deleted file mode 100644
index 34e2c51d..00000000
--- a/ClipboardCanvas/Dialogs/SettingsDialog.xaml.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-using System;
-using Microsoft.UI.Xaml.Controls;
-using System.Threading.Tasks;
-
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.ViewModels.Dialogs;
-using ClipboardCanvas.Helpers;
-using ClipboardCanvas.ModelViews;
-
-// The Content Dialog item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
-
-namespace ClipboardCanvas.Dialogs
-{
- public sealed partial class SettingsDialog : ContentDialog, IDialog, ISettingsDialogView, IDialogView
- {
- public SettingsDialogViewModel ViewModel
- {
- get => (SettingsDialogViewModel)DataContext;
- set => DataContext = value;
- }
-
- public SettingsDialog()
- {
- this.InitializeComponent();
- }
-
- private void ContentDialog_Loaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
- {
- if (ViewModel != null)
- {
- ViewModel.View = this;
- }
- }
-
- private void SettingsNavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
- {
- var selectedItem = args.SelectedItem as NavigationViewItem;
- int tag = Convert.ToInt32(selectedItem.Tag);
-
- switch (tag)
- {
- default:
- case 0:
- {
- this.ViewModel.UpdateNavigation(SettingsPageType.General);
- break;
- }
-
- case 1:
- {
- this.ViewModel.UpdateNavigation(SettingsPageType.Pasting);
- break;
- }
-
- case 2:
- {
- this.ViewModel.UpdateNavigation(SettingsPageType.Notifications);
- break;
- }
-
- case 3:
- {
- this.ViewModel.UpdateNavigation(SettingsPageType.About);
- break;
- }
- }
- }
-
- public async new Task ShowAsync() => (await base.ShowAsync()).ToDialogResult();
-
- public void CloseDialog()
- {
- this.Hide();
- }
- }
-}
diff --git a/ClipboardCanvas/Dialogs/UpdateChangeLogDialog.xaml b/ClipboardCanvas/Dialogs/UpdateChangeLogDialog.xaml
deleted file mode 100644
index c001ef31..00000000
--- a/ClipboardCanvas/Dialogs/UpdateChangeLogDialog.xaml
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ClipboardCanvas/Dialogs/UpdateChangeLogDialog.xaml.cs b/ClipboardCanvas/Dialogs/UpdateChangeLogDialog.xaml.cs
deleted file mode 100644
index 9c4c32f9..00000000
--- a/ClipboardCanvas/Dialogs/UpdateChangeLogDialog.xaml.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using ClipboardCanvas.ViewModels.Dialogs;
-using System.Threading.Tasks;
-using Microsoft.UI.Xaml.Controls;
-using System;
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Helpers;
-using ClipboardCanvas.ModelViews;
-
-// The Content Dialog item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
-
-namespace ClipboardCanvas.Dialogs
-{
- public sealed partial class UpdateChangeLogDialog : ContentDialog, IDialog, IDialogView
- {
- public UpdateChangeLogDialogViewModel ViewModel
- {
- get => (UpdateChangeLogDialogViewModel)DataContext;
- set => DataContext = value;
- }
-
- public UpdateChangeLogDialog()
- {
- this.InitializeComponent();
- }
-
- public async new Task ShowAsync() => (await base.ShowAsync()).ToDialogResult();
-
- // TODO: Move to view model
- private async void ContentDialog_Loaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
- {
- await ViewModel?.LoadUpdateDataFromGitHub(false);
- }
- }
-}
diff --git a/ClipboardCanvas/Enums/CanvasNavigationDirection.cs b/ClipboardCanvas/Enums/CanvasNavigationDirection.cs
deleted file mode 100644
index 0416e0fc..00000000
--- a/ClipboardCanvas/Enums/CanvasNavigationDirection.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace ClipboardCanvas.Enums
-{
- public enum CanvasNavigationDirection
- {
- Forward = 0,
- Backward = 1
- }
-}
diff --git a/ClipboardCanvas/Enums/CanvasType.cs b/ClipboardCanvas/Enums/CanvasType.cs
deleted file mode 100644
index f13b70f3..00000000
--- a/ClipboardCanvas/Enums/CanvasType.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace ClipboardCanvas.Enums
-{
- public enum CanvasType
- {
- OneCanvas = 0,
- InfiniteCanvas = 1
- }
-}
diff --git a/ClipboardCanvas/Enums/DialogResult.cs b/ClipboardCanvas/Enums/DialogResult.cs
deleted file mode 100644
index 7c1138fc..00000000
--- a/ClipboardCanvas/Enums/DialogResult.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace ClipboardCanvas.Enums
-{
- public enum DialogResult
- {
- Primary = 0,
- Secondary = 1,
- Cancel = 2
- }
-}
diff --git a/ClipboardCanvas/Enums/DisplayPageType.cs b/ClipboardCanvas/Enums/DisplayPageType.cs
deleted file mode 100644
index a997e584..00000000
--- a/ClipboardCanvas/Enums/DisplayPageType.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace ClipboardCanvas.Enums
-{
- public enum DisplayPageType
- {
- Homepage = 0,
- CanvasPage = 1,
- CollectionPreviewPage = 2
- }
-}
diff --git a/ClipboardCanvas/Enums/DragDataType.cs b/ClipboardCanvas/Enums/DragDataType.cs
deleted file mode 100644
index 0e656f60..00000000
--- a/ClipboardCanvas/Enums/DragDataType.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace ClipboardCanvas.Enums
-{
- public enum DragDataType
- {
- StorageItems = 0,
- Text = 1
- }
-}
diff --git a/ClipboardCanvas/Enums/InAppNotificationButtonType.cs b/ClipboardCanvas/Enums/InAppNotificationButtonType.cs
deleted file mode 100644
index 33254130..00000000
--- a/ClipboardCanvas/Enums/InAppNotificationButtonType.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace ClipboardCanvas.Enums
-{
- public enum InAppNotificationButtonType
- {
- OkButton = 0,
- YesButton = 1,
- NoButton = 2
- }
-}
diff --git a/ClipboardCanvas/Enums/NavigationTransitionType.cs b/ClipboardCanvas/Enums/NavigationTransitionType.cs
deleted file mode 100644
index 4fce0054..00000000
--- a/ClipboardCanvas/Enums/NavigationTransitionType.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace ClipboardCanvas.Enums
-{
- public enum NavigationTransitionType
- {
- Suppress = 0,
- DrillInTransition = 1,
- EntranceTransition = 2
- }
-}
diff --git a/ClipboardCanvas/Enums/OperationStatus.cs b/ClipboardCanvas/Enums/OperationStatus.cs
deleted file mode 100644
index c6b24979..00000000
--- a/ClipboardCanvas/Enums/OperationStatus.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-namespace ClipboardCanvas.Enums
-{
- ///
- /// Contains all kinds of return statuses
- ///
- public enum OperationErrorCode : uint
- {
- Success = 0,
- UnknownFailed = 1,
- Canceled = 2,
- AccessUnauthorized = 4,
- NotFound = 8,
- AlreadyExists = 16,
- NotAFolder = 32,
- NotAFile = 64,
- InProgress = 128,
- InvalidArgument = 256,
- InvalidOperation = 512
- }
-}
diff --git a/ClipboardCanvas/Enums/SettingsPageType.cs b/ClipboardCanvas/Enums/SettingsPageType.cs
deleted file mode 100644
index 39bbce77..00000000
--- a/ClipboardCanvas/Enums/SettingsPageType.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace ClipboardCanvas.Enums
-{
- public enum SettingsPageType
- {
- General = 0,
- Pasting = 1,
- Notifications = 2,
- About = 3
- }
-}
diff --git a/ClipboardCanvas/Enums/StatusCenterOperationType.cs b/ClipboardCanvas/Enums/StatusCenterOperationType.cs
deleted file mode 100644
index d8659c54..00000000
--- a/ClipboardCanvas/Enums/StatusCenterOperationType.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace ClipboardCanvas.Enums
-{
- public enum StatusCenterOperationType
- {
- Info = 0,
- Paste = 1,
- OverrideReference = 2
- }
-}
diff --git a/ClipboardCanvas/Enums/WebViewCanvasMode.cs b/ClipboardCanvas/Enums/WebViewCanvasMode.cs
deleted file mode 100644
index dec97ca2..00000000
--- a/ClipboardCanvas/Enums/WebViewCanvasMode.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace ClipboardCanvas.Enums
-{
- public enum WebViewCanvasMode
- {
- Unknown = 0,
- ReadHtml = 0,
- ReadWebsite = 1
- }
-}
diff --git a/ClipboardCanvas/EventArguments/CanvasControlEventArgs.cs b/ClipboardCanvas/EventArguments/CanvasControlEventArgs.cs
deleted file mode 100644
index 63eb4ab8..00000000
--- a/ClipboardCanvas/EventArguments/CanvasControlEventArgs.cs
+++ /dev/null
@@ -1,172 +0,0 @@
-using System;
-using Windows.Storage;
-using Windows.ApplicationModel.DataTransfer;
-
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using ClipboardCanvas.DataModels.ContentDataModels;
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Helpers;
-using ClipboardCanvas.Models;
-
-namespace ClipboardCanvas.EventArguments.CanvasControl
-{
- public abstract class BaseCanvasControlEventArgs : EventArgs
- {
- public readonly ICollectionModel collectionModel;
-
- public BaseCanvasControlEventArgs(ICollectionModel collectionModel)
- {
- this.collectionModel = collectionModel;
- }
- }
-
- public class ContentLoadedEventArgs : EventArgs
- {
- public readonly BaseContentTypeModel contentType;
-
- public readonly bool isFilled;
-
- public readonly bool pastedAsReference;
-
- public readonly bool canPasteReference;
-
- public ContentLoadedEventArgs(BaseContentTypeModel contentType, bool isFilled, bool pastedAsReference, bool canPasteReference)
- {
- this.contentType = contentType;
- this.isFilled = isFilled;
- this.pastedAsReference = pastedAsReference;
- this.canPasteReference = canPasteReference;
- }
- }
-
- public class ContentStartedLoadingEventArgs : EventArgs
- {
- public readonly BaseContentTypeModel contentType;
-
- public ContentStartedLoadingEventArgs(BaseContentTypeModel contentType)
- {
- this.contentType = contentType;
- }
- }
-
- public class PasteInitiatedEventArgs : BaseCanvasControlEventArgs
- {
- public readonly bool pasteInNewCanvas;
-
- public readonly DataPackageView forwardedDataPackage;
-
- public readonly BaseContentTypeModel contentType;
-
- public PasteInitiatedEventArgs(bool pasteInNewCanvas, DataPackageView forwardedDataPackage, BaseContentTypeModel contentType, ICollectionModel collectionModel)
- : base(collectionModel)
- {
- this.pasteInNewCanvas = pasteInNewCanvas;
- this.forwardedDataPackage = forwardedDataPackage;
- this.contentType = contentType;
- }
- }
-
- public class FileCreatedEventArgs : EventArgs
- {
- public readonly BaseContentTypeModel contentType;
-
- public readonly IStorageItem item;
-
- public FileCreatedEventArgs(BaseContentTypeModel contentType, IStorageItem item)
- {
- this.contentType = contentType;
- this.item = item;
- }
- }
-
- public class FileModifiedEventArgs : EventArgs
- {
- public readonly IStorageItem item;
-
- public FileModifiedEventArgs(IStorageItem item)
- {
- this.item = item;
- }
- }
-
- public class FileDeletedEventArgs : BaseCanvasControlEventArgs
- {
- public readonly IStorageItem item;
-
- public FileDeletedEventArgs(IStorageItem item, ICollectionModel collectionModel)
- : base(collectionModel)
- {
- this.item = item;
- }
- }
-
- public class ErrorOccurredEventArgs : EventArgs
- {
- public readonly SafeWrapperResult error;
-
- public readonly string errorMessage;
-
- public readonly BaseContentTypeModel contentType;
-
- public readonly TimeSpan errorMessageAutoHide;
-
- public ErrorOccurredEventArgs(SafeWrapperResult error, string errorMessage, BaseContentTypeModel contentType)
- : this(error, errorMessage, contentType, TimeSpan.Zero)
- {
- }
-
- public ErrorOccurredEventArgs(SafeWrapperResult error, string errorMessage, BaseContentTypeModel contentType, TimeSpan errorMessageAutoHide)
- {
- this.error = error;
- this.errorMessage = errorMessage;
- this.contentType = contentType;
- this.errorMessageAutoHide = errorMessageAutoHide;
- }
- }
-
- public class ProgressReportedEventArgs : EventArgs
- {
- public readonly float value;
-
- public readonly BaseContentTypeModel contentType;
-
- public ProgressReportedEventArgs(float value, BaseContentTypeModel contentType)
- {
- this.value = value;
- this.contentType = contentType;
- }
- }
-
- public class TipTextUpdateRequestedEventArgs : EventArgs
- {
- public readonly string infoText;
-
- public readonly TimeSpan tipShowDelay;
-
- public TipTextUpdateRequestedEventArgs(string infoText)
- : this(infoText, TimeSpan.Zero)
- {
- }
-
- public TipTextUpdateRequestedEventArgs(string infoText, TimeSpan tipShowDelay)
- {
- this.infoText = infoText;
- this.tipShowDelay = tipShowDelay;
- }
- }
-
- public class OpenNewCanvasRequestedEventArgs : EventArgs
- {
- public readonly CanvasType canvasType;
-
- public OpenNewCanvasRequestedEventArgs()
- {
- this.canvasType = CanvasHelpers.GetDefaultCanvasType();
- }
-
- public OpenNewCanvasRequestedEventArgs(CanvasType canvasType)
- {
- this.canvasType = canvasType;
- }
- }
-}
diff --git a/ClipboardCanvas/EventArguments/CollectionPreviewEventArgs.cs b/ClipboardCanvas/EventArguments/CollectionPreviewEventArgs.cs
deleted file mode 100644
index ed8fd446..00000000
--- a/ClipboardCanvas/EventArguments/CollectionPreviewEventArgs.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System;
-using ClipboardCanvas.Models;
-using ClipboardCanvas.ViewModels;
-using Windows.ApplicationModel.DataTransfer;
-
-namespace ClipboardCanvas.EventArguments.CollectionPreview
-{
- public class CanvasPreviewOpenRequestedEventArgs : EventArgs
- {
- public readonly CollectionPreviewItemViewModel collectionPreviewItemViewModel;
-
- public CanvasPreviewOpenRequestedEventArgs(CollectionPreviewItemViewModel collectionPreviewItemViewModel)
- {
- this.collectionPreviewItemViewModel = collectionPreviewItemViewModel;
- }
- }
-
- public class CanvasPreviewSelectedItemChangedEventArgs : EventArgs
- {
- public readonly CollectionPreviewItemViewModel selectedItem;
-
- public CanvasPreviewSelectedItemChangedEventArgs(CollectionPreviewItemViewModel selectedItem)
- {
- this.selectedItem = selectedItem;
- }
- }
-
- public class CanvasPreviewPasteRequestedEventArgs : EventArgs
- {
- public readonly DataPackageView forwardedDataPackage;
-
- public readonly ICollectionModel collectionModel;
-
- public CanvasPreviewPasteRequestedEventArgs(DataPackageView forwardedDataPackage, ICollectionModel collectionModel)
- {
- this.forwardedDataPackage = forwardedDataPackage;
- this.collectionModel = collectionModel;
- }
- }
-}
diff --git a/ClipboardCanvas/EventArguments/CollectionsEventArgs.cs b/ClipboardCanvas/EventArguments/CollectionsEventArgs.cs
deleted file mode 100644
index 7d4feedd..00000000
--- a/ClipboardCanvas/EventArguments/CollectionsEventArgs.cs
+++ /dev/null
@@ -1,160 +0,0 @@
-using System;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using ClipboardCanvas.Models;
-using ClipboardCanvas.ViewModels.UserControls.Collections;
-
-namespace ClipboardCanvas.EventArguments.Collections
-{
- public abstract class BaseCollectionEventArgs : EventArgs
- {
- public readonly BaseCollectionViewModel baseCollectionViewModel;
-
- public BaseCollectionEventArgs(BaseCollectionViewModel baseCollectionViewModel)
- {
- this.baseCollectionViewModel = baseCollectionViewModel;
- }
- }
-
- public class CollectionItemAddedEventArgs : BaseCollectionEventArgs
- {
- public readonly CollectionItemViewModel itemChanged;
-
- public CollectionItemAddedEventArgs(BaseCollectionViewModel baseCollectionViewModel, CollectionItemViewModel itemChanged)
- : base(baseCollectionViewModel)
- {
- this.itemChanged = itemChanged;
- }
- }
-
- public class CollectionItemRemovedEventArgs : BaseCollectionEventArgs
- {
- public readonly CollectionItemViewModel itemChanged;
-
- public CollectionItemRemovedEventArgs(BaseCollectionViewModel baseCollectionViewModel, CollectionItemViewModel itemChanged)
- : base(baseCollectionViewModel)
- {
- this.itemChanged = itemChanged;
- }
- }
-
- public class CollectionItemRenamedEventArgs : BaseCollectionEventArgs
- {
- public readonly CollectionItemViewModel itemChanged;
-
- public readonly string oldPath;
-
- public CollectionItemRenamedEventArgs(BaseCollectionViewModel baseCollectionViewModel, CollectionItemViewModel itemChanged, string oldPath)
- : base(baseCollectionViewModel)
- {
- this.itemChanged = itemChanged;
- this.oldPath = oldPath;
- }
- }
-
- public class CollectionItemContentsChangedEventArgs : BaseCollectionEventArgs
- {
- public readonly CollectionItemViewModel itemChanged;
-
- public CollectionItemContentsChangedEventArgs(BaseCollectionViewModel baseCollectionViewModel, CollectionItemViewModel itemChanged)
- : base(baseCollectionViewModel)
- {
- this.itemChanged = itemChanged;
- }
- }
-
- public class CollectionRemovedEventArgs : BaseCollectionEventArgs
- {
- public CollectionRemovedEventArgs(BaseCollectionViewModel baseCollectionViewModel)
- : base(baseCollectionViewModel)
- {
- }
- }
-
- public class CollectionAddedEventArgs : BaseCollectionEventArgs
- {
- public CollectionAddedEventArgs(BaseCollectionViewModel baseCollectionViewModel)
- : base(baseCollectionViewModel)
- {
- }
- }
-
- public class CollectionSelectionChangedEventArgs : BaseCollectionEventArgs
- {
- public CollectionSelectionChangedEventArgs(BaseCollectionViewModel baseCollectionViewModel)
- : base(baseCollectionViewModel)
- {
- }
- }
-
- public class CollectionOpenRequestedEventArgs : BaseCollectionEventArgs
- {
- public CollectionOpenRequestedEventArgs(BaseCollectionViewModel baseCollectionViewModel)
- : base(baseCollectionViewModel)
- {
- }
- }
-
- public class RemoveCollectionRequestedEventArgs : BaseCollectionEventArgs
- {
- public RemoveCollectionRequestedEventArgs(BaseCollectionViewModel baseCollectionViewModel)
- : base(baseCollectionViewModel)
- {
- }
- }
-
- public class CheckRenameCollectionRequestedEventArgs : BaseCollectionEventArgs
- {
- public readonly string newName;
-
- public bool canRename;
-
- public CheckRenameCollectionRequestedEventArgs(BaseCollectionViewModel baseCollectionViewModel, string newName)
- : base(baseCollectionViewModel)
- {
- this.newName = newName;
- }
- }
-
- public class CollectionItemsInitializationStartedEventArgs : BaseCollectionEventArgs
- {
- public CollectionItemsInitializationStartedEventArgs(BaseCollectionViewModel baseCollectionViewModel)
- : base(baseCollectionViewModel)
- {
- }
- }
-
- public class CollectionItemsInitializationFinishedEventArgs : BaseCollectionEventArgs
- {
- public CollectionItemsInitializationFinishedEventArgs(BaseCollectionViewModel baseCollectionViewModel)
- : base(baseCollectionViewModel)
- {
- }
- }
-
- public class CollectionErrorRaisedEventArgs : EventArgs
- {
- public readonly SafeWrapperResult safeWrapperResult;
-
- public CollectionErrorRaisedEventArgs(SafeWrapperResult safeWrapperResult)
- {
- this.safeWrapperResult = safeWrapperResult;
- }
- }
-
- public class CanvasLoadFailedEventArgs : EventArgs
- {
- public readonly SafeWrapperResult error;
-
- public CanvasLoadFailedEventArgs(SafeWrapperResult error = null)
- {
- this.error = error;
- }
- }
-
- public class GoToHomepageRequestedEventArgs : EventArgs
- {
- public GoToHomepageRequestedEventArgs()
- {
- }
- }
-}
diff --git a/ClipboardCanvas/EventArguments/DisplayFrameEventArgs.cs b/ClipboardCanvas/EventArguments/DisplayFrameEventArgs.cs
deleted file mode 100644
index c9ddfe3e..00000000
--- a/ClipboardCanvas/EventArguments/DisplayFrameEventArgs.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-using System;
-
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Models;
-using ClipboardCanvas.ViewModels.UserControls.Collections;
-
-namespace ClipboardCanvas.DisplayFrameEventArgs
-{
- public class NavigationStartedEventArgs : BaseDisplayFrameNavigationEventArgs
- {
- public NavigationStartedEventArgs(ICollectionModel collection, CanvasType canvasType, DisplayPageType pageType)
- : base(collection, canvasType, pageType)
- {
- }
- }
-
- public class NavigationFinishedEventArgs : BaseDisplayFrameNavigationEventArgs
- {
- public readonly bool success;
-
- public readonly CollectionItemViewModel collectionItemToLoad;
-
- public NavigationFinishedEventArgs(bool success, CollectionItemViewModel collectionItemToLoad, ICollectionModel collection, CanvasType canvasType, DisplayPageType pageType)
- : base(collection, canvasType, pageType)
- {
- this.success = success;
- this.collectionItemToLoad = collectionItemToLoad;
- }
- }
-
- public abstract class BaseDisplayFrameNavigationEventArgs : EventArgs
- {
- public readonly ICollectionModel collection;
-
- public readonly CanvasType canvasType;
-
- public readonly DisplayPageType pageType;
-
- public BaseDisplayFrameNavigationEventArgs(ICollectionModel collection, CanvasType canvasType, DisplayPageType pageType)
- {
- this.collection = collection;
- this.canvasType = canvasType;
- this.pageType = pageType;
- }
- }
-}
diff --git a/ClipboardCanvas/EventArguments/InAppNotificationEventArgs.cs b/ClipboardCanvas/EventArguments/InAppNotificationEventArgs.cs
deleted file mode 100644
index dbf94831..00000000
--- a/ClipboardCanvas/EventArguments/InAppNotificationEventArgs.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using ClipboardCanvas.Enums;
-
-namespace ClipboardCanvas.EventArguments
-{
- public class InAppNotificationDismissedEventArgs
- {
- public readonly InAppNotificationButtonType notificationResult;
-
- public InAppNotificationDismissedEventArgs(InAppNotificationButtonType notificationResult)
- {
- this.notificationResult = notificationResult;
- }
- }
-}
diff --git a/ClipboardCanvas/EventArguments/InfiniteCanvasEventArgs.cs b/ClipboardCanvas/EventArguments/InfiniteCanvasEventArgs.cs
deleted file mode 100644
index b5ac8416..00000000
--- a/ClipboardCanvas/EventArguments/InfiniteCanvasEventArgs.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System;
-using Windows.Storage.Streams;
-
-using ClipboardCanvas.ViewModels.UserControls;
-
-namespace ClipboardCanvas.EventArguments.InfiniteCanvasEventArgs
-{
- public class InfiniteCanvasSaveRequestedEventArgs : EventArgs
- {
- public readonly IBuffer canvasImageBuffer;
-
- public readonly uint pixelWidth;
-
- public readonly uint pixelHeight;
-
- public InfiniteCanvasSaveRequestedEventArgs(IBuffer canvasImageBuffer, uint pixelWidth, uint pixelHeight)
- {
- this.canvasImageBuffer = canvasImageBuffer;
- this.pixelWidth = pixelWidth;
- this.pixelHeight = pixelHeight;
- }
- }
-
- public class InfiniteCanvasItemRemovalRequestedEventArgs : EventArgs
- {
- public readonly InteractableCanvasControlItemViewModel itemToRemove;
-
- public InfiniteCanvasItemRemovalRequestedEventArgs(InteractableCanvasControlItemViewModel itemToRemove)
- {
- this.itemToRemove = itemToRemove;
- }
- }
-}
diff --git a/ClipboardCanvas/EventArguments/JsonSettingsEventArgs.cs b/ClipboardCanvas/EventArguments/JsonSettingsEventArgs.cs
deleted file mode 100644
index ae46d9aa..00000000
--- a/ClipboardCanvas/EventArguments/JsonSettingsEventArgs.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-
-namespace ClipboardCanvas.EventArguments
-{
- public sealed class SettingChangedEventArgs : EventArgs
- {
- public readonly string settingName;
-
- public readonly object newValue;
-
- public SettingChangedEventArgs(string settingName, object newValue)
- {
- this.settingName = settingName;
- this.newValue = newValue;
- }
- }
-}
diff --git a/ClipboardCanvas/EventArguments/OperationContextEventArgs.cs b/ClipboardCanvas/EventArguments/OperationContextEventArgs.cs
deleted file mode 100644
index 6585de7c..00000000
--- a/ClipboardCanvas/EventArguments/OperationContextEventArgs.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-
-namespace ClipboardCanvas.EventArguments
-{
- public class OperationFinishedEventArgs : EventArgs
- {
- public readonly SafeWrapperResult result;
-
- public OperationFinishedEventArgs(SafeWrapperResult result)
- {
- this.result = result;
- }
- }
-}
diff --git a/ClipboardCanvas/EventArguments/SearchControlEventArgs.cs b/ClipboardCanvas/EventArguments/SearchControlEventArgs.cs
deleted file mode 100644
index be9cb616..00000000
--- a/ClipboardCanvas/EventArguments/SearchControlEventArgs.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System;
-
-namespace ClipboardCanvas.EventArguments
-{
- public class SearchCloseRequestedEventArgs : EventArgs
- {
- public SearchCloseRequestedEventArgs()
- {
- }
- }
-}
diff --git a/ClipboardCanvas/EventArguments/TimelineWidgetEventArgs.cs b/ClipboardCanvas/EventArguments/TimelineWidgetEventArgs.cs
deleted file mode 100644
index 74f9b608..00000000
--- a/ClipboardCanvas/EventArguments/TimelineWidgetEventArgs.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-
-using ClipboardCanvas.ViewModels.Widgets.Timeline;
-
-namespace ClipboardCanvas.EventArguments
-{
- public class RemoveSectionItemRequestedEventArgs : EventArgs
- {
- public readonly TimelineSectionItemViewModel itemViewModel;
-
- public RemoveSectionItemRequestedEventArgs(TimelineSectionItemViewModel itemViewModel)
- {
- this.itemViewModel = itemViewModel;
- }
- }
-
- public class RemoveSectionRequestedEventArgs : EventArgs
- {
- public readonly TimelineSectionViewModel sectionViewModel;
-
- public RemoveSectionRequestedEventArgs(TimelineSectionViewModel sectionViewModel)
- {
- this.sectionViewModel = sectionViewModel;
- }
- }
-}
diff --git a/ClipboardCanvas/Exceptions/ReferencedFileNotFoundException.cs b/ClipboardCanvas/Exceptions/ReferencedFileNotFoundException.cs
deleted file mode 100644
index 573c8adf..00000000
--- a/ClipboardCanvas/Exceptions/ReferencedFileNotFoundException.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.IO;
-
-namespace ClipboardCanvas.Exceptions
-{
- public class ReferencedFileNotFoundException : Exception
- {
- public ReferencedFileNotFoundException()
- : base(new FileNotFoundException().Message)
- {
- }
- }
-}
diff --git a/ClipboardCanvas/Extensions/CollectionExtensions.cs b/ClipboardCanvas/Extensions/CollectionExtensions.cs
deleted file mode 100644
index 6ee8bc1b..00000000
--- a/ClipboardCanvas/Extensions/CollectionExtensions.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using System;
-using System.Linq;
-using System.Collections.Generic;
-using System.Collections;
-
-namespace ClipboardCanvas.Extensions
-{
- public static class CollectionExtensions
- {
- public static int IndexFitBounds(int itemsCount, int wantedIndex) => wantedIndex < 0 ? 0 : (wantedIndex >= itemsCount ? (itemsCount == 0 ? 0 : (itemsCount - 1)) : wantedIndex);
-
- public static void AddFront(this IList list, T item) => list.Insert(0, item);
-
- public static bool ContainsOnly(this IEnumerable enumerable, T item)
- {
- return enumerable.Count() == 1 && enumerable.Contains(item);
- }
-
- public static bool AddIfNotPresent(this IList list, T item)
- {
- if (!list.Contains(item))
- {
- list.Add(item);
- return true;
- }
-
- return false;
- }
-
- public static void RemoveFront(this IList list)
- {
- if (!list.IsEmpty())
- {
- list.RemoveAt(0);
- }
- }
-
- public static void RemoveBack(this IList list)
- {
- if (!list.IsEmpty())
- {
- list.RemoveAt(list.Count - 1);
- }
- }
-
- public static void DisposeClear(this ICollection collection)
- {
- if (collection == null)
- {
- return;
- }
-
- collection.DisposeAll();
- collection.Clear();
- }
-
- public static void DisposeAll(this IEnumerable enumerable)
- {
- if (enumerable == null)
- {
- return;
- }
-
- foreach (var item in enumerable)
- {
- (item as IDisposable)?.Dispose();
- }
- }
- }
-}
diff --git a/ClipboardCanvas/Extensions/EnumExtensions.cs b/ClipboardCanvas/Extensions/EnumExtensions.cs
deleted file mode 100644
index 6b16cb50..00000000
--- a/ClipboardCanvas/Extensions/EnumExtensions.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace ClipboardCanvas.Extensions
-{
- public static class EnumExtensions
- {
- public static T NextEnumValue(T enumerate) where T : Enum
- {
- IEnumerable values = Enum.GetValues(typeof(T)).Cast();
-
- bool returnNext = false;
- foreach (T item in values)
- {
- if (returnNext)
- {
- return item;
- }
- else if (item.GenericEquals(enumerate))
- {
- returnNext = true;
- }
- }
- // End of sequence
-
- return values.First();
- }
- }
-}
diff --git a/ClipboardCanvas/Extensions/GenericsExtensions.cs b/ClipboardCanvas/Extensions/GenericsExtensions.cs
deleted file mode 100644
index eb9f990e..00000000
--- a/ClipboardCanvas/Extensions/GenericsExtensions.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace ClipboardCanvas.Extensions
-{
- public static class GenericsExtensions
- {
- ///
- /// Converts given to provided
- ///
- /// The generic type to convert to
- /// The type to convert from
- /// The value
- ///
- /// The must implement
- ///
- /// Converted
- public static TRequested ConvertValue(this TSource value) =>
- (TRequested)Convert.ChangeType(value, typeof(TRequested));
-
- ///
- /// Compares two generic types
- ///
- ///
- /// The first value
- /// The second value
- /// true if both and are equal, otherwise false
- public static bool GenericEquals(this T value1, T value2) =>
- EqualityComparer.Default.Equals(value1, value2);
-
- ///
- /// Determines whether is null
- ///
- ///
- ///
- /// if is null, otherwise false
- public static bool IsNull(this T value) => GenericEquals(value, default);
- }
-}
diff --git a/ClipboardCanvas/Extensions/LinqExtensions.cs b/ClipboardCanvas/Extensions/LinqExtensions.cs
deleted file mode 100644
index 55781dbd..00000000
--- a/ClipboardCanvas/Extensions/LinqExtensions.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System.Linq;
-using System.Collections.Generic;
-using System.Collections;
-
-namespace ClipboardCanvas.Extensions
-{
- public static class LinqExtensions
- {
- ///
- /// Determines whether is empty or not.
- ///
- /// Remarks:
- ///
- /// This function is faster than enumerable.Count() == 0 since it'll only iterate one element instead of all elements.
- ///
- /// This function is null-safe.
- ///
- ///
- ///
- ///
- public static bool IsEmpty(this IEnumerable enumerable) => enumerable == null || !enumerable.Any();
-
- public static bool CheckEveryNotNull(this IEnumerable enumerable) => !(enumerable == null || enumerable.Any((item) => item.IsNull()));
-
- public static List ToListSingle(this T element) => new List() { element };
-
- public static T Next(this IEnumerable enumerable, int currentIndex) => (currentIndex + 1) >= enumerable.Count() ? default : enumerable.ElementAt(currentIndex + 1);
- }
-}
diff --git a/ClipboardCanvas/Extensions/RangeObservableCollection.cs b/ClipboardCanvas/Extensions/RangeObservableCollection.cs
deleted file mode 100644
index c77955b6..00000000
--- a/ClipboardCanvas/Extensions/RangeObservableCollection.cs
+++ /dev/null
@@ -1,670 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Linq;
-
-#nullable enable
-namespace ClipboardCanvas.Extensions
-{
- // Licensed to the .NET Foundation under one or more agreements.
- // The .NET Foundation licenses this file to you under the MIT license.
-
- // Source: https://gist.github.com/weitzhandler/65ac9113e31d12e697cb58cd92601091
- // Author: https://gist.github.com/weitzhandler
- // The above information was disclosed on 2021.07.14
-
- ///
- /// Implementation of a dynamic data collection based on generic Collection<T>,
- /// implementing INotifyCollectionChanged to notify listeners
- /// when items get added, removed or the whole list is refreshed.
- ///
- public class RangeObservableCollection : ObservableCollection
- {
- //------------------------------------------------------
- //
- // Private Fields
- //
- //------------------------------------------------------
-
- #region Private Fields
- [NonSerialized]
- private DeferredEventsCollection? _deferredEvents;
- #endregion Private Fields
-
-
- //------------------------------------------------------
- //
- // Constructors
- //
- //------------------------------------------------------
-
- #region Constructors
- ///
- /// Initializes a new instance of ObservableCollection that is empty and has default initial capacity.
- ///
- public RangeObservableCollection() { }
-
- ///
- /// Initializes a new instance of the ObservableCollection class that contains
- /// elements copied from the specified collection and has sufficient capacity
- /// to accommodate the number of elements copied.
- ///
- /// The collection whose elements are copied to the new list.
- ///
- /// The elements are copied onto the ObservableCollection in the
- /// same order they are read by the enumerator of the collection.
- ///
- /// collection is a null reference
- public RangeObservableCollection(IEnumerable collection) : base(collection) { }
-
- ///
- /// Initializes a new instance of the ObservableCollection class
- /// that contains elements copied from the specified list
- ///
- /// The list whose elements are copied to the new list.
- ///
- /// The elements are copied onto the ObservableCollection in the
- /// same order they are read by the enumerator of the list.
- ///
- /// list is a null reference
- public RangeObservableCollection(List list) : base(list) { }
-
- #endregion Constructors
-
- //------------------------------------------------------
- //
- // Public Properties
- //
- //------------------------------------------------------
-
- #region Public Properties
- EqualityComparer? _Comparer;
- public EqualityComparer Comparer
- {
- get => _Comparer ??= EqualityComparer.Default;
- private set => _Comparer = value;
- }
-
- ///
- /// Gets or sets a value indicating whether this collection acts as a ,
- /// disallowing duplicate items, based on .
- /// This might indeed consume background performance, but in the other hand,
- /// it will pay off in UI performance as less required UI updates are required.
- ///
- public bool AllowDuplicates { get; set; } = true;
-
- #endregion Public Properties
-
- //------------------------------------------------------
- //
- // Public Methods
- //
- //------------------------------------------------------
-
- #region Public Methods
-
- ///
- /// Adds the elements of the specified collection to the end of the .
- ///
- ///
- /// The collection whose elements should be added to the end of the .
- /// The collection itself cannot be null, but it can contain elements that are null, if type T is a reference type.
- ///
- /// is null.
- public void AddRange(IEnumerable collection)
- {
- InsertRange(Count, collection);
- }
-
- ///
- /// Inserts the elements of a collection into the at the specified index.
- ///
- /// The zero-based index at which the new elements should be inserted.
- /// The collection whose elements should be inserted into the List.
- /// The collection itself cannot be null, but it can contain elements that are null, if type T is a reference type.
- /// is null.
- /// is not in the collection range.
- public void InsertRange(int index, IEnumerable collection)
- {
- if (collection == null)
- throw new ArgumentNullException(nameof(collection));
- if (index < 0)
- throw new ArgumentOutOfRangeException(nameof(index));
- if (index > Count)
- throw new ArgumentOutOfRangeException(nameof(index));
-
- if (!AllowDuplicates)
- collection =
- collection
- .Distinct(Comparer)
- .Where(item => !Items.Contains(item, Comparer))
- .ToList();
-
- if (collection is ICollection countable)
- {
- if (countable.Count == 0)
- return;
- }
- else if (!collection.Any())
- return;
-
- CheckReentrancy();
-
- //expand the following couple of lines when adding more constructors.
- var target = (List)Items;
- target.InsertRange(index, collection);
-
- OnEssentialPropertiesChanged();
-
- if (!(collection is IList list))
- list = new List(collection);
-
- OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, list, index));
- }
-
- ///
- /// Removes the first occurence of each item in the specified collection from the .
- ///
- /// The items to remove.
- /// is null.
- public void RemoveRange(IEnumerable collection)
- {
- if (collection == null)
- throw new ArgumentNullException(nameof(collection));
-
- if (Count == 0)
- return;
- else if (collection is ICollection countable)
- {
- if (countable.Count == 0)
- return;
- else if (countable.Count == 1)
- using (IEnumerator enumerator = countable.GetEnumerator())
- {
- enumerator.MoveNext();
- Remove(enumerator.Current);
- return;
- }
- }
- else if (!collection.Any())
- return;
-
- CheckReentrancy();
-
- var clusters = new Dictionary>();
- var lastIndex = -1;
- List? lastCluster = null;
- foreach (T item in collection)
- {
- var index = IndexOf(item);
- if (index < 0)
- continue;
-
- Items.RemoveAt(index);
-
- if (lastIndex == index && lastCluster != null)
- lastCluster.Add(item);
- else
- clusters[lastIndex = index] = lastCluster = new List { item };
- }
-
- OnEssentialPropertiesChanged();
-
- if (Count == 0)
- OnCollectionReset();
- else
- foreach (KeyValuePair> cluster in clusters)
- OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, cluster.Value, cluster.Key));
-
- }
-
- ///
- /// Iterates over the collection and removes all items that satisfy the specified match.
- ///
- /// The complexity is O(n).
- ///
- /// Returns the number of elements that where
- /// is null.
- public int RemoveAll(Predicate match)
- {
- return RemoveAll(0, Count, match);
- }
-
- ///
- /// Iterates over the specified range within the collection and removes all items that satisfy the specified match.
- ///
- /// The complexity is O(n).
- /// The index of where to start performing the search.
- /// The number of items to iterate on.
- ///
- /// Returns the number of elements that where
- /// is out of range.
- /// is out of range.
- /// is null.
- public int RemoveAll(int index, int count, Predicate match)
- {
- if (index < 0)
- throw new ArgumentOutOfRangeException(nameof(index));
- if (count < 0)
- throw new ArgumentOutOfRangeException(nameof(count));
- if (index + count > Count)
- throw new ArgumentOutOfRangeException(nameof(index));
- if (match == null)
- throw new ArgumentNullException(nameof(match));
-
- if (Count == 0)
- return 0;
-
- List? cluster = null;
- var clusterIndex = -1;
- var removedCount = 0;
-
- using (BlockReentrancy())
- using (DeferEvents())
- {
- for (var i = 0; i < count; i++, index++)
- {
- T item = Items[index];
- if (match(item))
- {
- Items.RemoveAt(index);
- removedCount++;
-
- if (clusterIndex == index)
- {
- Debug.Assert(cluster != null);
- cluster!.Add(item);
- }
- else
- {
- cluster = new List { item };
- clusterIndex = index;
- }
-
- index--;
- }
- else if (clusterIndex > -1)
- {
- OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, cluster, clusterIndex));
- clusterIndex = -1;
- cluster = null;
- }
- }
-
- if (clusterIndex > -1)
- OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, cluster, clusterIndex));
- }
-
- if (removedCount > 0)
- OnEssentialPropertiesChanged();
-
- return removedCount;
- }
-
- ///
- /// Removes a range of elements from the >.
- ///
- /// The zero-based starting index of the range of elements to remove.
- /// The number of elements to remove.
- /// The specified range is exceeding the collection.
- public void RemoveRange(int index, int count)
- {
- if (index < 0)
- throw new ArgumentOutOfRangeException(nameof(index));
- if (count < 0)
- throw new ArgumentOutOfRangeException(nameof(count));
- if (index + count > Count)
- throw new ArgumentOutOfRangeException(nameof(index));
-
- if (count == 0)
- return;
-
- if (count == 1)
- {
- RemoveItem(index);
- return;
- }
-
- //Items will always be List, see constructors
- var items = (List)Items;
- List removedItems = items.GetRange(index, count);
-
- CheckReentrancy();
-
- items.RemoveRange(index, count);
-
- OnEssentialPropertiesChanged();
-
- if (Count == 0)
- OnCollectionReset();
- else
- OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, removedItems, index));
- }
-
- ///
- /// Clears the current collection and replaces it with the specified collection,
- /// using .
- ///
- /// The items to fill the collection with, after clearing it.
- /// is null.
- public void ReplaceRange(IEnumerable collection)
- {
- ReplaceRange(0, Count, collection);
- }
-
- ///
- /// Removes the specified range and inserts the specified collection in its position, leaving equal items in equal positions intact.
- ///
- /// The index of where to start the replacement.
- /// The number of items to be replaced.
- /// The collection to insert in that location.
- /// is out of range.
- /// is out of range.
- /// is null.
- /// is null.
- public void ReplaceRange(int index, int count, IEnumerable collection)
- {
- if (index < 0)
- throw new ArgumentOutOfRangeException(nameof(index));
- if (count < 0)
- throw new ArgumentOutOfRangeException(nameof(count));
- if (index + count > Count)
- throw new ArgumentOutOfRangeException(nameof(index));
-
- if (collection == null)
- throw new ArgumentNullException(nameof(collection));
-
- if (!AllowDuplicates)
- collection =
- collection
- .Distinct(Comparer)
- .ToList();
-
- if (collection is ICollection countable)
- {
- if (countable.Count == 0)
- {
- RemoveRange(index, count);
- return;
- }
- }
- else if (!collection.Any())
- {
- RemoveRange(index, count);
- return;
- }
-
- if (index + count == 0)
- {
- InsertRange(0, collection);
- return;
- }
-
- if (!(collection is IList list))
- list = new List(collection);
-
- using (BlockReentrancy())
- using (DeferEvents())
- {
- var rangeCount = index + count;
- var addedCount = list.Count;
-
- var changesMade = false;
- List?
- newCluster = null,
- oldCluster = null;
-
-
- int i = index;
- for (; i < rangeCount && i - index < addedCount; i++)
- {
- //parallel position
- T old = this[i], @new = list[i - index];
- if (Comparer.Equals(old, @new))
- {
- OnRangeReplaced(i, newCluster!, oldCluster!);
- continue;
- }
- else
- {
- Items[i] = @new;
-
- if (newCluster == null)
- {
- Debug.Assert(oldCluster == null);
- newCluster = new List { @new };
- oldCluster = new List { old };
- }
- else
- {
- newCluster.Add(@new);
- oldCluster!.Add(old);
- }
-
- changesMade = true;
- }
- }
-
- OnRangeReplaced(i, newCluster!, oldCluster!);
-
- //exceeding position
- if (count != addedCount)
- {
- var items = (List)Items;
- if (count > addedCount)
- {
- var removedCount = rangeCount - addedCount;
- T[] removed = new T[removedCount];
- items.CopyTo(i, removed, 0, removed.Length);
- items.RemoveRange(i, removedCount);
- OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, removed, i));
- }
- else
- {
- var k = i - index;
- T[] added = new T[addedCount - k];
- for (int j = k; j < addedCount; j++)
- {
- T @new = list[j];
- added[j - k] = @new;
- }
- items.InsertRange(i, added);
- OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, added, i));
- }
-
- OnEssentialPropertiesChanged();
- }
- else if (changesMade)
- {
- OnIndexerPropertyChanged();
- }
- }
- }
-
- #endregion Public Methods
-
-
- //------------------------------------------------------
- //
- // Protected Methods
- //
- //------------------------------------------------------
-
- #region Protected Methods
-
- ///
- /// Called by base class Collection<T> when the list is being cleared;
- /// raises a CollectionChanged event to any listeners.
- ///
- protected override void ClearItems()
- {
- if (Count == 0)
- return;
-
- CheckReentrancy();
- base.ClearItems();
- OnEssentialPropertiesChanged();
- OnCollectionReset();
- }
-
- ///
- protected override void InsertItem(int index, T item)
- {
- if (!AllowDuplicates && Items.Contains(item))
- return;
-
- base.InsertItem(index, item);
- }
-
- ///
- protected override void SetItem(int index, T item)
- {
- if (AllowDuplicates)
- {
- if (Comparer.Equals(this[index], item))
- return;
- }
- else
- if (Items.Contains(item, Comparer))
- return;
-
- CheckReentrancy();
- T oldItem = this[index];
- base.SetItem(index, item);
-
- OnIndexerPropertyChanged();
- OnCollectionChanged(NotifyCollectionChangedAction.Replace, oldItem!, item!, index);
- }
-
- ///
- /// Raise CollectionChanged event to any listeners.
- /// Properties/methods modifying this ObservableCollection will raise
- /// a collection changed event through this virtual method.
- ///
- ///
- /// When overriding this method, either call its base implementation
- /// or call to guard against reentrant collection changes.
- ///
- protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
- {
- if (_deferredEvents != null)
- {
- _deferredEvents.Add(e);
- return;
- }
- base.OnCollectionChanged(e);
- }
-
- protected virtual IDisposable DeferEvents() => new DeferredEventsCollection(this);
-
- #endregion Protected Methods
-
-
- //------------------------------------------------------
- //
- // Private Methods
- //
- //------------------------------------------------------
-
- #region Private Methods
-
- ///
- /// Helper to raise Count property and the Indexer property.
- ///
- void OnEssentialPropertiesChanged()
- {
- OnPropertyChanged(EventArgsCache.CountPropertyChanged);
- OnIndexerPropertyChanged();
- }
-
- ///
- /// /// Helper to raise a PropertyChanged event for the Indexer property
- /// ///
- void OnIndexerPropertyChanged() =>
- OnPropertyChanged(EventArgsCache.IndexerPropertyChanged);
-
- ///
- /// Helper to raise CollectionChanged event to any listeners
- ///
- void OnCollectionChanged(NotifyCollectionChangedAction action, object oldItem, object newItem, int index) =>
- OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, newItem, oldItem, index));
-
- ///
- /// Helper to raise CollectionChanged event with action == Reset to any listeners
- ///
- void OnCollectionReset() =>
- OnCollectionChanged(EventArgsCache.ResetCollectionChanged);
-
- ///
- /// Helper to raise event for clustered action and clear cluster.
- ///
- /// The index of the item following the replacement block.
- ///
- ///
- //TODO should have really been a local method inside ReplaceRange(int index, int count, IEnumerable collection, IEqualityComparer comparer),
- //move when supported language version updated.
- void OnRangeReplaced(int followingItemIndex, ICollection newCluster, ICollection oldCluster)
- {
- if (oldCluster == null || oldCluster.Count == 0)
- {
- Debug.Assert(newCluster == null || newCluster.Count == 0);
- return;
- }
-
- OnCollectionChanged(
- new NotifyCollectionChangedEventArgs(
- NotifyCollectionChangedAction.Replace,
- new List(newCluster),
- new List(oldCluster),
- followingItemIndex - oldCluster.Count));
-
- oldCluster.Clear();
- newCluster.Clear();
- }
-
- #endregion Private Methods
-
- //------------------------------------------------------
- //
- // Private Types
- //
- //------------------------------------------------------
-
- #region Private Types
- sealed class DeferredEventsCollection : List, IDisposable
- {
- readonly RangeObservableCollection _collection;
- public DeferredEventsCollection(RangeObservableCollection collection)
- {
- Debug.Assert(collection != null);
- Debug.Assert(collection._deferredEvents == null);
- _collection = collection;
- _collection._deferredEvents = this;
- }
-
- public void Dispose()
- {
- _collection._deferredEvents = null;
- foreach (var args in this)
- _collection.OnCollectionChanged(args);
- }
- }
-
- #endregion Private Types
-
- }
-
- ///
- /// To be kept outside , since otherwise, a new instance will be created for each generic type used.
- ///
- internal static class EventArgsCache
- {
- internal static readonly PropertyChangedEventArgs CountPropertyChanged = new PropertyChangedEventArgs("Count");
- internal static readonly PropertyChangedEventArgs IndexerPropertyChanged = new PropertyChangedEventArgs("Item[]");
- internal static readonly NotifyCollectionChangedEventArgs ResetCollectionChanged = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset);
- }
-}
diff --git a/ClipboardCanvas/Extensions/SafetyExtensions.cs b/ClipboardCanvas/Extensions/SafetyExtensions.cs
deleted file mode 100644
index 75dc5cec..00000000
--- a/ClipboardCanvas/Extensions/SafetyExtensions.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using ClipboardCanvas.UnsafeNative;
-using Microsoft.Win32.SafeHandles;
-using System;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-
-namespace ClipboardCanvas.Extensions
-{
- public static class SafetyExtensions
- {
- public static T PreventNull(this T element, T defaultValue, bool throwOnNullDefaultValue = true)
- {
- if (element.IsNull()) // Is null
- {
- if (defaultValue.IsNull() && throwOnNullDefaultValue) // Default value is null
- {
- Debugger.Break();
- throw new NullReferenceException($"[PreventNull] Provided defautValue was null! Type: {typeof(T)}");
- }
- else
- {
- return defaultValue;
- }
- }
- else
- {
- return element;
- }
- }
-
- public static TSafeHandle ToSafeHandle(this IntPtr unsafeHandle, Func createSafeHandle) where TSafeHandle : SafeHandle =>
- createSafeHandle(unsafeHandle);
-
- public static SafeFileHandle ToSafeFileHandle(this IntPtr unsafeHandle, bool ownsHandle = true) =>
- ToSafeHandle(unsafeHandle, (h) => new SafeFileHandle(h, ownsHandle));
-
- public static bool CloseFileHandle(this IntPtr unsafeFileHandle) =>
- UnsafeNativeApis.CloseHandle(unsafeFileHandle);
- }
-}
diff --git a/ClipboardCanvas/Extensions/StringExtensions.cs b/ClipboardCanvas/Extensions/StringExtensions.cs
deleted file mode 100644
index 0515b746..00000000
--- a/ClipboardCanvas/Extensions/StringExtensions.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace ClipboardCanvas.Extensions
-{
- public static class StringExtensions
- {
- public static string FirstToUpper(this string str)
- {
- return $"{str[0].ToString().ToUpper()}{str.Substring(1, str.Length - 1)}";
- }
- }
-}
diff --git a/ClipboardCanvas/Extensions/TaskExtensions.cs b/ClipboardCanvas/Extensions/TaskExtensions.cs
deleted file mode 100644
index 0e859a48..00000000
--- a/ClipboardCanvas/Extensions/TaskExtensions.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace ClipboardCanvas.Extensions
-{
- public static class TaskExtensions
- {
- public static async Task> WaitAll(this IEnumerable> tasks)
- {
- IList results = new List();
-
- foreach (var task in tasks)
- {
- results.Add(await task);
- }
-
- return results;
- }
- }
-}
diff --git a/ClipboardCanvas/GlobalizationExtensions/LocalizationExtensions.cs b/ClipboardCanvas/GlobalizationExtensions/LocalizationExtensions.cs
deleted file mode 100644
index 23b96c1d..00000000
--- a/ClipboardCanvas/GlobalizationExtensions/LocalizationExtensions.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using Windows.UI;
-using Windows.ApplicationModel.Resources;
-
-namespace ClipboardCanvas.GlobalizationExtensions
-{
- public static class LocalizationExtensions
- {
- private static readonly ResourceLoader IndependentLoader;
-
- static LocalizationExtensions()
- {
- IndependentLoader = ResourceLoader.GetForViewIndependentUse();
- }
-
- public static string GetLocalized2(this string resourceKey, UIContext uiContext = null)
- {
- if (Constants.UI.USE_GETLOCALIZED2)
- {
- return GetLocalized2Internal(resourceKey, uiContext);
- }
- else
- {
- return CommunityToolkit.WinUI.StringExtensions.GetLocalized(resourceKey);
- }
- }
-
- private static string GetLocalized2Internal(this string resourceKey, UIContext uiContext = null)
- {
- if (uiContext is not null)
- {
- return ResourceLoader.GetForUIContext(uiContext).GetString(resourceKey);
- }
-
- return IndependentLoader?.GetString(resourceKey);
- }
- }
-}
diff --git a/ClipboardCanvas/GlobalizationExtensions/ResourceString.cs b/ClipboardCanvas/GlobalizationExtensions/ResourceString.cs
deleted file mode 100644
index d90b0a19..00000000
--- a/ClipboardCanvas/GlobalizationExtensions/ResourceString.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using Windows.ApplicationModel.Resources;
-using Microsoft.UI.Xaml.Markup;
-
-namespace ClipboardCanvas.GlobalizationExtensions
-{
- [MarkupExtensionReturnType(ReturnType = typeof(string))]
- public sealed class ResourceString : MarkupExtension
- {
- private static readonly ResourceLoader ResourceLoader = new ResourceLoader();
-
- public string Name { get; set; }
-
- protected override object ProvideValue()
- {
- return ResourceLoader.GetString(Name);
- }
- }
-}
diff --git a/ClipboardCanvas/Helpers/AdaptiveActionsHelpers.cs b/ClipboardCanvas/Helpers/AdaptiveActionsHelpers.cs
deleted file mode 100644
index b5ff9447..00000000
--- a/ClipboardCanvas/Helpers/AdaptiveActionsHelpers.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-using System.Collections.Generic;
-using CommunityToolkit.Mvvm.Input;
-using Windows.ApplicationModel.DataTransfer;
-using System.Threading;
-
-using ClipboardCanvas.GlobalizationExtensions;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using ClipboardCanvas.ViewModels.UserControls;
-using ClipboardCanvas.ViewModels.UserControls.CanvasDisplay;
-using ClipboardCanvas.Models;
-using ClipboardCanvas.ViewModels.UserControls.Collections;
-using ClipboardCanvas.ViewModels.UserControls.CanvasPreview;
-
-namespace ClipboardCanvas.Helpers
-{
- public static class SuggestedActionsHelpers
- {
- public static IEnumerable GetActionsForInvalidReference(ICanvasPreviewModel pasteCanvasModel)
- {
- List actions = new List();
-
- var action_deleteReference = new SuggestedActionsControlItemViewModel(
- new AsyncRelayCommand(async () =>
- {
- await pasteCanvasModel.TryDeleteData(true);
- }), "DeleteReference".GetLocalized2(), "\uE738");
-
- actions.Add(action_deleteReference);
-
- return actions;
- }
-
- public static IEnumerable GetActionsForEmptyCanvasPage(ICanvasPreviewModel pasteCanvasControlModel)
- {
- List actions = new List();
-
- var action_paste = new SuggestedActionsControlItemViewModel(
- new AsyncRelayCommand(async () =>
- {
- BaseReadOnlyCanvasPreviewControlViewModel.CanvasPasteCancellationTokenSource.Cancel();
- BaseReadOnlyCanvasPreviewControlViewModel.CanvasPasteCancellationTokenSource = new CancellationTokenSource();
-
- SafeWrapper dataPackage = ClipboardHelpers.GetClipboardData();
-
- await pasteCanvasControlModel.TryPasteData(dataPackage, BaseReadOnlyCanvasPreviewControlViewModel.CanvasPasteCancellationTokenSource.Token);
- }), "PasteFromClipboard".GetLocalized2(), "\uE77F");
-
- actions.Add(action_paste);
-
- return actions;
- }
-
- public static IEnumerable GetActionsForHomepage()
- {
- List actions = new List();
-
- var action_addCollection = new SuggestedActionsControlItemViewModel(
- new AsyncRelayCommand(async () =>
- {
- await CollectionsWidgetViewModel.AddCollectionViaUi();
- }), "AddCollection".GetLocalized2(), "\uE710");
-
- actions.Add(action_addCollection);
-
- return actions;
- }
-
- public static IEnumerable GetActionsForCollectionPreviewPage()
- {
- List actions = new List();
-
- return actions;
- }
- }
-}
diff --git a/ClipboardCanvas/Helpers/AnimationHelpers.cs b/ClipboardCanvas/Helpers/AnimationHelpers.cs
deleted file mode 100644
index f8749eef..00000000
--- a/ClipboardCanvas/Helpers/AnimationHelpers.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using Microsoft.UI.Xaml.Media.Animation;
-using ClipboardCanvas.Enums;
-
-namespace ClipboardCanvas.Helpers
-{
- public static class AnimationHelpers
- {
- public static NavigationTransitionInfo ToNavigationTransition(this NavigationTransitionType transitionType)
- {
- switch (transitionType)
- {
- default:
- case NavigationTransitionType.Suppress:
- return new SuppressNavigationTransitionInfo();
-
- case NavigationTransitionType.DrillInTransition:
- return new DrillInNavigationTransitionInfo();
-
- case NavigationTransitionType.EntranceTransition:
- return new EntranceNavigationTransitionInfo();
- }
- }
- }
-}
diff --git a/ClipboardCanvas/Helpers/ApplicationHelpers.cs b/ClipboardCanvas/Helpers/ApplicationHelpers.cs
deleted file mode 100644
index 276213df..00000000
--- a/ClipboardCanvas/Helpers/ApplicationHelpers.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Threading.Tasks;
-using Windows.ApplicationModel;
-using Windows.Foundation;
-using Windows.Services.Store;
-using Windows.Storage;
-using Windows.Storage.Streams;
-using Windows.System;
-using Microsoft.UI.Xaml.Media.Imaging;
-using ClipboardCanvas.Extensions;
-
-namespace ClipboardCanvas.Helpers
-{
- public static class ApplicationHelpers
- {
- [Obsolete]
- public static async Task<(BitmapImage icon, string appName)> GetIconFromFileHandlingApp(StorageFile file, string fileExtension)
- {
- IReadOnlyList apps = await Launcher.FindFileHandlersAsync(fileExtension);
-
- AppInfo app = apps.FirstOrDefault();
-
- if (app == null)
- {
- return (null, null);
- }
-
- RandomAccessStreamReference stream = app.DisplayInfo.GetLogo(new Size(256, 256));
-
- BitmapImage bitmap = await ImagingHelpers.ToBitmapAsync(await stream.OpenReadAsync());
-
- return (bitmap, app.DisplayInfo.DisplayName);
- }
-
- public static async Task IsStoreUpdateAvailable()
- {
- try
- {
- IReadOnlyList updates = await StoreContext.GetDefault().GetAppAndOptionalStorePackageUpdatesAsync();
-
- return !updates.IsEmpty();
- }
- catch
- {
- return false;
- }
- }
- }
-}
diff --git a/ClipboardCanvas/Helpers/CanvasHelpers.cs b/ClipboardCanvas/Helpers/CanvasHelpers.cs
deleted file mode 100644
index cd38814e..00000000
--- a/ClipboardCanvas/Helpers/CanvasHelpers.cs
+++ /dev/null
@@ -1,156 +0,0 @@
-using System;
-using System.IO;
-using System.Threading.Tasks;
-using Windows.Storage;
-using CommunityToolkit.Mvvm.DependencyInjection;
-
-using ClipboardCanvas.Enums;
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using ClipboardCanvas.ViewModels.Dialogs;
-using ClipboardCanvas.Services;
-using ClipboardCanvas.CanavsPasteModels;
-using ClipboardCanvas.DataModels.ContentDataModels;
-using ClipboardCanvas.CanvasFileReceivers;
-using ClipboardCanvas.DataModels;
-using ClipboardCanvas.Helpers.Filesystem;
-using ClipboardCanvas.Contexts.Operations;
-using ClipboardCanvas.ViewModels.UserControls.CanvasDisplay;
-using ClipboardCanvas.ViewModels.Widgets.Timeline;
-
-namespace ClipboardCanvas.Helpers
-{
- public static class CanvasHelpers
- {
- public static async Task DeleteCanvasFile(ICanvasItemReceiverModel canvasItemReceiverModel, CanvasItem canvasItem, bool hideConfirmation = false)
- {
- if (canvasItemReceiverModel == null || canvasItem == null)
- {
- return new SafeWrapperResult(OperationErrorCode.InvalidArgument, new NullReferenceException(), $"{nameof(canvasItemReceiverModel)} or/and {nameof(canvasItem)} were null.");
- }
-
- IUserSettingsService userSettingsService = Ioc.Default.GetService();
-
- bool deletePermanently = userSettingsService.DeletePermanentlyAsDefault;
- if (userSettingsService.ShowDeleteConfirmationDialog && !hideConfirmation)
- {
- IDialogService dialogService = Ioc.Default.GetService();
-
- DeleteConfirmationDialogViewModel deleteConfirmationDialogViewModel = new DeleteConfirmationDialogViewModel(Path.GetFileName(canvasItem.AssociatedItem.Path), deletePermanently);
- DialogResult dialogOption = await dialogService.ShowDialog(deleteConfirmationDialogViewModel);
-
- if (dialogOption != DialogResult.Primary)
- {
- return SafeWrapperResult.CANCEL;
- }
-
- deletePermanently = deleteConfirmationDialogViewModel.PermanentlyDelete;
- }
- else if (hideConfirmation)
- {
- deletePermanently = true;
- }
-
- // Also remove it from Timeline
- ITimelineService timelineService = Ioc.Default.GetService();
- (TimelineSectionViewModel section, TimelineSectionItemViewModel sectionItem) = timelineService.FindTimelineSectionItem(canvasItem);
- if (section != null && sectionItem != null)
- {
- timelineService.RemoveItemFromSection(section, sectionItem);
- }
-
- // Delete!
- return await canvasItemReceiverModel.DeleteItem(canvasItem.AssociatedItem, deletePermanently);
- }
-
- public static CanvasType GetDefaultCanvasType()
- {
- IUserSettingsService userSettings = Ioc.Default.GetService();
-
- if (userSettings.UseInfiniteCanvasAsDefault)
- {
- return CanvasType.InfiniteCanvas;
- }
- else
- {
- return CanvasType.OneCanvas;
- }
- }
-
- public static IPasteModel GetPasteModelFromContentType(this BaseContentTypeModel contentType, ICanvasItemReceiverModel canvasItemReceiverModel, IOperationContextReceiver operationContextReceiver)
- {
- switch (contentType)
- {
- case ImageContentType:
- return new ImagePasteModel(canvasItemReceiverModel, operationContextReceiver);
-
- case TextContentType:
- return new TextPasteModel(canvasItemReceiverModel, operationContextReceiver);
-
- case MediaContentType:
- return new MediaPasteModel(canvasItemReceiverModel, operationContextReceiver);
-
- case MarkdownContentType:
- return new MarkdownPasteModel(canvasItemReceiverModel, operationContextReceiver);
-
- case WebViewContentType webViewContentType:
- return new WebViewPasteModel(webViewContentType.mode, canvasItemReceiverModel, operationContextReceiver);
-
- case UrlPreviewContentType:
- return new UrlPasteModel(canvasItemReceiverModel, operationContextReceiver);
-
- default:
- case FallbackContentType:
- return new FallbackPasteModel(canvasItemReceiverModel, operationContextReceiver);
- }
- }
-
- public static async Task> PasteOverrideReference(CanvasItem canvasItem, ICanvasItemReceiverModel canvasItemReceiverModel, IOperationContextReceiver operationContextReceiver)
- {
- if (await canvasItem.SourceItem == null)
- {
- return (null, BaseReadOnlyCanvasViewModel.ReferencedFileNotFoundResult);
- }
-
- IStorageItem savedSourceItem = await canvasItem.SourceItem;
-
- // Create new empty file
- string fileName = (await canvasItem.SourceItem).Name;
- SafeWrapper newCanvasItemResult = await canvasItemReceiverModel.CreateNewCanvasItem(fileName);
- if (!newCanvasItemResult)
- {
- return newCanvasItemResult;
- }
-
- CanvasItem newCanvasItem = newCanvasItemResult.Result;
-
- // Copy item
- SafeWrapperResult copyResult = await FilesystemOperations.CopyFileAsync(savedSourceItem as StorageFile, newCanvasItem.AssociatedItem as StorageFile, operationContextReceiver.GetOperationContext("Overriding Reference", StatusCenterOperationType.OverrideReference));
- if (!copyResult)
- {
- // Failed
- return (canvasItem, copyResult);
- }
-
- // Delete reference file
- SafeWrapperResult deletionResult = await canvasItemReceiverModel.DeleteItem(canvasItem.AssociatedItem, true);
- if (!deletionResult)
- {
- return (canvasItem, deletionResult);
- }
-
- return (newCanvasItem, SafeWrapperResult.SUCCESS);
- }
-
- public static async Task SafeGetCanvasItemPath(CanvasItem canvasItem)
- {
- if (canvasItem == null || canvasItem.SourceItem == null)
- {
- return "Invalid file";
- }
-
- IStorageItem sourceItem = await canvasItem.SourceItem;
-
- return sourceItem != null ? sourceItem.Path : (canvasItem.AssociatedItem != null ? canvasItem.AssociatedItem.Path : "Invalid file");
- }
- }
-}
diff --git a/ClipboardCanvas/Helpers/ClipboardHelpers.cs b/ClipboardCanvas/Helpers/ClipboardHelpers.cs
deleted file mode 100644
index 7c26c474..00000000
--- a/ClipboardCanvas/Helpers/ClipboardHelpers.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using Windows.ApplicationModel.DataTransfer;
-
-using ClipboardCanvas.Helpers.SafetyHelpers;
-using System.Threading.Tasks;
-using System;
-using System.Collections.Generic;
-using Windows.Storage;
-using Windows.Storage.Streams;
-using System.Linq;
-
-namespace ClipboardCanvas.Helpers
-{
- public static class ClipboardHelpers
- {
- private static readonly object clipboardLock = new object();
-
- public static void CopyDataPackage(DataPackage data)
- {
- if (data != null)
- {
- lock (clipboardLock)
- {
- data.RequestedOperation = DataPackageOperation.Copy;
- Clipboard.SetContent(data);
- Clipboard.Flush();
- }
- }
- }
-
- public static SafeWrapper GetClipboardData()
- {
- return SafeWrapperRoutines.SafeWrap(Clipboard.GetContent);
- }
-
- public static async Task> SafeGetTextAsync(this DataPackageView dataPackage)
- {
- // TODO: Add dataPackage.RequestAccessAsync()
- return await SafeWrapperRoutines.SafeWrapAsync(() => dataPackage.GetTextAsync().AsTask());
- }
-
- public static async Task>> SafeGetStorageItemsAsync(this DataPackageView dataPackage)
- {
- return await SafeWrapperRoutines.SafeWrapAsync(() => dataPackage.GetStorageItemsAsync().AsTask());
- }
-
- public static async Task> SafeGetBitmapAsync(this DataPackageView dataPackage)
- {
- return await SafeWrapperRoutines.SafeWrapAsync(() => dataPackage.GetBitmapAsync().AsTask());
- }
-
- public static async Task> SafeGetUriAsync(this DataPackageView dataPackage)
- {
- return await SafeWrapperRoutines.SafeWrapAsync(() => dataPackage.GetUriAsync().AsTask());
- }
- }
-}
diff --git a/ClipboardCanvas/Helpers/DebugHelpers.cs b/ClipboardCanvas/Helpers/DebugHelpers.cs
deleted file mode 100644
index ec263de6..00000000
--- a/ClipboardCanvas/Helpers/DebugHelpers.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace ClipboardCanvas.Helpers
-{
- public static class DebugHelpers
- {
- public static void PrintEnumerable(this IEnumerable enumerable)
- {
-#if !DEBUG
- return;
-#endif
-
- foreach (var item in enumerable)
- {
- Debug.WriteLine(item);
- }
- }
- }
-}
diff --git a/ClipboardCanvas/Helpers/DialogHelpers.cs b/ClipboardCanvas/Helpers/DialogHelpers.cs
deleted file mode 100644
index 1c8e6694..00000000
--- a/ClipboardCanvas/Helpers/DialogHelpers.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using Microsoft.UI.Xaml.Controls;
-using Microsoft.UI.Xaml.Media;
-using Microsoft.UI.Xaml;
-using System.Linq;
-
-using ClipboardCanvas.Enums;
-using System.Collections.Generic;
-using Microsoft.UI.Xaml.Controls.Primitives;
-
-namespace ClipboardCanvas.Helpers
-{
- public static class DialogHelpers
- {
- public static DialogResult ToDialogResult(this ContentDialogResult contentDialogResult)
- {
- switch (contentDialogResult)
- {
- case ContentDialogResult.Primary:
- return DialogResult.Primary;
-
- case ContentDialogResult.Secondary:
- return DialogResult.Secondary;
-
- default:
- case ContentDialogResult.None:
- return DialogResult.Cancel;
- }
- }
-
- public static bool IsAnyContentDialogOpen()
- {
- var openedDialogs = VisualTreeHelper.GetOpenPopups(MainWindow.Instance);
- return openedDialogs.Any((item) => item.Child is ContentDialog);
- }
-
- public static void CloseCurrentDialog()
- {
- var openedDialogs = VisualTreeHelper.GetOpenPopups(MainWindow.Instance);
-
- foreach (var item in openedDialogs)
- {
- if (item.Child is ContentDialog dialog)
- {
- dialog.Hide();
- }
- }
- }
- }
-}
diff --git a/ClipboardCanvas/Helpers/DoubleClickWrapper.cs b/ClipboardCanvas/Helpers/DoubleClickWrapper.cs
deleted file mode 100644
index 033d8b6d..00000000
--- a/ClipboardCanvas/Helpers/DoubleClickWrapper.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using System;
-using Microsoft.UI.Xaml;
-
-namespace ClipboardCanvas.Helpers
-{
- ///