diff --git a/Wino.Mail.sln b/Wino.Mail.sln
index c631f1cf..ada84a49 100644
--- a/Wino.Mail.sln
+++ b/Wino.Mail.sln
@@ -19,6 +19,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Mail", "Wino.Mail\Wino
EndProject
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "Wino.Packaging", "Wino.Packaging\Wino.Packaging.wapproj", "{FD8CEA2F-7741-426A-934F-4A20465A79F6}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Server", "Wino.Server\Wino.Server.csproj", "{C4D62168-8A08-425B-A650-536F6FFF1FE5}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -183,6 +185,36 @@ Global
{FD8CEA2F-7741-426A-934F-4A20465A79F6}.Release|x86.ActiveCfg = Release|x86
{FD8CEA2F-7741-426A-934F-4A20465A79F6}.Release|x86.Build.0 = Release|x86
{FD8CEA2F-7741-426A-934F-4A20465A79F6}.Release|x86.Deploy.0 = Release|x86
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|Any CPU.ActiveCfg = Debug|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|Any CPU.Build.0 = Debug|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|Any CPU.Deploy.0 = Debug|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|ARM.ActiveCfg = Debug|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|ARM.Build.0 = Debug|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|ARM.Deploy.0 = Debug|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|ARM64.Build.0 = Debug|ARM64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|x64.ActiveCfg = Debug|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|x64.Build.0 = Debug|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|x64.Deploy.0 = Debug|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|x86.ActiveCfg = Debug|x86
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|x86.Build.0 = Debug|x86
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|x86.Deploy.0 = Debug|x86
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|Any CPU.ActiveCfg = Release|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|Any CPU.Build.0 = Release|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|Any CPU.Deploy.0 = Release|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|ARM.ActiveCfg = Release|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|ARM.Build.0 = Release|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|ARM.Deploy.0 = Release|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|ARM64.ActiveCfg = Release|ARM64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|ARM64.Build.0 = Release|ARM64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|ARM64.Deploy.0 = Release|ARM64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|x64.ActiveCfg = Release|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|x64.Build.0 = Release|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|x64.Deploy.0 = Release|x64
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|x86.ActiveCfg = Release|x86
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|x86.Build.0 = Release|x86
+ {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Wino.Server.NET8/Wino.Server.NET8.csproj b/Wino.Server.NET8/Wino.Server.NET8.csproj
deleted file mode 100644
index 7a31aadc..00000000
--- a/Wino.Server.NET8/Wino.Server.NET8.csproj
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
- WinExe
- net8.0-windows10.0.19041.0
- 10.0.17763.0
- Wino.Server
- app.manifest
- x86;x64;ARM64
- true
- win-x86;win-x64;win-arm64
- win10-x86;win10-x64;win10-arm64
- win-$(Platform).pubxml
- true
- true
- false
-
-
-
-
- DISABLE_XAML_GENERATED_MAIN
-
-
- DISABLE_XAML_GENERATED_MAIN
-
-
- DISABLE_XAML_GENERATED_MAIN
-
-
- DISABLE_XAML_GENERATED_MAIN
-
-
- DISABLE_XAML_GENERATED_MAIN
-
-
- DISABLE_XAML_GENERATED_MAIN
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Always
-
-
-
-
-
- MSBuild:Compile
-
-
-
-
-
-
-
-
-
- true
-
-
\ No newline at end of file
diff --git a/Wino.Server/App.xaml b/Wino.Server.WPF/App.xaml
similarity index 100%
rename from Wino.Server/App.xaml
rename to Wino.Server.WPF/App.xaml
diff --git a/Wino.Server/App.xaml.cs b/Wino.Server.WPF/App.xaml.cs
similarity index 100%
rename from Wino.Server/App.xaml.cs
rename to Wino.Server.WPF/App.xaml.cs
diff --git a/Wino.Server.NET8/Assets/Wino_Icon.ico b/Wino.Server.WPF/Images/Wino_Icon.ico
similarity index 100%
rename from Wino.Server.NET8/Assets/Wino_Icon.ico
rename to Wino.Server.WPF/Images/Wino_Icon.ico
diff --git a/Wino.Server.NET8/ServerContext.cs b/Wino.Server.WPF/ServerContext.cs
similarity index 99%
rename from Wino.Server.NET8/ServerContext.cs
rename to Wino.Server.WPF/ServerContext.cs
index 5471c501..168bf7cc 100644
--- a/Wino.Server.NET8/ServerContext.cs
+++ b/Wino.Server.WPF/ServerContext.cs
@@ -17,7 +17,6 @@ using Wino.Core.Synchronizers;
using Wino.Messaging;
using Wino.Messaging.Enums;
using Wino.Messaging.Server;
-using Wino.Server.NET8;
namespace Wino.Server
{
@@ -213,5 +212,10 @@ namespace Wino.Server
}
#endregion
+
+
+
+
+
}
}
diff --git a/Wino.Server.NET8/ServerViewModel.cs b/Wino.Server.WPF/ServerViewModel.cs
similarity index 94%
rename from Wino.Server.NET8/ServerViewModel.cs
rename to Wino.Server.WPF/ServerViewModel.cs
index c6bbacb0..42a2574f 100644
--- a/Wino.Server.NET8/ServerViewModel.cs
+++ b/Wino.Server.WPF/ServerViewModel.cs
@@ -1,4 +1,5 @@
using System.Threading.Tasks;
+using System.Windows;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Wino.Core.Domain.Interfaces;
@@ -28,6 +29,8 @@ namespace Wino.Server
public void ExitApplication()
{
// TODO: App service send message to UWP app to terminate itself.
+
+ Application.Current.Shutdown();
}
public async Task ReconnectAsync() => await Context.InitializeAppServiceConnectionAsync();
diff --git a/Wino.Server/TrayIconResources.xaml b/Wino.Server.WPF/TrayIconResources.xaml
similarity index 100%
rename from Wino.Server/TrayIconResources.xaml
rename to Wino.Server.WPF/TrayIconResources.xaml
diff --git a/Wino.Server/Wino.Server.NET8.csproj b/Wino.Server.WPF/Wino.Server.NET8.csproj
similarity index 100%
rename from Wino.Server/Wino.Server.NET8.csproj
rename to Wino.Server.WPF/Wino.Server.NET8.csproj
diff --git a/Wino.Server.WPF/Wino.Server.csproj b/Wino.Server.WPF/Wino.Server.csproj
new file mode 100644
index 00000000..abc3c4f5
--- /dev/null
+++ b/Wino.Server.WPF/Wino.Server.csproj
@@ -0,0 +1,35 @@
+
+
+ net8.0-windows10.0.22621.0
+ 10.0.19041.0
+ WinExe
+ true
+ true
+ true
+ win-x86;win-x64;win-arm64
+ win10-x86;win10-x64;win10-arm64
+ true
+ 10.0.22621.0
+
+
+ Wino.Server.App
+
+
+
+
+
+
+ Always
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Wino.Server.NET8/Assets/LockScreenLogo.scale-200.png b/Wino.Server/Assets/LockScreenLogo.scale-200.png
similarity index 100%
rename from Wino.Server.NET8/Assets/LockScreenLogo.scale-200.png
rename to Wino.Server/Assets/LockScreenLogo.scale-200.png
diff --git a/Wino.Server.NET8/Assets/SplashScreen.scale-200.png b/Wino.Server/Assets/SplashScreen.scale-200.png
similarity index 100%
rename from Wino.Server.NET8/Assets/SplashScreen.scale-200.png
rename to Wino.Server/Assets/SplashScreen.scale-200.png
diff --git a/Wino.Server.NET8/Assets/Square150x150Logo.scale-200.png b/Wino.Server/Assets/Square150x150Logo.scale-200.png
similarity index 100%
rename from Wino.Server.NET8/Assets/Square150x150Logo.scale-200.png
rename to Wino.Server/Assets/Square150x150Logo.scale-200.png
diff --git a/Wino.Server.NET8/Assets/Square44x44Logo.scale-200.png b/Wino.Server/Assets/Square44x44Logo.scale-200.png
similarity index 100%
rename from Wino.Server.NET8/Assets/Square44x44Logo.scale-200.png
rename to Wino.Server/Assets/Square44x44Logo.scale-200.png
diff --git a/Wino.Server.NET8/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Wino.Server/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
similarity index 100%
rename from Wino.Server.NET8/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
rename to Wino.Server/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
diff --git a/Wino.Server.NET8/Assets/StoreLogo.png b/Wino.Server/Assets/StoreLogo.png
similarity index 100%
rename from Wino.Server.NET8/Assets/StoreLogo.png
rename to Wino.Server/Assets/StoreLogo.png
diff --git a/Wino.Server.NET8/Assets/Wide310x150Logo.scale-200.png b/Wino.Server/Assets/Wide310x150Logo.scale-200.png
similarity index 100%
rename from Wino.Server.NET8/Assets/Wide310x150Logo.scale-200.png
rename to Wino.Server/Assets/Wide310x150Logo.scale-200.png
diff --git a/Wino.Server/Images/Wino_Icon.ico b/Wino.Server/Assets/Wino_Icon.ico
similarity index 100%
rename from Wino.Server/Images/Wino_Icon.ico
rename to Wino.Server/Assets/Wino_Icon.ico
diff --git a/Wino.Server.NET8/Package.appxmanifest b/Wino.Server/Package.appxmanifest
similarity index 100%
rename from Wino.Server.NET8/Package.appxmanifest
rename to Wino.Server/Package.appxmanifest
diff --git a/Wino.Server.NET8/Program.cs b/Wino.Server/Program.cs
similarity index 98%
rename from Wino.Server.NET8/Program.cs
rename to Wino.Server/Program.cs
index f7933cc0..0af86fd2 100644
--- a/Wino.Server.NET8/Program.cs
+++ b/Wino.Server/Program.cs
@@ -24,7 +24,7 @@ namespace Wino.Server
var context = new DispatcherQueueSynchronizationContext(
DispatcherQueue.GetForCurrentThread());
SynchronizationContext.SetSynchronizationContext(context);
- new App();
+ new ServerApp();
});
}
}
diff --git a/Wino.Server.NET8/Properties/launchSettings.json b/Wino.Server/Properties/launchSettings.json
similarity index 100%
rename from Wino.Server.NET8/Properties/launchSettings.json
rename to Wino.Server/Properties/launchSettings.json
diff --git a/Wino.Server.NET8/App.xaml b/Wino.Server/ServerApp.xaml
similarity index 93%
rename from Wino.Server.NET8/App.xaml
rename to Wino.Server/ServerApp.xaml
index 5058d6b7..62f2c276 100644
--- a/Wino.Server.NET8/App.xaml
+++ b/Wino.Server/ServerApp.xaml
@@ -1,6 +1,6 @@
(App)Application.Current;
+ public new static ServerApp Current => (ServerApp)Application.Current;
private const string WinoServerAppName = "Wino.Server";
public TaskbarIcon TrayIcon { get; private set; }
public bool HandleClosedEvents { get; set; } = true;
public IServiceProvider Services { get; private set; }
- public App()
+ public ServerApp()
{
InitializeComponent();
}
diff --git a/Wino.Server/ServerContext.cs b/Wino.Server/ServerContext.cs
index 168bf7cc..d6c19a3e 100644
--- a/Wino.Server/ServerContext.cs
+++ b/Wino.Server/ServerContext.cs
@@ -17,6 +17,7 @@ using Wino.Core.Synchronizers;
using Wino.Messaging;
using Wino.Messaging.Enums;
using Wino.Messaging.Server;
+using Wino.Server.NET8;
namespace Wino.Server
{
@@ -107,13 +108,13 @@ namespace Wino.Server
public async Task TestOutlookSynchronizer()
{
- var accountService = App.Current.Services.GetService();
+ var accountService = ServerApp.Current.Services.GetService();
var accs = await accountService.GetAccountsAsync();
var acc = accs.ElementAt(0);
- var authenticator = App.Current.Services.GetService();
- var processor = App.Current.Services.GetService();
+ var authenticator = ServerApp.Current.Services.GetService();
+ var processor = ServerApp.Current.Services.GetService();
var sync = new OutlookSynchronizer(acc, authenticator, processor);
@@ -212,10 +213,5 @@ namespace Wino.Server
}
#endregion
-
-
-
-
-
}
}
diff --git a/Wino.Server/ServerViewModel.cs b/Wino.Server/ServerViewModel.cs
index 42a2574f..c6bbacb0 100644
--- a/Wino.Server/ServerViewModel.cs
+++ b/Wino.Server/ServerViewModel.cs
@@ -1,5 +1,4 @@
using System.Threading.Tasks;
-using System.Windows;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Wino.Core.Domain.Interfaces;
@@ -29,8 +28,6 @@ namespace Wino.Server
public void ExitApplication()
{
// TODO: App service send message to UWP app to terminate itself.
-
- Application.Current.Shutdown();
}
public async Task ReconnectAsync() => await Context.InitializeAppServiceConnectionAsync();
diff --git a/Wino.Server.NET8/Styles/TrayIconResources.xaml b/Wino.Server/Styles/TrayIconResources.xaml
similarity index 100%
rename from Wino.Server.NET8/Styles/TrayIconResources.xaml
rename to Wino.Server/Styles/TrayIconResources.xaml
diff --git a/Wino.Server.NET8/Styles/TrayIconResources.xaml.cs b/Wino.Server/Styles/TrayIconResources.xaml.cs
similarity index 100%
rename from Wino.Server.NET8/Styles/TrayIconResources.xaml.cs
rename to Wino.Server/Styles/TrayIconResources.xaml.cs
diff --git a/Wino.Server/Wino.Server.csproj b/Wino.Server/Wino.Server.csproj
index abc3c4f5..5cf0c130 100644
--- a/Wino.Server/Wino.Server.csproj
+++ b/Wino.Server/Wino.Server.csproj
@@ -1,35 +1,106 @@
-
- net8.0-windows10.0.22621.0
- 10.0.19041.0
- WinExe
- true
- true
- true
- win-x86;win-x64;win-arm64
- win10-x86;win10-x64;win10-arm64
- true
- 10.0.22621.0
+
+ WinExe
+ net8.0-windows10.0.22621.0
+ 10.0.17763.0
+ Wino.Server
+ app.manifest
+ x86;x64;ARM64
+ true
+ win-x86;win-x64;win-arm64
+ win10-x86;win10-x64;win10-arm64
+ win-$(Platform).pubxml
+ true
+ true
+
+
+
+
+ DISABLE_XAML_GENERATED_MAIN
-
- Wino.Server.App
+
+ DISABLE_XAML_GENERATED_MAIN
-
-
-
-
-
- Always
-
-
-
-
-
-
-
-
-
-
-
-
+
+ DISABLE_XAML_GENERATED_MAIN
+
+
+ DISABLE_XAML_GENERATED_MAIN
+
+
+ DISABLE_XAML_GENERATED_MAIN
+
+
+ DISABLE_XAML_GENERATED_MAIN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
+
+ MSBuild:Compile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
\ No newline at end of file
diff --git a/Wino.Server.NET8/app.manifest b/Wino.Server/app.manifest
similarity index 100%
rename from Wino.Server.NET8/app.manifest
rename to Wino.Server/app.manifest