├── ipad.png ├── qrcode.png ├── shinnku.ico ├── shinnku.jpg ├── Properties ├── launchSettings.json ├── Settings.settings ├── PublishProfiles │ ├── TestVer.pubxml.user │ ├── single.pubxml.user │ ├── TestVer.pubxml │ ├── single.pubxml │ ├── Release.pubxml │ └── Release.pubxml.user └── Settings.Designer.cs ├── ResourceFile.xaml ├── ViewModel ├── Base │ ├── ViewModelBase.cs │ └── CommandBase.cs ├── NotifyIconViewModel.cs ├── AutoStart.cs └── MainViewModel.cs ├── AssemblyInfo.cs ├── Model ├── CarriersModel.cs ├── UserModel.cs └── SettingModel.cs ├── cpu_net.csproj.user ├── cpu_net.sln ├── README.md ├── App.xaml ├── Utils.cs ├── MainWindow.xaml ├── app.manifest ├── cpu_net.csproj ├── Views └── Pages │ ├── HomePage.xaml.cs │ ├── HomePage.xaml │ ├── ConfigurationPage.xaml.cs │ └── ConfigurationPage.xaml ├── App.xaml.cs ├── MainWindow.xaml.cs ├── .gitignore └── LICENSE /ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraNoNeko/cpu_net/HEAD/ipad.png -------------------------------------------------------------------------------- /qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraNoNeko/cpu_net/HEAD/qrcode.png -------------------------------------------------------------------------------- /shinnku.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraNoNeko/cpu_net/HEAD/shinnku.ico -------------------------------------------------------------------------------- /shinnku.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraNoNeko/cpu_net/HEAD/shinnku.jpg -------------------------------------------------------------------------------- /Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "cpu_net": { 4 | "commandName": "Project", 5 | "workingDirectory": "D:\\py\\cpu_net\\workingspace" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Properties/PublishProfiles/TestVer.pubxml.user: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | True|2023-11-13T10:43:43.7420064Z; 8 | 9 | 10 | -------------------------------------------------------------------------------- /ResourceFile.xaml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Properties/PublishProfiles/single.pubxml.user: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | True|2024-12-12T09:07:03.8305298Z;True|2024-01-10T12:51:54.5376410+08:00;True|2024-01-10T05:13:16.9784589+08:00;True|2023-11-24T22:16:09.2490931+08:00;True|2023-11-24T22:07:26.4881446+08:00; 8 | 9 | 10 | -------------------------------------------------------------------------------- /Properties/PublishProfiles/TestVer.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | Release 8 | Any CPU 9 | D:\py\cpu_net\workingspace\bin\Release\net6.0-windows\test\ 10 | FileSystem 11 | <_TargetId>Folder 12 | 13 | -------------------------------------------------------------------------------- /ViewModel/Base/ViewModelBase.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace cpu_net.ViewModel.Base 5 | { 6 | public class ViewModelBase : INotifyPropertyChanged 7 | { 8 | public event PropertyChangedEventHandler? PropertyChanged; 9 | public void OnPropertyChanged([CallerMemberName] string propertyName = null) 10 | { 11 | if (PropertyChanged != null) 12 | PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /Model/CarriersModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | using System; 3 | 4 | namespace cpu_net.Model 5 | { 6 | public class CarriersModel : ObservableObject 7 | { 8 | //value of key 9 | // 0 : Null 10 | // 1 : cmcc 11 | // 2 : unicom 12 | // 3 : telecom 13 | private int _key; 14 | public int Key 15 | { 16 | get { return _key; } 17 | set { _key = value; OnPropertyChanged(nameof(Key)); } 18 | } 19 | 20 | private String _text; 21 | public String Text 22 | { 23 | get { return _text; } 24 | set { _text = value; OnPropertyChanged(nameof(Text)); } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Properties/PublishProfiles/single.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | Release 8 | Any CPU 9 | D:\py\cpu_net\workingspace\bin\Release\net6.0-windows\publish\0\ 10 | FileSystem 11 | <_TargetId>Folder 12 | net6.0-windows10.0.17763.0 13 | win-x64 14 | false 15 | true 16 | false 17 | 18 | -------------------------------------------------------------------------------- /Properties/PublishProfiles/Release.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | Release 8 | Any CPU 9 | D:\py\cpu_net\workingspace\bin\Release\net6.0-windows\publish\win-x64\ 10 | FileSystem 11 | <_TargetId>Folder 12 | net6.0-windows10.0.17763.0 13 | win-x64 14 | true 15 | true 16 | false 17 | 18 | -------------------------------------------------------------------------------- /cpu_net.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <_LastSelectedProfileId>D:\py\cpu_net\cpu_net\Properties\PublishProfiles\Release.pubxml 5 | 6 | 7 | 8 | Designer 9 | 10 | 11 | 12 | 13 | Code 14 | 15 | 16 | Code 17 | 18 | 19 | 20 | 21 | Designer 22 | 23 | 24 | Designer 25 | 26 | 27 | Designer 28 | 29 | 30 | -------------------------------------------------------------------------------- /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 cpu_net.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /cpu_net.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.7.34221.43 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cpu_net", "cpu_net.csproj", "{B37BC920-50FB-467F-901F-A2788914FD50}" 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 | {B37BC920-50FB-467F-901F-A2788914FD50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {B37BC920-50FB-467F-901F-A2788914FD50}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {B37BC920-50FB-467F-901F-A2788914FD50}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {B37BC920-50FB-467F-901F-A2788914FD50}.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 = {3933582F-3659-44FD-8796-5CB22420C242} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CPU网络连接助手 2 | **所有使用教程的大前提是:当网络中有一台设备登录后其他设备都不需要登录
即同一台路由器下只有一台设备有自动连接的能力就可以了(包括手机,电脑,平板)**
3 | **如果3.0.0版本频繁出现AC认证失败,请考虑换回2.x.x版本** 4 | ## 使用方法 5 | 6 |

设置中设置学号密码,勾选需要功能,保存后在主页点击登录即可

7 |

软件更新方法:解压,覆盖并替换原来的文件

8 |

目前测试版,有bug欢迎提出

9 | 10 | 已知问题:

窗口打开情况下从任务托盘退出会导致退出选框失效

11 |

连接成功但是显示连接失败(已修复)

12 |

部分情况崩溃,包括但不限于点击跳转网页,正在考虑增加debug日志输出以帮助排障(debug功能已加)

13 |

新增功能连接CPU,但是由于本程序主要面向小白,故不会考虑自选api

14 |

已知问题:定时运行的log不会实时加载进ui,不影响正常使用(已修复)
15 | 目前部分可修复的已知bug将在1.3版本中得到解决

16 | 17 | ## 苹果设备iPhone/iPad解决方法 18 | 19 | 使用快捷指令:[链接](https://www.icloud.com/shortcuts/e35332a6d9ce49549cc4689a9e7ed729)
20 | 21 | ![快捷指令](/qrcode.png "快捷指令") 22 | 23 |

使用前需要在三个文本框中填入相应信息,运营商注意注释
24 | 进入编辑的方式是点击右上角三个点

25 | 26 | ![示例](/ipad.png "Example") 27 | 28 |

进阶玩法(连上WiFi自动登录):
29 | iPad使用方法:
30 | 打开快捷指令 —> 自动化 —> 新自动化 —> 选择“无线局域网” —> “网络”选取自己的WiFi —> 选择“立即运行”
31 | —> 下一步 —> 选择“连接药大网络” —> 完成
32 | iPhone使用方法:
33 | 打开快捷指令 —> 自动化 —> 创建个人自动化 —> 选择“无线局域网” —> 选取自己的wifi名称 —>
34 | 点击右上方完成,下一步 —> 添加操作 —> App —> 快捷指令 —> 运行快捷指令 —> 点击方框中浅色的“快捷指令” —>
35 | 选择“连接药大网络” —> 下一步 —> 完成

36 | 37 | ### 联系方式: 38 | 加群**939789212**
或联系QQ:3069838783 39 | -------------------------------------------------------------------------------- /App.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ViewModel/Base/CommandBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Input; 3 | 4 | namespace cpu_net.ViewModel.Base 5 | { 6 | public class CommandBase : ICommand 7 | { 8 | public event EventHandler CanExecuteChanged; 9 | 10 | public CommandBase(Action executeAction, Func canExcuteFunc = null) 11 | { 12 | this.ExecuteAction = executeAction; 13 | this.CanExecuteFunc = canExcuteFunc; 14 | } 15 | 16 | public CommandBase(Action executeParaAction, Func canExecuteParaFunc = null) 17 | { 18 | this.ExecuteParaAction = executeParaAction; 19 | this.CanExecuteParaFunc = canExecuteParaFunc; 20 | } 21 | 22 | public bool CanExecute(object parameter = null) 23 | { 24 | if (parameter == null) 25 | { 26 | return this.CanExecuteFunc == null ? true : CanExecuteFunc.Invoke(); 27 | } 28 | return CanExecuteParaFunc == null ? true : CanExecuteParaFunc.Invoke(parameter); 29 | } 30 | 31 | public void Execute(object parameter = null) 32 | { 33 | if (parameter == null) 34 | { 35 | ExecuteAction?.Invoke(); 36 | } 37 | else 38 | { 39 | ExecuteParaAction?.Invoke(parameter); 40 | } 41 | } 42 | 43 | public Action ExecuteAction { get; set; } 44 | public Func CanExecuteFunc { get; set; } 45 | public Action ExecuteParaAction { get; set; } 46 | public Func CanExecuteParaFunc { get; set; } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /Model/UserModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | using System; 3 | 4 | namespace cpu_net.Model 5 | { 6 | public class UserModel : ObservableObject 7 | { 8 | private string _code; 9 | public string Code 10 | { 11 | get { return _code; } 12 | set { _code = value; OnPropertyChanged(nameof(Code)); } 13 | } 14 | 15 | private string _secret; 16 | public string Secret 17 | { 18 | get { return _secret; } 19 | set { _secret = value; OnPropertyChanged(nameof(Secret)); } 20 | } 21 | 22 | private Boolean _isAutoRun; 23 | public Boolean IsAutoRun 24 | { 25 | get { return _isAutoRun; } 26 | set { _isAutoRun = value; OnPropertyChanged(); } 27 | } 28 | 29 | private Boolean _isAutoLogin; 30 | public Boolean IsAutoLogin 31 | { 32 | get { return _isAutoLogin; } 33 | set { _isAutoLogin = value; OnPropertyChanged(); } 34 | } 35 | private Boolean _isAutoMin; 36 | public Boolean IsAutoMin 37 | { 38 | get { return _isAutoMin; } 39 | set { _isAutoMin = value; OnPropertyChanged(); } 40 | } 41 | private Boolean _isSetLogin; 42 | public Boolean IsSetLogin 43 | { 44 | get { return _isSetLogin; } 45 | set { _isSetLogin = value; OnPropertyChanged(); } 46 | } 47 | private int _loginTime; 48 | public int LoginTime 49 | { 50 | get { return _loginTime; } 51 | set { _loginTime = value; OnPropertyChanged(); } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Utils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Threading; 4 | 5 | namespace cpu_net 6 | { 7 | internal class Utils 8 | { 9 | private static readonly ReaderWriterLockSlim LogWriteLock = new ReaderWriterLockSlim(); 10 | public static void LogWrite(Exception ex) 11 | { 12 | if (!Directory.Exists("ErrorLog")) 13 | { 14 | Directory.CreateDirectory("ErrorLog"); 15 | } 16 | // string Month,Day; 17 | var now = DateTime.Now; 18 | /* if (now.Month < 10) 19 | { 20 | Month = "0" + now.Month.ToString(); 21 | } 22 | else 23 | { 24 | Month = now.Month.ToString(); 25 | } 26 | if (now.Day < 10) 27 | { 28 | Day = "0" + now.Day.ToString(); 29 | } 30 | else 31 | { 32 | Day = now.Day.ToString(); 33 | } 34 | */ 35 | string fileName = $"{now.Year}{now.Month:D2}{now.Day:D2}.log"; // 格式化为两位数月份 36 | string logpath = Path.Combine("ErrorLog", fileName); 37 | // var logpath = @"ErrorLog\" + now.Year + "" + Month + "" + Day + ".log"; 38 | var log = "\r\n----------------------" + DateTime.Now + " --------------------------\r\n" 39 | + ex.Message 40 | + "\r\n" 41 | + ex.InnerException 42 | + "\r\n" 43 | + ex.StackTrace 44 | + "\r\n----------------------footer--------------------------\r\n"; 45 | try 46 | { 47 | //设置读写锁为写入模式独占资源,其他写入请求需要等待本次写入结束之后才能继续写入 48 | LogWriteLock.EnterWriteLock(); 49 | File.AppendAllText(logpath, log); 50 | } 51 | finally 52 | { 53 | //退出写入模式,释放资源占用 54 | LogWriteLock.ExitWriteLock(); 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Properties/PublishProfiles/Release.pubxml.user: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | True|2025-07-31T08:17:43.3092221Z;True|2025-07-30T23:30:53.9631874+08:00;True|2025-07-29T09:17:10.2855323+08:00;True|2025-07-28T21:25:55.3914598+08:00;True|2025-07-28T21:21:54.7604161+08:00;True|2025-07-21T17:29:55.1878975+08:00;True|2025-07-18T15:56:26.4377990+08:00;True|2025-07-17T16:26:38.5742544+08:00;True|2025-07-17T16:26:12.8925787+08:00;True|2025-07-12T10:58:32.0330428+08:00;True|2025-07-12T10:46:51.1491233+08:00;True|2025-07-12T10:40:09.6390490+08:00;True|2025-07-12T10:38:09.9868279+08:00;True|2025-07-12T10:31:14.8281182+08:00;True|2025-07-12T10:29:54.4916715+08:00;True|2025-07-12T10:08:38.0780448+08:00;True|2025-07-12T10:03:57.6249978+08:00;True|2025-07-12T10:00:36.1065452+08:00;True|2025-07-12T09:51:27.1187573+08:00;True|2025-07-12T09:47:25.4950090+08:00;True|2025-07-12T09:43:49.1305204+08:00;True|2025-07-12T09:42:59.6619978+08:00;True|2025-07-12T09:42:11.3599646+08:00;True|2025-07-10T09:09:44.0997351+08:00;True|2025-07-10T09:02:43.1431771+08:00;True|2025-07-09T21:43:35.5853813+08:00;True|2025-07-09T21:38:19.9812875+08:00;True|2025-07-09T21:23:58.2856329+08:00;False|2025-07-09T21:23:08.8978844+08:00;True|2025-07-09T18:59:04.5106745+08:00;True|2025-07-09T14:22:32.4322881+08:00;True|2025-07-09T14:16:00.0657523+08:00;True|2025-07-09T14:09:14.9366932+08:00;True|2025-07-09T11:11:48.1026765+08:00;True|2024-12-12T17:07:17.9429842+08:00;True|2024-01-10T12:50:58.6362430+08:00;True|2024-01-10T12:49:55.4114720+08:00;True|2024-01-10T05:11:33.9002045+08:00;True|2024-01-10T05:10:15.4826245+08:00;True|2023-11-24T22:16:30.7904868+08:00;True|2023-11-20T21:20:13.2818648+08:00;True|2023-11-20T13:39:16.2450149+08:00;True|2023-11-19T15:49:10.3470047+08:00;True|2023-11-19T12:54:52.8388499+08:00;True|2023-11-15T20:34:12.0979767+08:00;True|2023-11-14T23:57:05.9977481+08:00;True|2023-11-13T22:35:27.7997034+08:00;True|2023-11-13T18:52:29.8398100+08:00;True|2023-11-13T12:59:04.8987810+08:00;True|2023-11-13T02:14:57.4980102+08:00;True|2023-11-13T02:12:20.8478204+08:00; 8 | 9 | 10 | -------------------------------------------------------------------------------- /MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |