├── DewUSB ├── ud.ico ├── ud.png ├── handle.exe ├── uddark.png ├── udlight.png ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── Resources.Designer.cs │ ├── app.manifest │ └── Resources.resx ├── App.xaml.cs ├── App.config ├── AboutWindow.xaml.cs ├── MultiplyConverter.cs ├── App.xaml ├── packages.config ├── Settings.cs ├── AboutWindow.xaml ├── ProcessInfoWindow.xaml ├── DewUSB.csproj ├── MainWindow.xaml ├── SettingsWindow.xaml.cs ├── SettingsWindow.xaml ├── ProcessInfoWindow.xaml.cs └── MainWindow.xaml.cs ├── art └── dark.jpg ├── LICENSE ├── DewUSB.sln ├── README.md └── .gitignore /DewUSB/ud.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starry-source/DewUSB/HEAD/DewUSB/ud.ico -------------------------------------------------------------------------------- /DewUSB/ud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starry-source/DewUSB/HEAD/DewUSB/ud.png -------------------------------------------------------------------------------- /art/dark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starry-source/DewUSB/HEAD/art/dark.jpg -------------------------------------------------------------------------------- /DewUSB/handle.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starry-source/DewUSB/HEAD/DewUSB/handle.exe -------------------------------------------------------------------------------- /DewUSB/uddark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starry-source/DewUSB/HEAD/DewUSB/uddark.png -------------------------------------------------------------------------------- /DewUSB/udlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starry-source/DewUSB/HEAD/DewUSB/udlight.png -------------------------------------------------------------------------------- /DewUSB/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /DewUSB/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace DewUSB 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /DewUSB/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /DewUSB/AboutWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using System.Windows; 3 | using Wpf.Ui.Controls; 4 | 5 | namespace DewUSB 6 | { 7 | /// 8 | /// 关于窗口的交互逻辑,显示应用程序信息和项目链接 9 | /// 10 | public partial class AboutWindow : FluentWindow 11 | { 12 | /// 13 | /// 初始化关于窗口 14 | /// 15 | public AboutWindow() 16 | { 17 | InitializeComponent(); 18 | 19 | // 注册访问项目按钮的点击事件 20 | // 点击时在默认浏览器中打开项目地址 21 | VisitProjectButton.Click += (s, e) => 22 | { 23 | Process.Start("https://github.com/starry-source/DewUSB"); 24 | }; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /DewUSB/MultiplyConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace DewUSB 6 | { 7 | public class MultiplyConverter : IValueConverter 8 | { 9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 10 | { 11 | if (value is double number && parameter is string multiplier) 12 | { 13 | if (double.TryParse(multiplier, out double factor)) 14 | { 15 | return number * factor; 16 | } 17 | } 18 | return value; 19 | } 20 | 21 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 22 | { 23 | throw new NotImplementedException(); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /DewUSB/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | pack://application:,,,/;component/Fonts/#Segoe Fluent Icons 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /DewUSB/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Starry Source 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /DewUSB.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.14.36301.6 d17.14 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DewUSB", "DewUSB\DewUSB.csproj", "{67B5AEA6-72D6-4727-9516-EA37330A2500}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {67B5AEA6-72D6-4727-9516-EA37330A2500}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {67B5AEA6-72D6-4727-9516-EA37330A2500}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {67B5AEA6-72D6-4727-9516-EA37330A2500}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {67B5AEA6-72D6-4727-9516-EA37330A2500}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {5715E2BA-783B-4266-A5E7-C07C90E735B4} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /DewUSB/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DewUSB.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 |

6 |

DewUSB

7 |

简约的U盘助手
8 | 由星源开发 · Developed by Starry Source

9 |

10 |

11 | 12 | GitHub stars 13 | 14 | 17 | 18 | GitHub forks 19 | 20 | 21 | GitHub License 22 | 23 |

24 | 25 | ## 简介 26 | 一个简约美观的U盘助手 27 | ![深色界面预览](./art/dark.jpg) 28 | (界面有变化,请以实际为准) 29 | ## 正常使用 30 | 31 | - 在右侧 Releases 中下载最新版本的压缩包(`.rar` 文件)。 32 | - 解压到你喜欢的位置,双击 `DewUSB.exe` 即可运行。 33 | 34 | ## 代码部署 35 | 36 | 克隆存储卡,双击 `DewUSB.sln` 打开 Visual Studio,配置好依赖即可。 37 | 38 | ## 开发环境 39 | 40 | Windows 11 24h2\ 41 | .NET 8 -------------------------------------------------------------------------------- /DewUSB/Settings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text.Json; 4 | 5 | namespace DewUSB 6 | { 7 | public class Settings 8 | { 9 | public bool StartWithWindows { get; set; }= false; // 默认不开机自启 10 | public bool MinimizeToTray { get; set; }= true; // 默认最小化到托盘 11 | public int Theme { get; set; } = 2; 12 | 13 | public bool TopMost { get; set; } = false; // 默认不设置为置顶 14 | 15 | public int Position { get; set; } = 2; // 默认右下 16 | public int IconType { get; set; } = 0; // 默认彩色 17 | 18 | public bool ShowOpen { get; set; } = true; // 显示打开按钮 19 | 20 | public int WindowWidth { get; set; } = 400; // 默认窗口宽度 21 | 22 | private static readonly string SettingsPath = Path.Combine( 23 | Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), 24 | "DewUSB", 25 | "settings.json" 26 | ); 27 | 28 | public static Settings Load() 29 | { 30 | try 31 | { 32 | var directory = Path.GetDirectoryName(SettingsPath); 33 | if (!Directory.Exists(directory)) 34 | { 35 | Directory.CreateDirectory(directory); 36 | } 37 | 38 | if (File.Exists(SettingsPath)) 39 | { 40 | var json = File.ReadAllText(SettingsPath); 41 | return JsonSerializer.Deserialize(json) ?? new Settings(); 42 | } 43 | } 44 | catch { } 45 | 46 | return new Settings(); 47 | } 48 | 49 | public void Save() 50 | { 51 | try 52 | { 53 | var directory = Path.GetDirectoryName(SettingsPath); 54 | if (!Directory.Exists(directory)) 55 | { 56 | Directory.CreateDirectory(directory); 57 | } 58 | 59 | var json = JsonSerializer.Serialize(this); 60 | File.WriteAllText(SettingsPath, json); 61 | } 62 | catch { } 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /DewUSB/AboutWindow.xaml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 28 | 29 | 33 | 34 | 38 | 39 | 43 | 44 | 48 | 49 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /DewUSB/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本: 4.0.30319.42000 5 | // 6 | // 对此文件的更改可能导致不正确的行为,如果 7 | // 重新生成代码,则所做更改将丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DewUSB.Properties 12 | { 13 | 14 | 15 | /// 16 | /// 强类型资源类,用于查找本地化字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// 返回此类使用的缓存 ResourceManager 实例。 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DewUSB.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// 重写当前线程的 CurrentUICulture 属性,对 56 | /// 使用此强类型资源类的所有资源查找执行重写。 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /DewUSB/ProcessInfoWindow.xaml: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 如果这个能正常功能工作,请务必告诉我!这对我很重要。 25 | 26 | 27 | 28 | 29 | 33 | 36 | 39 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /DewUSB/Properties/app.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 50 | 58 | 59 | 73 | -------------------------------------------------------------------------------- /DewUSB/DewUSB.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net8.0-windows 4 | WinExe 5 | false 6 | E:\vsot\DewUSB\ass\pack\ 7 | true 8 | Disk 9 | false 10 | Foreground 11 | 7 12 | Days 13 | false 14 | false 15 | true 16 | 0 17 | 0.0.0.0 18 | false 19 | true 20 | true 21 | true 22 | true 23 | true 24 | E5FA16F37172125FADF8CCE0E29BF7C50D7AE2FD 25 | DewUSB_TemporaryKey.pfx 26 | false 27 | false 28 | ud.ico 29 | LocalIntranet 30 | Properties\app.manifest 31 | 32 | 33 | 34 | 35 | 36 | 37 | MSBuild:Compile 38 | 39 | 40 | MSBuild:Compile 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | Always 51 | 52 | 53 | Always 54 | 55 | 56 | 57 | 58 | False 59 | Microsoft .NET Framework 4.7.2 %28x86 和 x64%29 60 | true 61 | 62 | 63 | False 64 | .NET Framework 3.5 SP1 65 | false 66 | 67 | 68 | 69 | 70 | Never 71 | 72 | 73 | 74 | 75 | Always 76 | 77 | 78 | Always 79 | 80 | 81 | -------------------------------------------------------------------------------- /DewUSB/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 21 | 22 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 93 | 94 | 95 | 96 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /DewUSB/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /DewUSB/SettingsWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using DewUSB.Properties; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Windows; 5 | using System.Windows.Forms; 6 | using System.Windows.Media.TextFormatting; 7 | using Wpf.Ui; 8 | using Wpf.Ui.Controls; 9 | using static System.Windows.Forms.VisualStyles.VisualStyleElement; 10 | 11 | namespace DewUSB 12 | { 13 | /// 14 | /// 设置窗口的交互逻辑,处理应用程序设置的显示和保存 15 | /// 16 | public partial class SettingsWindow : FluentWindow 17 | { 18 | /// 19 | /// 当前应用程序设置的引用 20 | /// 21 | private readonly Settings settings; 22 | 23 | /// 24 | /// 初始化设置窗口 25 | /// 26 | /// 当前应用程序的设置实例 27 | public SettingsWindow(Settings currentSettings) 28 | { 29 | InitializeComponent(); 30 | Topmost = false; 31 | settings = currentSettings; 32 | 33 | // 根据当前设置更新UI控件状态 34 | StartWithWindows.IsChecked = settings.StartWithWindows; 35 | MinimizeToTray.IsChecked = settings.MinimizeToTray; 36 | 37 | ThemeSelector.ItemsSource = new List{ 38 | "深色", 39 | "浅色", 40 | "跟随系统" 41 | }; 42 | 43 | ThemeSelector.SelectedIndex = settings.Theme; 44 | 45 | 46 | TopMost.IsChecked = settings.TopMost; 47 | 48 | Position.ItemsSource = new List{ 49 | "左上角", 50 | "左下角", 51 | "右下角", 52 | "居中" 53 | }; 54 | Position.SelectedIndex = settings.Position; 55 | 56 | IconType0.IsChecked = settings.IconType == 0; // 彩色图标 57 | IconType1.IsChecked = settings.IconType == 1; // 灰色图标 58 | 59 | WindowWidth.Value = settings.WindowWidth; 60 | 61 | ShowOpen.IsChecked = settings.ShowOpen; 62 | //StartWithWindows.Checked += change; 63 | //StartWithWindows.Unchecked += change; 64 | //MinimizeToTray.Checked += change; 65 | //MinimizeToTray.Unchecked += change; 66 | ThemeSelector.SelectionChanged += change; 67 | //TopMost.Checked += change; 68 | //TopMost.Unchecked += change; 69 | //Position.SelectionChanged += change; 70 | //IconType0.Checked += change; 71 | //IconType1.Checked += change; 72 | //WindowWidth.ValueChanged += change; 73 | //ShowOpen.Checked += change; 74 | } 75 | 76 | /// 77 | /// 处理设置保存操作 78 | /// 79 | /// 事件源 80 | /// 事件参数 81 | private void change(object sender, RoutedEventArgs e) 82 | { 83 | 84 | if (ThemeSelector.SelectedIndex != settings.Theme) 85 | { 86 | Tip.Text = "部分设置需要重启程序才能生效。"; 87 | Tip.Opacity = 1; 88 | CloseButton.Content = "暂不"; 89 | RestartButton.Visibility = Visibility.Visible; 90 | } 91 | else 92 | { 93 | Tip.Text = "关闭设置后,更改才能生效。"; 94 | Tip.Opacity = 0.5; 95 | CloseButton.Content = "关闭"; 96 | RestartButton.Visibility= Visibility.Collapsed; 97 | 98 | } 99 | } 100 | 101 | private void apply() 102 | { 103 | settings.StartWithWindows = (bool)StartWithWindows.IsChecked; 104 | settings.MinimizeToTray = (bool)MinimizeToTray.IsChecked; 105 | settings.Theme = ThemeSelector.SelectedIndex; 106 | settings.TopMost = (bool)TopMost.IsChecked; 107 | settings.Position = Position.SelectedIndex; 108 | settings.IconType = IconType0.IsChecked == true ? 0 : 1; 109 | settings.WindowWidth = (int)WindowWidth.Value; 110 | settings.ShowOpen = (bool)ShowOpen.IsChecked; 111 | 112 | settings.Save(); 113 | } 114 | 115 | private void CloseButton_Click(object sender, RoutedEventArgs e) 116 | { 117 | // 取消设置,直接关闭窗口 118 | apply(); 119 | Close(); 120 | } 121 | 122 | private void RestartButton_Click(object sender, RoutedEventArgs e) 123 | { 124 | // 重启应用程序 125 | apply(); 126 | System.Diagnostics.Process.Start(AppDomain.CurrentDomain.FriendlyName); 127 | System.Windows.Application.Current.Shutdown(); 128 | } 129 | 130 | private void Button_Click(object sender, RoutedEventArgs e) 131 | { 132 | // 引导用户关闭自动播放通知 133 | Hide(); 134 | System.Diagnostics.Process.Start("ms-settings:autoplay"); 135 | // wpfui message box 136 | var messageBox = new Wpf.Ui.Controls.MessageBox 137 | { 138 | Owner = this, 139 | Title = "操作引导", 140 | Content = new TextBlock 141 | { 142 | Text = "请将「可移动驱动器」默认行为改为「不执行操作」。\n这可以避免程序被遮挡或影响。\n设置完后,关闭此引导即可。", 143 | TextWrapping = TextWrapping.Wrap, 144 | FontSize = 15, 145 | }, 146 | ShowInTaskbar = false, 147 | Topmost = true, 148 | WindowStartupLocation = WindowStartupLocation.CenterScreen, 149 | ResizeMode = ResizeMode.NoResize, 150 | }; 151 | messageBox.ShowDialogAsync(); 152 | Show(); 153 | } 154 | 155 | private void IconType0_Checked(object sender, RoutedEventArgs e) 156 | { 157 | IconImage.Source = new System.Windows.Media.Imaging.BitmapImage( 158 | new Uri("pack://application:,,,/ud.png")); 159 | } 160 | 161 | private void IconType1_Checked(object sender, RoutedEventArgs e) 162 | { 163 | // 根据当前应用的颜色主题 164 | if (Wpf.Ui.Appearance.ApplicationThemeManager.GetAppTheme() == Wpf.Ui.Appearance.ApplicationTheme.Dark) 165 | IconImage.Source = new System.Windows.Media.Imaging.BitmapImage( 166 | new Uri("pack://application:,,,/uddark.png")); 167 | else 168 | IconImage.Source = new System.Windows.Media.Imaging.BitmapImage( 169 | new Uri("pack://application:,,,/udlight.png")); 170 | } 171 | 172 | private void Restore_WindowWidth_Click(object sender, RoutedEventArgs e) 173 | { 174 | // 恢复窗口宽度 175 | WindowWidth.Value = 400; 176 | } 177 | 178 | private void FluentWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) 179 | { 180 | apply(); 181 | } 182 | } 183 | } -------------------------------------------------------------------------------- /DewUSB/SettingsWindow.xaml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |