Giter Site home page Giter Site logo

darkmode's Introduction

本仓库已进入只读模式,点击右侧链接转到DarkMode2仓库,https://github.com/Melon-Studio/DarkMode2

🌙DarkMode

中文简体(zh-CN) | 中文繁體(zh-TW) | English(en-US) | 日本語(ja-JP)

📂介绍

DarkMode是在 Windows11 系统下运行,提供自动切换深色模式的软件,使用 C# 编写。

🧡优势

实时更改——相较于市面上的使用任务计划来实现此功能,我认为该方法是不可取的,如果你开机处于这个时间段内时,任务计划不会去执行此次任务,所以实时就是本软件的一大特点。

体量小占用少——软件使用C# .NET Framework 4.7.2开发,软件仅有不到1MB大小,内存占用只有10MB左右,做到真正的轻量。

开机自启——软件可以设置开机自启,保证每次开机都会正常运行,服务用户,不想使用时可以随时关闭。

多语言支持——软件支持三个国家四种语言,简体中文、繁体中文、日语和英语。

Wallpaper Engine壁纸切换——软件不仅支持切换原生壁纸,还可以切换Wallpaper Engine壁纸,帮助请查阅Wiki。

📀运行环境

操作系统:Windows 11

操作系统位数:x64

必要框架:.NET Framework 4.7.2

如果系统没有框架,请点此安装

下载:点击此处或者右侧Release

🎉贡献

  1. Fork本仓库代码
  2. 本地执行Git命令:
git clone https://github.com/xxxxxxx/DarkMode.git
  1. 使用Visual Studio启动项目
  2. 编写代码
  3. 提交PR

🧷版权与许可

本开源项目遵循国际 MIT 开源协议,具体内容请详细阅读开源许可证

MIT License

Copyright (c) 2022 Melon Studio

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

本项目使用第三方库: Costura.Fody ,作者:geertvanhorrik,simoncropp,开源许可证:MIT

📶趋势

Star History Chart

🌞鸣谢

特别感谢Microsoft为广大开发者提供的免费IDE:Visual Studio

darkmode's People

Contributors

6get-xiaofan avatar boojack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

darkmode's Issues

建议重构至UWP应用

这是一个仅面向Windows 11的系统实用工具类项目,我觉得使用UWP + WinUI 2会大大增强其与Windows的集成度、界面美观度和代码简洁度,毕竟UWP可以有非常方便的本地化实现、程序偏好设置实现,也更加符合Windows 11的设计语言。

一些建议

1“开机自启动”目前只能右键任务栏图标勾选,可不可以把它放在设置里面?
2“语言”选项卡放在最后感觉会好看一点
3建议单击任务栏里的图标就能打开设置页面,不需要右键打开

22H2 直接修改SystemUseLightTheme后任务栏颜色异常

系统版本
版本 Windows 11 家庭中文版
版本 22H2
安装日期 ‎2022/‎5/‎13
操作系统版本 22622.436
体验 Windows Feature Experience Pack 1000.22632.1000.0

详情
capture_20220727134632632
在注册表中直接修改SystemUseLightTheme值为false后,任务栏颜色并未刷新,点击开始菜单后颜色更改
capture_20220727134719976
文字颜色和图标并没有正确更改

推测原因
21H2版本中直接更改注册表可以成功更改系统颜色,但升级到22H2后出现颜色异常,推测微软在这次更新中一些组件的渲染机制发生了更改(任务栏目前修修补补f**k),目前尚不清楚系统设置中更改颜色的机制

【Suggestion】加入自动/手动 在软件内检查更新

(PS:没错又是我[doge])
在软件里检查更新的功能很酷炫
可以试着在Github/Gitee上放一个最新版本的版本号txt,然后与当前版本号对比(如果有更好的方法就当我没说,这个方法是我给我自己的软件想的)

软件很棒!辛苦了!

壁纸无法自动切换

描述:设置好壁纸和时间后,手动在系统设置里面切换时间,只有主题发生了变化,壁纸并没有跟随变化
软件版本:DarkMode-for-Windows-x64-v1.6.0-repair
系统版本:Windows 11 专业版 22H2 22621.232
尝试操作:把壁纸放在纯英文路径下,此问题依旧存在

设置“开机自启”后无法开机自启

系统:Windows 11 家庭中文版,版本21H2,操作系统版本22000.832
软件版本:v1.6.0-repair以及v1.6.5
问题:在该软件设置了“开机自启”后,系统右下角会弹出电脑管家提示“DarkMode试图开机自启 可能会拖慢开机速度”,我点击允许后,在设置——应用——启动中确实看到DarkMode已开启开机自启的图标,但是重启后,DarkMode不能开机自启。怀疑是电脑管家多管闲事,遂关闭电脑管家及其开机自启功能后,重新在该软件设置中关闭并开启“开机自启”后重启电脑,仍然无法自启。

小建议:更换程序字体

建议:把程序使用的字体更改成微软雅黑或者Segoe UI(数字两边建议空格),虽然这样会改变窗口内所有控件的尺寸。浏览文字更舒适的同时,也符合了win11系统设计体系。希望采纳 :)

建议初次启动时显示提示窗口

如题
大多数人下载之后打开发现没有窗口往往以为有问题,建议第一次打开的时候给个提示,或者提示修改默认设置,至少也要发一个气泡消息

出现了一些问题,现在处于不能用的状态

错误提示

有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.Net.WebException: 远程服务器返回错误: (502) 错误的网关。
在 System.Net.HttpWebRequest.GetResponse()
在 DarkMode.IPAddress.IP()
在 DarkMode.Form2.<>c__DisplayClass8_0.b__0()
在 System.Threading.Tasks.Task.Execute()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 DarkMode.Form2.d__8.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

************** 已加载的程序集 **************
mscorlib
程序集版本:4.0.0.0
Win32 版本:4.8.4515.0 built by: NET48REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll


DarkMode
程序集版本:1.6.0.0
Win32 版本:1.6.0
基本代码:file:///C:/GR/%E7%BB%BF%E8%89%B2%E5%B0%8F%E5%B7%A5%E5%85%B7/DarkMode-for-Windows-x64-v1.6.0-repair.exe


System.Windows.Forms
程序集版本:4.0.0.0
Win32 版本:4.8.4550.0 built by: NET48REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll


System
程序集版本:4.0.0.0
Win32 版本:4.8.4536.0 built by: NET48REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll


System.Drawing
程序集版本:4.0.0.0
Win32 版本:4.8.4395.0 built by: NET48REL1LAST_B
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll


System.Configuration
程序集版本:4.0.0.0
Win32 版本:4.8.4341.0 built by: NET48REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll


System.Core
程序集版本:4.0.0.0
Win32 版本:4.8.4536.0 built by: NET48REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll


System.Xml
程序集版本:4.0.0.0
Win32 版本:4.8.4161.0 built by: NET48REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll


System.Management
程序集版本:4.0.0.0
Win32 版本:4.8.4435.0 built by: NET48REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll


System.Windows.Forms.resources
程序集版本:4.0.0.0
Win32 版本:4.8.4161.0 built by: NET48REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.Windows.Forms.resources.dll


System.Device
程序集版本:4.0.0.0
Win32 版本:4.8.4161.0 built by: NET48REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Device/v4.0_4.0.0.0__b77a5c561934e089/System.Device.dll


Newtonsoft.Json
程序集版本:13.0.0.0
Win32 版本:1.6.0
基本代码:file:///C:/GR/%E7%BB%BF%E8%89%B2%E5%B0%8F%E5%B7%A5%E5%85%B7/DarkMode-for-Windows-x64-v1.6.0-repair.exe


Accessibility
程序集版本:4.0.0.0
Win32 版本:4.8.4161.0 built by: NET48REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll


System.resources
程序集版本:4.0.0.0
Win32 版本:4.8.4161.0 built by: NET48REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.resources.dll


mscorlib.resources
程序集版本:4.0.0.0
Win32 版本:4.8.4161.0 built by: NET48REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/mscorlib.resources.dll


************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。

例如:

启用 JIT 调试后,任何未经处理的异常
都将被发送到在此计算机上注册的 JIT 调试程序,
而不是由此对话框处理。

image

开机自启失败

设置失败:对注册表项”HKEY_ LOCAL_ MACHINE\Software\Microsoft\Windows\CurrentVersion\Run"的访问被拒绝。

自定义深色、浅色模式下Wallpaper Engine壁纸的文件路径无法保存于DarkMode

系统:Windows 11 家庭中文版,版本:21H2,操作系统版本:22000.856
软件版本:v1.6.5
问题:按照设置文档在“壁纸”-“wallpaper engine 壁纸“中设置深/浅色模式壁纸文件路径,并点击”保存“后,关闭设置界面并重新打开,文件路径被清空,DarkMode同样无法执行自动更换wallpaper engine 壁纸的操作

Wallpaper Engine 转换壁纸失败

OS : windows 11

自己在steam下载的wallpaper engine,但是在浅色和深色系统变换的时候,wallpaper engine并没有发生改变

应用程序中发生了未经处理的异常。未见引用对象设置到对象的实例 (Release v1.6.0-repair)

微信截图_20220727201038

有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.NullReferenceException: 未将对象引用设置到对象的实例。
在 DarkMode.Form1.timer1_Tick(Object sender, EventArgs e)
在 System.Windows.Forms.Timer.OnTick(EventArgs e)
在 System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** 已加载的程序集 **************
mscorlib
程序集版本:4.0.0.0
Win32 版本:4.8.9032.0 built by: NET481REL1
基本代码:file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

DarkMode
程序集版本:1.6.0.0
Win32 版本:1.6.0
基本代码:file:///D:/Program/DarkMode/DarkMode.exe

System.Windows.Forms
程序集版本:4.0.0.0
Win32 版本:4.8.9032.0 built by: NET481REL1
基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System
程序集版本:4.0.0.0
Win32 版本:4.8.9032.0 built by: NET481REL1
基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing
程序集版本:4.0.0.0
Win32 版本:4.8.9032.0 built by: NET481REL1
基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Configuration
程序集版本:4.0.0.0
Win32 版本:4.8.9032.0 built by: NET481REL1
基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core
程序集版本:4.0.0.0
Win32 版本:4.8.9032.0 built by: NET481REL1
基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml
程序集版本:4.0.0.0
Win32 版本:4.8.9032.0 built by: NET481REL1
基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

System.Management
程序集版本:4.0.0.0
Win32 版本:4.8.9032.0 built by: NET481REL1
基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll

mscorlib.resources
程序集版本:4.0.0.0
Win32 版本:4.8.9032.0 built by: NET481REL1
基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/mscorlib.resources.dll

System.Windows.Forms.resources
程序集版本:4.0.0.0
Win32 版本:4.8.9032.0 built by: NET481REL1
基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.Windows.Forms.resources.dll

************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。

例如:

启用 JIT 调试后,任何未经处理的异常
都将被发送到在此计算机上注册的 JIT 调试程序,
而不是由此对话框处理。

希望支持“输入”和“光标”的切换

在22H2里,微软把触摸键盘的颜色设置“默认”分成了“深色”和“浅色”,如果可能,能不能加一个触摸键盘的颜色自动切换 【打call】
image
还有1903更新的光标,也是不能自动切换,我的想法是新增一个tab,光标手动选择样式和大小(顺便加个控制壁纸和光标的开关,要不然我这种强迫症会很难受awa)
image
辛苦了!

22H2版本,切换颜色之后任务栏颜色未改变

这是22H2的BUG,在ADMX中也没修复,目前的解决方法是切换壁纸(或许可以先切换模式,等待5秒切换壁纸)
另外,22H2更新了聚焦壁纸,希望可以支持聚焦壁纸的选项(切换颜色时等待5秒自动切换下一张壁纸,不知道能不能实现)

[Bug]无法自动更换壁纸

我设置了原生模式下的浅色和深色壁纸,并保存了。
Snipaste_2022-08-05_19-34-31
这两张壁纸分别是Windows自带的深色和浅色壁纸
Snipaste_2022-08-05_19-35-05
但是它并没有生效,我设置之后也尝试过重启,依旧不生效,如下图,状态栏是深色的,但壁纸是浅色的
Snipaste_2022-08-05_19-35-16
我的电脑上安装了wallpaper engine,但没有启动,不知道这会不会是引起无法更换壁纸的原因?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.