From a942e8a3bbd969b8c7459fcec169d11776867905 Mon Sep 17 00:00:00 2001 From: AUnicornWithNoLife <55228370+AUnicornWithNoLife@users.noreply.github.com> Date: Mon, 13 Feb 2023 10:10:38 +0000 Subject: [PATCH] do hat --- Cupola/Cupola.cs | 3 ++- Tranquility/MainWindow.xaml.cs | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Cupola/Cupola.cs b/Cupola/Cupola.cs index 147813a..28d3be7 100644 --- a/Cupola/Cupola.cs +++ b/Cupola/Cupola.cs @@ -2,7 +2,8 @@ namespace Cupola { - internal partial class Program + public partial class Cupola + { public static void RunSingle(string imgDir, string outDir) { diff --git a/Tranquility/MainWindow.xaml.cs b/Tranquility/MainWindow.xaml.cs index 8ee4f34..19ef420 100644 --- a/Tranquility/MainWindow.xaml.cs +++ b/Tranquility/MainWindow.xaml.cs @@ -4,6 +4,7 @@ using WinRT; using Cupola; using System.IO; using System; +using ComputeSharp; namespace Tranquility { @@ -13,7 +14,8 @@ namespace Tranquility public partial class MainWindow : Window { string[]? files; - + ReadWriteTexture2D? finalImage; + public MainWindow() { InitializeComponent(); @@ -50,7 +52,12 @@ namespace Tranquility private void Run(object sender, RoutedEventArgs e) { + if (files == null) + throw new Exception("Please select files before running"); + ReadWriteTexture2D[] images = Cupola.Cupola.Load(files); + + finalImage = Cupola.Cupola.RunSingle(images); } } }