-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
394 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using System.Globalization; | ||
using SBMM = Sucrose.Backgroundog.Manage.Manager; | ||
using SGCB = Sucrose.Grpc.Common.Backgroundog; | ||
using SGSGSS = Sucrose.Grpc.Services.GeneralServerService; | ||
using SHC = Skylark.Helper.Culture; | ||
using SMC = Sucrose.Memory.Constant; | ||
using SMMI = Sucrose.Manager.Manage.Internal; | ||
using SMMM = Sucrose.Manager.Manage.Manager; | ||
using SMR = Sucrose.Memory.Readonly; | ||
using SSSHP = Sucrose.Shared.Space.Helper.Processor; | ||
using SSSSBSS = Sucrose.Shared.Server.Services.BackgroundogServerService; | ||
using SSWW = Sucrose.Shared.Watchdog.Watch; | ||
|
||
namespace Sucrose.Backgroundog | ||
{ | ||
internal class App | ||
{ | ||
internal static void Main() | ||
{ | ||
try | ||
{ | ||
SHC.All = new CultureInfo(SMMM.Culture, true); | ||
|
||
if (SBMM.Mutex.WaitOne(TimeSpan.Zero, true) && SSSHP.WorkCount(SMR.Backgroundog) <= 1) | ||
{ | ||
Console.WriteLine("Start"); | ||
|
||
SGSGSS.ServerCreate(SGCB.BindService(new SSSSBSS())); | ||
|
||
SMMI.BackgroundogSettingManager.SetSetting(SMC.Host, SGSGSS.Host); | ||
SMMI.BackgroundogSettingManager.SetSetting(SMC.Port, SGSGSS.Port); | ||
|
||
SGSGSS.ServerInstance.Start(); | ||
|
||
Console.ReadKey(); | ||
|
||
SGSGSS.ServerInstance.KillAsync().Wait(); | ||
//SGSGSS.ServerInstance.ShutdownAsync().Wait(); | ||
|
||
Console.WriteLine("Stop"); | ||
} | ||
} | ||
catch (Exception Exception) | ||
{ | ||
SSWW.Watch_CatchException(Exception); | ||
} | ||
finally | ||
{ | ||
Close(); | ||
} | ||
} | ||
|
||
protected static void Close() | ||
{ | ||
Environment.Exit(0); | ||
Application.Exit(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/> | ||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> | ||
<security> | ||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> | ||
<!-- UAC Bildirim Seçenekleri | ||
Windows Kullanıcı Hesabı Denetimi düzeyini değiştirmek istiyorsanız | ||
requestedExecutionLevel düğümünü aşağıdakilerden biriyle değiştirin. | ||
<requestedExecutionLevel level="asInvoker" uiAccess="false" /> | ||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> | ||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" /> | ||
requestedExecutionLevel öğesini belirtmek, dosya ve kayıt defteri sanallaştırmasını devre dışı bırakır. | ||
Uygulamanız geriye doğru uyumluluk için bu sanallaştırmayı gerektiriyorsa, bu öğeyi | ||
kaldırın. | ||
--> | ||
<requestedExecutionLevel level="asInvoker" uiAccess="false" /> | ||
</requestedPrivileges> | ||
</security> | ||
</trustInfo> | ||
|
||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> | ||
<application> | ||
<!-- Bu uygulamanın test edildiği ve birlikte çalışmak için tasarlandığı | ||
Windows sürümlerinin bir listesi. Uygun öğelerin açıklamasını kaldırdığınızda Windows | ||
en uyumlu ortamı otomatik olarak seçer. --> | ||
|
||
<!-- Windows Vista --> | ||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />--> | ||
|
||
<!-- Windows 7 --> | ||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />--> | ||
|
||
<!-- Windows 8 --> | ||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />--> | ||
|
||
<!-- Windows 8.1 --> | ||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />--> | ||
|
||
<!-- Windows 10 --> | ||
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />--> | ||
|
||
</application> | ||
</compatibility> | ||
|
||
<!-- Uygulamanın DPI kullanan uygulama olduğunu ve yüksek DPI'larda Windows tarafından otomatik olarak ölçeklendirilmeyeceğini | ||
belirtir. Windows Presentation Foundation (WPF) uygulamaları otomatik olarak DPI kullanan uygulamalardır ve bunun kabul edilmesi | ||
gerekmez. Bu ayarın kabul edildiği ve .NET Framework 4.6'yı hedefleyen Windows Forms uygulamalarında da | ||
app.config'de 'EnableWindowsFormsHighDpiAutoResizing' ayarının 'true' olarak belirlenmesi gerekir. | ||
Uygulamayı uzun yol kullanan uygulama haline getirir. Bkz. https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation --> | ||
|
||
<application xmlns="urn:schemas-microsoft-com:asm.v3"> | ||
<windowsSettings> | ||
<!--<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">false</dpiAware>--> | ||
|
||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware> | ||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness> | ||
</windowsSettings> | ||
</application> | ||
|
||
|
||
<!-- Windows genel denetimler ve iletişim kutuları için temaları etkinleştir (Windows XP ve sonrası) --> | ||
<!-- | ||
<dependency> | ||
<dependentAssembly> | ||
<assemblyIdentity | ||
type="win32" | ||
name="Microsoft.Windows.Common-Controls" | ||
version="6.0.0.0" | ||
processorArchitecture="*" | ||
publicKeyToken="6595b64144ccf1df" | ||
language="*" | ||
/> | ||
</dependentAssembly> | ||
</dependency> | ||
--> | ||
|
||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /> | ||
</startup> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1" /> | ||
</startup> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
</configuration> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Sucrose.Backgroundog.Manage | ||
{ | ||
internal static class Internal | ||
{ | ||
public static bool State = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using SMR = Sucrose.Memory.Readonly; | ||
|
||
namespace Sucrose.Backgroundog.Manage | ||
{ | ||
internal static class Manager | ||
{ | ||
public static Mutex Mutex => new(true, SMR.BackgroundogMutex); | ||
} | ||
} |
101 changes: 101 additions & 0 deletions
101
src/Project/Sucrose.Backgroundog/Sucrose.Backgroundog.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFrameworks>net48;net481;net6.0-windows;net7.0-windows;net8.0-windows</TargetFrameworks> | ||
<ApplicationIcon>Assets\ICO.ico</ApplicationIcon> | ||
<StartupObject>Sucrose.Backgroundog.App</StartupObject> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>disable</Nullable> | ||
<Company>Taiizor</Company> | ||
<Title>Sucrose Wallpaper Engine</Title> | ||
<Description>$(Title)</Description> | ||
<Product>$(Title)</Product> | ||
<InformationalVersion>$(Version)</InformationalVersion> | ||
<AssemblyVersion>$(Version)</AssemblyVersion> | ||
<FileVersion>$(Version)</FileVersion> | ||
<Version>$([System.DateTime]::Today.ToString(yy)).$([System.DateTime]::Today.ToString(MM)).$([System.DateTime]::Today.ToString(dd))</Version> | ||
<AssemblyName>Sucrose.Backgroundog</AssemblyName> | ||
<RootNamespace>$(AssemblyName)</RootNamespace> | ||
<UseWindowsForms>true</UseWindowsForms> | ||
<UseWPF>true</UseWPF> | ||
<AnalysisLevel>preview</AnalysisLevel> | ||
<LangVersion>preview</LangVersion> | ||
<Platforms>AnyCPU;ARM64;x64;x86</Platforms> | ||
<DefineConstants>$(DefineConstants);BACKGROUNDOG</DefineConstants> | ||
<Copyright>Copyright © $([System.DateTime]::Today.ToString(yyyy)) $(Company)</Copyright> | ||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild> | ||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> | ||
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath> | ||
<GenerateDocumentationFile>false</GenerateDocumentationFile> | ||
<ApplicationManifest>App.manifest</ApplicationManifest> | ||
<OutputPath>..\..\Sucrose\Backgroundog\$(Platform)</OutputPath> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection> | ||
<ServerGarbageCollection>true</ServerGarbageCollection> | ||
<RetainVMGarbageCollection>true</RetainVMGarbageCollection> | ||
<ThreadPoolMinThreads>1</ThreadPoolMinThreads> | ||
<ThreadPoolMaxThreads>100</ThreadPoolMaxThreads> | ||
<!-- Supported as of .NET Core SDK 3.0 Preview 1 --> | ||
<TieredCompilation>true</TieredCompilation> | ||
<InvariantGlobalization>false</InvariantGlobalization> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(PlatformTarget)' == 'x86'"> | ||
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">win-x86</RuntimeIdentifier> | ||
<SelfContained Condition="'$(SelfContained)' == ''">false</SelfContained> | ||
<DefineConstants>$(DefineConstants);X86</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(PlatformTarget)' == 'x64'"> | ||
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">win-x64</RuntimeIdentifier> | ||
<SelfContained Condition="'$(SelfContained)' == ''">false</SelfContained> | ||
<DefineConstants>$(DefineConstants);X64</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(PlatformTarget)' == 'arm64'"> | ||
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">win-arm64</RuntimeIdentifier> | ||
<SelfContained Condition="'$(SelfContained)' == ''">false</SelfContained> | ||
<DefineConstants>$(DefineConstants);ARM64</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<AppConfigWithTargetPath Include="App.$(TargetFramework).config"> | ||
<TargetPath>$(AssemblyName).exe.config</TargetPath> | ||
</AppConfigWithTargetPath> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Skylark.Wing" Version="3.1.1.3" /> | ||
<PackageReference Include="LibreHardwareMonitorLib" Version="0.9.3-pre256" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\gRPC\Sucrose.Grpc\Sucrose.Grpc.csproj" /> | ||
<ProjectReference Include="..\..\Library\Sucrose.Manager\Sucrose.Manager.csproj" /> | ||
</ItemGroup> | ||
|
||
<Import Project="..\..\Shared\Sucrose.Shared.Space\Sucrose.Shared.Space.projitems" Label="Shared" /> | ||
<Import Project="..\..\Shared\Sucrose.Shared.Server\Sucrose.Shared.Server.projitems" Label="Shared" /> | ||
<Import Project="..\..\Shared\Sucrose.Shared.Watchdog\Sucrose.Shared.Watchdog.projitems" Label="Shared" /> | ||
<Import Project="..\..\Shared\Sucrose.Shared.Dependency\Sucrose.Shared.Dependency.projitems" Label="Shared" /> | ||
|
||
<ItemGroup> | ||
<Folder Include="Properties\" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<SourceDirectory>$(OutputPath)\$(TargetFramework)\win-$(Platform)</SourceDirectory> | ||
<DestinationDirectory>..\..\Sucrose\Package\$(TargetFramework)\$(Platform)\$(AssemblyName)\</DestinationDirectory> | ||
</PropertyGroup> | ||
|
||
<Target Name="CopyFiles" BeforeTargets="Build"> | ||
<ItemGroup> | ||
<FilesToCopy Include="$(SourceDirectory)\**\*.*" /> | ||
</ItemGroup> | ||
<Copy SourceFiles="@(FilesToCopy)" DestinationFiles="@(FilesToCopy->'$(DestinationDirectory)%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" /> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.