From 280086663c23533814167d721b4db91072a958de Mon Sep 17 00:00:00 2001 From: Zoltan Hricz Date: Fri, 20 Mar 2026 14:43:14 +0100 Subject: [PATCH 1/4] feat(embedded-assistant): add a C# example using WPF --- embedded-assistant/c#-wpf/.env.example | 5 + embedded-assistant/c#-wpf/.gitignore | 10 + embedded-assistant/c#-wpf/App.xaml | 9 + embedded-assistant/c#-wpf/App.xaml.cs | 14 + embedded-assistant/c#-wpf/AssemblyInfo.cs | 10 + .../c#-wpf/CortiAssistantApp.csproj | 23 + .../c#-wpf/CortiAssistantApp.slnx | 3 + embedded-assistant/c#-wpf/MainWindow.xaml | 22 + embedded-assistant/c#-wpf/MainWindow.xaml.cs | 180 ++++ embedded-assistant/c#-wpf/README.md | 72 ++ .../c#-wpf/Services/CortiAuthService.cs | 84 ++ .../c#-wpf/Services/CortiSettings.cs | 104 ++ embedded-assistant/c#-wpf/WebAssets/README.md | 12 + .../c#-wpf/WebAssets/index.html | 34 + .../c#-wpf/WebAssets/package-lock.json | 959 ++++++++++++++++++ .../c#-wpf/WebAssets/package.json | 17 + .../c#-wpf/WebAssets/src/main.ts | 104 ++ .../c#-wpf/WebAssets/tsconfig.json | 18 + .../c#-wpf/WebAssets/vite.config.js | 10 + 19 files changed, 1690 insertions(+) create mode 100644 embedded-assistant/c#-wpf/.env.example create mode 100644 embedded-assistant/c#-wpf/.gitignore create mode 100644 embedded-assistant/c#-wpf/App.xaml create mode 100644 embedded-assistant/c#-wpf/App.xaml.cs create mode 100644 embedded-assistant/c#-wpf/AssemblyInfo.cs create mode 100644 embedded-assistant/c#-wpf/CortiAssistantApp.csproj create mode 100644 embedded-assistant/c#-wpf/CortiAssistantApp.slnx create mode 100644 embedded-assistant/c#-wpf/MainWindow.xaml create mode 100644 embedded-assistant/c#-wpf/MainWindow.xaml.cs create mode 100644 embedded-assistant/c#-wpf/README.md create mode 100644 embedded-assistant/c#-wpf/Services/CortiAuthService.cs create mode 100644 embedded-assistant/c#-wpf/Services/CortiSettings.cs create mode 100644 embedded-assistant/c#-wpf/WebAssets/README.md create mode 100644 embedded-assistant/c#-wpf/WebAssets/index.html create mode 100644 embedded-assistant/c#-wpf/WebAssets/package-lock.json create mode 100644 embedded-assistant/c#-wpf/WebAssets/package.json create mode 100644 embedded-assistant/c#-wpf/WebAssets/src/main.ts create mode 100644 embedded-assistant/c#-wpf/WebAssets/tsconfig.json create mode 100644 embedded-assistant/c#-wpf/WebAssets/vite.config.js diff --git a/embedded-assistant/c#-wpf/.env.example b/embedded-assistant/c#-wpf/.env.example new file mode 100644 index 0000000..86751c7 --- /dev/null +++ b/embedded-assistant/c#-wpf/.env.example @@ -0,0 +1,5 @@ +CORTI_ENVIRONMENT=eu +CORTI_TENANT_NAME=your-tenant +CORTI_CLIENT_ID=assistant +CORTI_USER_EMAIL=user@example.com +CORTI_USER_PASSWORD=replace-me diff --git a/embedded-assistant/c#-wpf/.gitignore b/embedded-assistant/c#-wpf/.gitignore new file mode 100644 index 0000000..184d576 --- /dev/null +++ b/embedded-assistant/c#-wpf/.gitignore @@ -0,0 +1,10 @@ +.env +.dotnet/ +bin/ +obj/ +artifacts/ +.vs/ +*.user +*.csproj.user +WebAssets/dist/ +WebAssets/node_modules/ diff --git a/embedded-assistant/c#-wpf/App.xaml b/embedded-assistant/c#-wpf/App.xaml new file mode 100644 index 0000000..a9c5057 --- /dev/null +++ b/embedded-assistant/c#-wpf/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/embedded-assistant/c#-wpf/App.xaml.cs b/embedded-assistant/c#-wpf/App.xaml.cs new file mode 100644 index 0000000..03e005a --- /dev/null +++ b/embedded-assistant/c#-wpf/App.xaml.cs @@ -0,0 +1,14 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace CortiAssistantApp +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } + +} diff --git a/embedded-assistant/c#-wpf/AssemblyInfo.cs b/embedded-assistant/c#-wpf/AssemblyInfo.cs new file mode 100644 index 0000000..b0ec827 --- /dev/null +++ b/embedded-assistant/c#-wpf/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/embedded-assistant/c#-wpf/CortiAssistantApp.csproj b/embedded-assistant/c#-wpf/CortiAssistantApp.csproj new file mode 100644 index 0000000..6c2b8c0 --- /dev/null +++ b/embedded-assistant/c#-wpf/CortiAssistantApp.csproj @@ -0,0 +1,23 @@ + + + + WinExe + net10.0-windows + enable + enable + true + + + + + + + + + + + + + + + diff --git a/embedded-assistant/c#-wpf/CortiAssistantApp.slnx b/embedded-assistant/c#-wpf/CortiAssistantApp.slnx new file mode 100644 index 0000000..8429147 --- /dev/null +++ b/embedded-assistant/c#-wpf/CortiAssistantApp.slnx @@ -0,0 +1,3 @@ + + + diff --git a/embedded-assistant/c#-wpf/MainWindow.xaml b/embedded-assistant/c#-wpf/MainWindow.xaml new file mode 100644 index 0000000..d56026c --- /dev/null +++ b/embedded-assistant/c#-wpf/MainWindow.xaml @@ -0,0 +1,22 @@ + + + + + + + +