├── .gitattributes ├── .github └── FUNDING.yml ├── .gitignore ├── LICENSE ├── README.md ├── donate.jpg ├── screenshot ├── 1.0.4 │ ├── Snipaste_2019-05-29_11-45-14.jpg │ ├── Snipaste_2019-05-29_11-45-55.jpg │ ├── Snipaste_2019-05-29_11-46-10.jpg │ └── Snipaste_2019-05-29_11-50-30.jpg ├── 1.0.5 │ ├── tray menu.jpg │ ├── update location.jpg │ └── update window.jpg ├── 1.0.7 │ └── Snipaste_2019-07-02_09-36-42.jpg ├── 1.1.8 │ └── option.jpg ├── 1.2.0 │ ├── busytray.jpg │ ├── darkmode.jpg │ ├── data.jpg │ ├── newdata.jpg │ ├── options.jpg │ ├── options_style.jpg │ └── restcountdown.jpg ├── 1.4.2 │ └── Snipaste_2021-11-19_03-08-51.jpg ├── Snipaste_2019-04-25_09-57-21.jpg ├── Snipaste_2019-04-25_09-57-46.jpg ├── dark_tipwindow.jpg └── tipwindow.jpg └── src └── Local ├── Project1.UI ├── Assets │ ├── IconFonts │ │ ├── FabExMDL2.3.36.ttf │ │ └── SegMDL2.ttf │ ├── Images │ │ └── sunglasses.png │ └── Themes │ │ ├── Default │ │ ├── Button.xaml │ │ ├── CheckBox.xaml │ │ ├── ComboBox.xaml │ │ ├── Config.xaml │ │ ├── ContextMenu.xaml │ │ ├── ListBox.xaml │ │ ├── ListView.xaml │ │ ├── Menu.xaml │ │ ├── MessageBox.xaml │ │ ├── ScrollBar.xaml │ │ ├── Style.xaml │ │ ├── TabControl.xaml │ │ ├── TextBlock.xaml │ │ ├── ToolTip.xaml │ │ └── Window.xaml │ │ └── Pink │ │ ├── Button.xaml │ │ ├── CheckBox.xaml │ │ ├── ComboBox.xaml │ │ ├── Config.xaml │ │ ├── ContextMenu.xaml │ │ ├── ListBox.xaml │ │ ├── ListView.xaml │ │ ├── Menu.xaml │ │ ├── MessageBox.xaml │ │ ├── Resources │ │ └── sakura.jpg │ │ ├── ScrollBar.xaml │ │ ├── Style.xaml │ │ ├── TextBlock.xaml │ │ ├── ToolTip.xaml │ │ └── Window.xaml ├── Controls │ ├── ChartControl │ │ ├── Chart.cs │ │ ├── ChartItem.cs │ │ └── Models │ │ │ └── ChartDataModel.cs │ ├── CheckButton.cs │ ├── Commands │ │ ├── Project1UIInputCommands.cs │ │ └── Project1UIWindowCommands.cs │ ├── CompareView.cs │ ├── ContentCard.cs │ ├── Converters │ │ ├── BrushToColorConverter.cs │ │ ├── Project1UIIconToUnicodeConverter.cs │ │ └── StringConverter.cs │ ├── Data │ │ └── TextAlignmentData.cs │ ├── DatePicker │ │ ├── DatePicker.cs │ │ └── ItemList.cs │ ├── Enums │ │ ├── ControlPoint.cs │ │ ├── DesignItemType.cs │ │ ├── Project1UIButtonType.cs │ │ ├── Project1UIIconType.cs │ │ └── Project1UIInputType.cs │ ├── Icon.cs │ ├── Models │ │ ├── ContainerModel.cs │ │ ├── DesignItemModel.cs │ │ ├── DesignTextAlignment.cs │ │ └── ElementModel.cs │ ├── Project1UIButton.cs │ ├── Project1UIChart.cs │ ├── Project1UIColorSelect.cs │ ├── Project1UIDesignContainer.cs │ ├── Project1UIDesignItem.cs │ ├── Project1UIIcon.cs │ ├── Project1UIInput.cs │ ├── Project1UIKeyboardInput.cs │ ├── Project1UIListView.cs │ ├── Project1UIModal.cs │ ├── Project1UIProcessBar.cs │ ├── Project1UIToast.cs │ ├── Project1UIWindow.cs │ ├── TimeBox.cs │ ├── ToastManager.cs │ └── Toggle.cs ├── Cores │ ├── BitmapImager.cs │ ├── IconFonts.cs │ ├── Project1UIColor.cs │ ├── Theme.cs │ ├── UIDefaultSetting.cs │ ├── UINotifyPropertyChanged.cs │ └── WindowsCollection.cs ├── Project1.UI.csproj ├── Properties │ ├── AssemblyInfo.cs │ ├── Settings.Designer.cs │ └── Settings.settings └── Themes │ ├── Chart │ ├── Chart.xaml │ └── ChartItem.xaml │ ├── CheckButton.xaml │ ├── CompareView.xaml │ ├── ContentCard.xaml │ ├── DatePicker │ ├── DatePicker.xaml │ └── ItemList.xaml │ ├── Generic.xaml │ ├── Icon.xaml │ ├── Project1UIButton.xaml │ ├── Project1UIChart.xaml │ ├── Project1UIColorSelect.xaml │ ├── Project1UIDesignItem.xaml │ ├── Project1UIIcon.xaml │ ├── Project1UIInput.xaml │ ├── Project1UIKeyboardInput.xaml │ ├── Project1UIModal.xaml │ ├── Project1UIProcessBar.xaml │ ├── Project1UIToast.xaml │ ├── Project1UIWindow.xaml │ ├── TimeBox.xaml │ └── Toggle.xaml ├── ProjectEye ├── App.xaml ├── App.xaml.cs ├── Core │ ├── AudioHelper.cs │ ├── BusyVerdictHelper.cs │ ├── DataReportImageHelper.cs │ ├── Enums │ │ └── SoundType.cs │ ├── FileHelper.cs │ ├── LogHelper.cs │ ├── Models │ │ ├── EyesTest │ │ │ ├── EyesTestListModel.cs │ │ │ └── EyesTestModel.cs │ │ ├── Options │ │ │ ├── AnimationModel.cs │ │ │ ├── BehaviorModel.cs │ │ │ ├── ComboxModel.cs │ │ │ ├── GeneralModel.cs │ │ │ ├── KeyboardShortcutModel.cs │ │ │ ├── OptionsModel.cs │ │ │ ├── StyleModel.cs │ │ │ ├── ThemeModel.cs │ │ │ └── TomatoModel.cs │ │ ├── Statistic │ │ │ ├── StatisticListModel.cs │ │ │ ├── StatisticModel.cs │ │ │ └── TomatoModel.cs │ │ └── WindowModel.cs │ ├── Net │ │ ├── GithubRelease.cs │ │ └── HttpDownload.cs │ ├── ProcessHelper.cs │ ├── RestEventHandler.cs │ ├── ScreenExtensions.cs │ ├── Service │ │ ├── BackgroundWorkerService.cs │ │ ├── CacheService.cs │ │ ├── ConfigService.cs │ │ ├── EyesTestService.cs │ │ ├── IService.cs │ │ ├── KeyboardShortcutsService.cs │ │ ├── MainService.cs │ │ ├── NotificationService.cs │ │ ├── PreAlertService.cs │ │ ├── RestService.cs │ │ ├── ScreenService.cs │ │ ├── ServiceCollection.cs │ │ ├── SoundService.cs │ │ ├── StatisticService.cs │ │ ├── SystemResourcesService.cs │ │ ├── ThemeService.cs │ │ ├── TomatoService.cs │ │ └── TrayService.cs │ ├── ShortcutHelper.cs │ ├── TypeExtensions.cs │ ├── Win32APIHelper.cs │ ├── WindowManager.cs │ └── XmlExtensions.cs ├── Database │ ├── SQLiteBuilder.cs │ ├── SQLiteConfiguration.cs │ └── StatisticContext.cs ├── FodyWeavers.xml ├── FodyWeavers.xsd ├── Models │ ├── EyesTestModel.cs │ ├── OptionsModel.cs │ ├── StatisticModel.cs │ ├── TipModel.cs │ ├── TipViewDesignModel.cs │ ├── UI │ │ └── UIDesignModel.cs │ ├── UINotifyPropertyChanged.cs │ └── UpdateModel.cs ├── ProjectEye.Local.sln ├── ProjectEye.csproj ├── Properties │ └── AssemblyInfo.cs ├── Resources │ ├── ControlStyle │ │ └── Button.xaml │ ├── Converters │ │ ├── NumberToStringConver.cs │ │ └── SliderValueToWidthConver.cs │ ├── Fonts │ │ └── FabExMDL2.3.36.ttf │ ├── Language │ │ ├── en.xaml │ │ └── zh.xaml │ ├── Themes │ │ ├── Blue │ │ │ ├── Button.xaml │ │ │ ├── CheckBox.xaml │ │ │ ├── ComboBox.xaml │ │ │ ├── Config.xaml │ │ │ ├── ContentCard.xaml │ │ │ ├── ContextMenu.xaml │ │ │ ├── Images │ │ │ │ └── tipImage.png │ │ │ ├── ListBox.xaml │ │ │ ├── ListView.xaml │ │ │ ├── Menu.xaml │ │ │ ├── MessageBox.xaml │ │ │ ├── ScrollBar.xaml │ │ │ ├── Slider.xaml │ │ │ ├── Style.xaml │ │ │ ├── TabControl.xaml │ │ │ ├── TextBlock.xaml │ │ │ ├── Toggle.xaml │ │ │ ├── ToolTip.xaml │ │ │ └── Window.xaml │ │ └── Dark │ │ │ ├── Button.xaml │ │ │ ├── Chart │ │ │ ├── Chart.xaml │ │ │ └── ChartItem.xaml │ │ │ ├── CheckBox.xaml │ │ │ ├── CheckButton.xaml │ │ │ ├── ComboBox.xaml │ │ │ ├── CompareView.xaml │ │ │ ├── Config.xaml │ │ │ ├── ContentCard.xaml │ │ │ ├── ContextMenu.xaml │ │ │ ├── DatePicker │ │ │ ├── DatePicker.xaml │ │ │ └── ItemList.xaml │ │ │ ├── Images │ │ │ └── tipImage.png │ │ │ ├── ListBox.xaml │ │ │ ├── ListView.xaml │ │ │ ├── Menu.xaml │ │ │ ├── MessageBox.xaml │ │ │ ├── ScrollBar.xaml │ │ │ ├── Slider.xaml │ │ │ ├── Style.xaml │ │ │ ├── TabControl.xaml │ │ │ ├── TextBlock.xaml │ │ │ ├── Toggle.xaml │ │ │ ├── ToolTip.xaml │ │ │ └── Window.xaml │ ├── break.png │ ├── coffee_lover.png │ ├── coffee_lover2.png │ ├── conference_presentation__monochromatic.png │ ├── creative_process_.png │ ├── desktop-computer.ico │ ├── dizzy.ico │ ├── ecology.png │ ├── files_and_folder.png │ ├── gear_2699.png │ ├── green-tomato-1.ico │ ├── green-tomato-10.ico │ ├── green-tomato-2.ico │ ├── green-tomato-3.ico │ ├── green-tomato-4.ico │ ├── green-tomato-5.ico │ ├── green-tomato-6.ico │ ├── green-tomato-7.ico │ ├── green-tomato-8.ico │ ├── green-tomato-9.ico │ ├── growth_monochromatic.png │ ├── hammer-and-wrench_1f6e0.png │ ├── office_work_.png │ ├── office_work_2.png │ ├── overheated.ico │ ├── product_manager.png │ ├── red-tomato-1.ico │ ├── red-tomato-10.ico │ ├── red-tomato-2.ico │ ├── red-tomato-3.ico │ ├── red-tomato-4.ico │ ├── red-tomato-5.ico │ ├── red-tomato-6.ico │ ├── red-tomato-7.ico │ ├── red-tomato-8.ico │ ├── red-tomato-9.ico │ ├── relentless.wav │ ├── rest.png │ ├── sleeping.ico │ ├── sunglasses.ico │ ├── tomato.ico │ ├── tomato.png │ ├── web_developer.png │ ├── web_developer2.png │ └── work.png ├── ViewModels │ ├── AsyncCommand.cs │ ├── Command.cs │ ├── ContributorsViewModel.cs │ ├── EyesTestViewModel.cs │ ├── IViewModel.cs │ ├── OptionsViewModel.cs │ ├── StatisticViewModel.cs │ ├── TipViewDesignViewModel.cs │ ├── TipViewModel.cs │ ├── UpdateViewModel.cs │ └── ViewModelEventHandler.cs ├── Views │ ├── ContributorsWindow.xaml │ ├── ContributorsWindow.xaml.cs │ ├── EyesTestWindow.xaml │ ├── EyesTestWindow.xaml.cs │ ├── OptionsWindow.xaml │ ├── OptionsWindow.xaml.cs │ ├── StatisticWindow.xaml │ ├── StatisticWindow.xaml.cs │ ├── TipViewDesignWindow.xaml │ ├── TipViewDesignWindow.xaml.cs │ ├── TipWindow.xaml │ ├── TipWindow.xaml.cs │ ├── UpdateWindow.xaml │ └── UpdateWindow.xaml.cs ├── costura32 │ └── SQLite.Interop.dll └── costura64 │ └── SQLite.Interop.dll ├── ProjectEyeBug ├── App.xaml ├── App.xaml.cs ├── FodyWeavers.xml ├── FodyWeavers.xsd ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── ProjectEyeBug.csproj ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── explosion.png └── packages.config └── ProjectEyeUp ├── Program.cs ├── ProjectEyeUp.csproj └── Properties └── AssemblyInfo.cs /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | custom: http://thelittlepandaisbehind.com/donate.html 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Plan shit 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Project Eye 2 | 3 | 一个基于 `20-20-20` 规则的用眼休息提醒软件(Windows),帮助你保持健康的工作状态,追踪每天的用眼情况。 4 | 5 | 你可以设定好提醒间隔时间(默认20分钟)和休息时间(默认20秒),当程序启动后开始计时,每到达一次提醒间隔时间,就会弹出一个覆盖全屏幕的窗口提示该休息了。默认情况下你可以选择 `跳过` 或 `开始休息` ,选择 `跳过` 窗口将关闭并重新开始计时,选择 `开始休息` 程序会以从设定的休息时间(秒)开始倒计时,此时你应该将视线离开屏幕眺望远方至少6米远处放松双眼,当倒计时结束程序会播放提示音通知你。 6 | 7 |

8 | tipwindow 9 |

10 | 11 | ## 什么是20-20-20规则 12 | 13 | 即每 **20** 分钟,将注意力集中在至少 **20** 英尺( **6** 米)远的地方 **20** 秒。遵循这个规则可以有效地缓解你的用眼疲劳,保护视力健康。 14 | 15 | [参考资料:https://opto.ca/health-library/the-20-20-20-rule](https://opto.ca/health-library/the-20-20-20-rule) 16 | 17 | ## 亮点 18 | 19 | - 全屏状态(全屏游戏、全屏看视频)免打扰功能; 20 | - 进程跳过白名单设置功能,在运行白名单中的程序时不弹出提醒; 21 | - 多个扩展显示器支持; 22 | - 数据统计,用眼时长、休息时长、跳过次数; 23 | - 离开监听,当检测到用户离开电脑时停止计时直到回来; 24 | - 所见即所得地自定义(设计)全屏提示窗口; 25 | - 番茄时钟功能; 26 | 27 | *部分功能需要自行在选项中开启才生效。* 28 | 29 | ## 下载安装 30 | 31 | 你可以在这里 [Releases](https://github.com/Planshit/ProjectEye/releases) 下载所有发布版本编译好的EXE文件压缩包,一般是ProjectEye.zip,解压后直接双击ProjectEye.exe即可运行,无需安装。 32 | 33 | 成功启动后你将在右下角的状态栏中看到 😎 图标,右键显示菜单,双击启动或关闭番茄时钟模式。 34 | 35 | ## 运行环境 36 | 37 | OS: Windows7/10 38 | 39 | Runtime: [.NET Framework 4.5+](https://dotnet.microsoft.com/download/dotnet-framework) 40 | 41 | ## 其他 42 | 43 | [帮助文档](https://littlepanda.gitbook.io/project-eye/) 44 | -------------------------------------------------------------------------------- /donate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/donate.jpg -------------------------------------------------------------------------------- /screenshot/1.0.4/Snipaste_2019-05-29_11-45-14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.0.4/Snipaste_2019-05-29_11-45-14.jpg -------------------------------------------------------------------------------- /screenshot/1.0.4/Snipaste_2019-05-29_11-45-55.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.0.4/Snipaste_2019-05-29_11-45-55.jpg -------------------------------------------------------------------------------- /screenshot/1.0.4/Snipaste_2019-05-29_11-46-10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.0.4/Snipaste_2019-05-29_11-46-10.jpg -------------------------------------------------------------------------------- /screenshot/1.0.4/Snipaste_2019-05-29_11-50-30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.0.4/Snipaste_2019-05-29_11-50-30.jpg -------------------------------------------------------------------------------- /screenshot/1.0.5/tray menu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.0.5/tray menu.jpg -------------------------------------------------------------------------------- /screenshot/1.0.5/update location.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.0.5/update location.jpg -------------------------------------------------------------------------------- /screenshot/1.0.5/update window.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.0.5/update window.jpg -------------------------------------------------------------------------------- /screenshot/1.0.7/Snipaste_2019-07-02_09-36-42.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.0.7/Snipaste_2019-07-02_09-36-42.jpg -------------------------------------------------------------------------------- /screenshot/1.1.8/option.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.1.8/option.jpg -------------------------------------------------------------------------------- /screenshot/1.2.0/busytray.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.2.0/busytray.jpg -------------------------------------------------------------------------------- /screenshot/1.2.0/darkmode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.2.0/darkmode.jpg -------------------------------------------------------------------------------- /screenshot/1.2.0/data.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.2.0/data.jpg -------------------------------------------------------------------------------- /screenshot/1.2.0/newdata.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.2.0/newdata.jpg -------------------------------------------------------------------------------- /screenshot/1.2.0/options.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.2.0/options.jpg -------------------------------------------------------------------------------- /screenshot/1.2.0/options_style.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.2.0/options_style.jpg -------------------------------------------------------------------------------- /screenshot/1.2.0/restcountdown.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.2.0/restcountdown.jpg -------------------------------------------------------------------------------- /screenshot/1.4.2/Snipaste_2021-11-19_03-08-51.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/1.4.2/Snipaste_2021-11-19_03-08-51.jpg -------------------------------------------------------------------------------- /screenshot/Snipaste_2019-04-25_09-57-21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/Snipaste_2019-04-25_09-57-21.jpg -------------------------------------------------------------------------------- /screenshot/Snipaste_2019-04-25_09-57-46.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/Snipaste_2019-04-25_09-57-46.jpg -------------------------------------------------------------------------------- /screenshot/dark_tipwindow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/dark_tipwindow.jpg -------------------------------------------------------------------------------- /screenshot/tipwindow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/screenshot/tipwindow.jpg -------------------------------------------------------------------------------- /src/Local/Project1.UI/Assets/IconFonts/FabExMDL2.3.36.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/Project1.UI/Assets/IconFonts/FabExMDL2.3.36.ttf -------------------------------------------------------------------------------- /src/Local/Project1.UI/Assets/IconFonts/SegMDL2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/Project1.UI/Assets/IconFonts/SegMDL2.ttf -------------------------------------------------------------------------------- /src/Local/Project1.UI/Assets/Images/sunglasses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/Project1.UI/Assets/Images/sunglasses.png -------------------------------------------------------------------------------- /src/Local/Project1.UI/Assets/Themes/Default/CheckBox.xaml: -------------------------------------------------------------------------------- 1 |  5 | 72 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Assets/Themes/Default/ContextMenu.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 35 | 36 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Assets/Themes/Default/Style.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Assets/Themes/Default/TextBlock.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 12 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Assets/Themes/Default/ToolTip.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 43 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Assets/Themes/Pink/ContextMenu.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 35 | 36 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Assets/Themes/Pink/Resources/sakura.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/Project1.UI/Assets/Themes/Pink/Resources/sakura.jpg -------------------------------------------------------------------------------- /src/Local/Project1.UI/Assets/Themes/Pink/Style.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Assets/Themes/Pink/TextBlock.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 12 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Assets/Themes/Pink/ToolTip.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 43 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/ChartControl/Models/ChartDataModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Project1.UI.Controls.ChartControl.Models 8 | { 9 | /// 10 | /// 图表数据模型 11 | /// 12 | public class ChartDataModel 13 | { 14 | /// 15 | /// 值 16 | /// 17 | public double Value { get; set; } 18 | /// 19 | /// 列名 20 | /// 21 | public string Tag { get; set; } 22 | /// 23 | /// 悬浮文本 24 | /// 25 | public string PopupText { get; set; } 26 | /// 27 | /// 是否选中 28 | /// 29 | public bool IsSelected { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/CheckButton.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls.Enums; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | 10 | namespace Project1.UI.Controls 11 | { 12 | public class CheckButton : Control 13 | { 14 | 15 | /// 16 | /// 是否选中 17 | /// 18 | public bool Checked 19 | { 20 | get { return (bool)GetValue(CheckedProperty); } 21 | set { SetValue(CheckedProperty, value); } 22 | } 23 | public static readonly DependencyProperty CheckedProperty = 24 | DependencyProperty.Register("Checked", typeof(bool), typeof(CheckButton), new PropertyMetadata(false)); 25 | 26 | /// 27 | /// 内容 28 | /// 29 | public string Content 30 | { 31 | get { return (string)GetValue(ContentProperty); } 32 | set { SetValue(ContentProperty, value); } 33 | } 34 | public static readonly DependencyProperty ContentProperty = 35 | DependencyProperty.Register("Content", typeof(string), typeof(CheckButton)); 36 | 37 | public CheckButton() 38 | { 39 | DefaultStyleKey = typeof(CheckButton); 40 | } 41 | 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Commands/Project1UIInputCommands.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Input; 7 | 8 | namespace Project1.UI.Controls.Commands 9 | { 10 | public static class Project1UIInputCommands 11 | { 12 | public static RoutedUICommand ClearTextCommand { get; } = new RoutedUICommand("", "ClearTextCommand", typeof(Project1UIInputCommands)); 13 | public static RoutedUICommand CommonOpenFileDialog { get; } = new RoutedUICommand("", "CommonOpenFileDialog", typeof(Project1UIInputCommands)); 14 | 15 | 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Commands/Project1UIWindowCommands.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Input; 7 | 8 | namespace Project1.UI.Controls.Commands 9 | { 10 | public static class Project1UIWindowCommands 11 | { 12 | public static RoutedUICommand MinimizeWindowCommand { get; } = new RoutedUICommand("", "MinimizeWindowCommand", typeof(Project1UIWindowCommands)); 13 | public static RoutedUICommand RestoreWindowCommand { get; } = new RoutedUICommand("", "RestoreWindowCommand", typeof(Project1UIWindowCommands)); 14 | public static RoutedUICommand MaximizeWindowCommand { get; } = new RoutedUICommand("", "MaximizeWindowCommand", typeof(Project1UIWindowCommands)); 15 | public static RoutedUICommand CloseWindowCommand { get; } = new RoutedUICommand("", "CloseWindowCommand", typeof(Project1UIWindowCommands)); 16 | 17 | public static RoutedUICommand LogoButtonClickCommand { get; } = new RoutedUICommand("", "LogoButtonClickCommand", typeof(Project1UIWindowCommands)); 18 | 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/ContentCard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Controls; 7 | 8 | namespace Project1.UI.Controls 9 | { 10 | public class ContentCard : ContentControl 11 | { 12 | public ContentCard() 13 | { 14 | DefaultStyleKey = typeof(ContentCard); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Converters/BrushToColorConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Globalization; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows.Data; 9 | using System.Windows.Media; 10 | 11 | namespace Project1.UI.Controls.Converters 12 | { 13 | [ValueConversion(typeof(Brush), typeof(Color))] 14 | public class BrushToColorConverter : IValueConverter 15 | { 16 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 17 | { 18 | var res = (Color)((value as Brush).GetValue(SolidColorBrush.ColorProperty)); 19 | res.ScA = (float)parameter; 20 | return res; 21 | } 22 | 23 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 24 | { 25 | throw new NotImplementedException(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Converters/Project1UIIconToUnicodeConverter.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls.Enums; 2 | using Project1.UI.Cores; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Diagnostics; 6 | using System.Globalization; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows.Data; 11 | 12 | namespace Project1.UI.Controls.Converters 13 | { 14 | public class Project1UIIconToUnicodeConverter : IValueConverter 15 | { 16 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 17 | { 18 | var icon = (Project1UIIconType)value; 19 | string result = IconFonts.GetUnicodeString(icon); 20 | return result; 21 | } 22 | 23 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 24 | { 25 | throw new NotImplementedException(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Converters/StringConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Data; 8 | 9 | namespace Project1.UI.Controls.Converters 10 | { 11 | [ValueConversion(typeof(object), typeof(string))] 12 | public class StringConverter : IValueConverter 13 | { 14 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 15 | { 16 | return value == null ? null : value.ToString(); 17 | } 18 | 19 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 20 | { 21 | throw new NotImplementedException(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Data/TextAlignmentData.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Project1.UI.Controls.Data 9 | { 10 | public class TextAlignmentData 11 | { 12 | private List data; 13 | public TextAlignmentData() 14 | { 15 | data = new List(); 16 | data.Add(new DesignTextAlignment() 17 | { 18 | 19 | DisplayName = "左", 20 | Value = 0 21 | }); 22 | data.Add(new DesignTextAlignment() 23 | { 24 | 25 | DisplayName = "中", 26 | Value = 1 27 | }); 28 | data.Add(new DesignTextAlignment() 29 | { 30 | 31 | DisplayName = "右", 32 | Value = 2 33 | }); 34 | } 35 | public DesignTextAlignment this[int index] 36 | { 37 | get 38 | { 39 | var result = data.Find(m => m.Value == index); 40 | if (result != null) 41 | { 42 | return result; 43 | } 44 | return data[0]; 45 | } 46 | } 47 | public List ToList() 48 | { 49 | return data; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Enums/ControlPoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Project1.UI.Controls.Enums 8 | { 9 | public enum ControlPoint 10 | { 11 | /// 12 | /// 左上角 13 | /// 14 | LeftTop, 15 | /// 16 | /// 左下角 17 | /// 18 | LeftBottom, 19 | /// 20 | /// 右上角 21 | /// 22 | RightTop, 23 | /// 24 | /// 右下角 25 | /// 26 | RightBottom 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Enums/DesignItemType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Project1.UI.Controls.Enums 8 | { 9 | /// 10 | /// 设计元素类型 11 | /// 12 | public enum DesignItemType 13 | { 14 | /// 15 | /// 图片 16 | /// 17 | Image, 18 | /// 19 | /// 文本 20 | /// 21 | Text, 22 | /// 23 | /// 按钮 24 | /// 25 | Button 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Enums/Project1UIButtonType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Project1.UI.Controls.Enums 8 | { 9 | /// 10 | /// 按钮类型 11 | /// 12 | public enum Project1UIButtonType 13 | { 14 | /// 15 | /// 纯文本 16 | /// 17 | Text, 18 | /// 19 | /// 图标加文本 20 | /// 21 | TextIconFont 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Enums/Project1UIInputType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Project1.UI.Controls.Enums 8 | { 9 | /// 10 | /// 输入框类型 11 | /// 12 | public enum Project1UIInputType 13 | { 14 | /// 15 | /// 文本输入框 16 | /// 17 | Text, 18 | /// 19 | /// 文件选择框 20 | /// 21 | FileSelect, 22 | /// 23 | /// 文件夹选择框 24 | /// 25 | FolderSelect, 26 | /// 27 | /// 数字输入框 28 | /// 29 | Number 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Icon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | 9 | namespace Project1.UI.Controls 10 | { 11 | /// 12 | /// Fabric icon 13 | /// 14 | public class Icon : Control 15 | { 16 | #region 图标 17 | /// 18 | /// Fabric icon unicode 19 | /// 20 | public string Unicode 21 | { 22 | get { return (string)GetValue(UnicodeProperty); } 23 | set { SetValue(UnicodeProperty, value); } 24 | } 25 | public static readonly DependencyProperty UnicodeProperty = 26 | DependencyProperty.Register("Unicode", 27 | typeof(string), 28 | typeof(Icon), 29 | new PropertyMetadata("E783")); 30 | 31 | 32 | #endregion 33 | 34 | public Icon() 35 | { 36 | DefaultStyleKey = typeof(Icon); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Models/ContainerModel.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Cores; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Media; 8 | 9 | namespace Project1.UI.Controls.Models 10 | { 11 | public class ContainerModel : UINotifyPropertyChanged 12 | { 13 | private double Opacity_; 14 | public double Opacity 15 | { 16 | get 17 | { 18 | return Opacity_; 19 | } 20 | set 21 | { 22 | Opacity_ = value; 23 | OnPropertyChanged(); 24 | } 25 | } 26 | private Brush Background_; 27 | public Brush Background 28 | { 29 | get 30 | { 31 | 32 | return Background_; 33 | } 34 | set 35 | { 36 | Background_ = value; 37 | OnPropertyChanged(); 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Models/DesignTextAlignment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Project1.UI.Controls.Models 8 | { 9 | public class DesignTextAlignment 10 | { 11 | public string DisplayName { get; set; } 12 | public int Value { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Models/ElementModel.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls.Enums; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Media; 8 | 9 | namespace Project1.UI.Controls.Models 10 | { 11 | /// 12 | /// 元素模型 13 | /// 14 | public class ElementModel 15 | { 16 | /// 17 | /// 类型 18 | /// 19 | public DesignItemType Type { get; set; } 20 | /// 21 | /// X坐标 22 | /// 23 | public double X { get; set; } 24 | /// 25 | /// Y坐标 26 | /// 27 | public double Y { get; set; } 28 | /// 29 | /// 宽 30 | /// 31 | public double Width { get; set; } 32 | /// 33 | /// 高 34 | /// 35 | public double Height { get; set; } 36 | /// 37 | /// 文字颜色 38 | /// 39 | public Brush TextColor { get; set; } 40 | /// 41 | /// 是否是粗体文本 42 | /// 43 | public bool IsTextBold { get; set; } 44 | /// 45 | /// 不透明度 46 | /// 47 | public double Opacity { get; set; } 48 | /// 49 | /// 文本 50 | /// 51 | public string Text { get; set; } 52 | /// 53 | /// 元素样式名 54 | /// 55 | public string Style { get; set; } 56 | /// 57 | /// 图片路径 58 | /// 59 | public string Image { get; set; } 60 | /// 61 | /// 字体大小 62 | /// 63 | public double FontSize { get; set; } 64 | /// 65 | /// 命令 66 | /// 67 | public string Command { get; set; } 68 | /// 69 | /// 文本对齐方式 70 | /// 71 | public int TextAlignment { get; set; } 72 | 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Project1UIButton.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls.Enums; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | 10 | namespace Project1.UI.Controls 11 | { 12 | public class Project1UIButton : Button 13 | { 14 | 15 | //按钮圆角半径 16 | /// 17 | /// 按钮圆角半径 18 | /// 19 | public CornerRadius CornerRadius 20 | { 21 | get { return (CornerRadius)GetValue(CornerRadiusProperty); } 22 | set { SetValue(CornerRadiusProperty, value); } 23 | } 24 | public static readonly DependencyProperty CornerRadiusProperty = 25 | DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(Project1UIButton)); 26 | 27 | //图标对齐方式 28 | /// 29 | /// 图标对齐方式(仅支持左右) 30 | /// 31 | public HorizontalAlignment IconAlignment 32 | { 33 | get { return (HorizontalAlignment)GetValue(IconAlignmentProperty); } 34 | set { SetValue(IconAlignmentProperty, value); } 35 | } 36 | public static readonly DependencyProperty IconAlignmentProperty = 37 | DependencyProperty.Register("IconAlignment", typeof(HorizontalAlignment), typeof(Project1UIButton)); 38 | //图标 39 | /// 40 | /// 图标 41 | /// 42 | public Project1UIIconType Icon 43 | { 44 | get { return (Project1UIIconType)GetValue(IconProperty); } 45 | set { SetValue(IconProperty, value); } 46 | } 47 | public static readonly DependencyProperty IconProperty = 48 | DependencyProperty.Register("Icon", typeof(Project1UIIconType), typeof(Project1UIButton),new PropertyMetadata(Project1UIIconType.Null)); 49 | //图标大小 50 | /// 51 | /// 图标大小 52 | /// 53 | public double IconSize 54 | { 55 | get { return (double)GetValue(IconSizeProperty); } 56 | set { SetValue(IconSizeProperty, value); } 57 | } 58 | public static readonly DependencyProperty IconSizeProperty = 59 | DependencyProperty.Register("IconSize", typeof(double), typeof(Project1UIButton)); 60 | 61 | public Project1UIButton() 62 | { 63 | DefaultStyleKey = typeof(Project1UIButton); 64 | 65 | } 66 | 67 | 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Project1UIColorSelect.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Input; 9 | using System.Windows.Media; 10 | 11 | namespace Project1.UI.Controls 12 | { 13 | /// 14 | /// 颜色选择控件 15 | /// 16 | public class Project1UIColorSelect : Control 17 | { 18 | /// 19 | /// 当前选择颜色 20 | /// 21 | public Brush Color 22 | { 23 | get { return (Brush)GetValue(ColorProperty); } 24 | set { SetValue(ColorProperty, value); } 25 | } 26 | public static readonly DependencyProperty ColorProperty = 27 | DependencyProperty.Register("Color", typeof(Brush), typeof(Project1UIColorSelect), new PropertyMetadata(Brushes.Black)); 28 | 29 | public Project1UIColorSelect() 30 | { 31 | DefaultStyleKey = typeof(Project1UIColorSelect); 32 | ToolTip = "选择颜色"; 33 | } 34 | protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) 35 | { 36 | base.OnMouseLeftButtonDown(e); 37 | System.Windows.Forms.ColorDialog colorDialog = new System.Windows.Forms.ColorDialog(); 38 | 39 | if (colorDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) 40 | 41 | { 42 | 43 | System.Drawing.SolidBrush sb = new System.Drawing.SolidBrush(colorDialog.Color); 44 | 45 | SolidColorBrush solidColorBrush = new SolidColorBrush(System.Windows.Media.Color.FromArgb(sb.Color.A, sb.Color.R, sb.Color.G, sb.Color.B)); 46 | 47 | Color = solidColorBrush; 48 | 49 | } 50 | 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Project1UIIcon.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls.Enums; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | 10 | namespace Project1.UI.Controls 11 | { 12 | public class Project1UIIcon : Control 13 | { 14 | public Project1UIIconType Icon 15 | { 16 | get { return (Project1UIIconType)GetValue(IconProperty); } 17 | set { SetValue(IconProperty, value); } 18 | } 19 | public static readonly DependencyProperty IconProperty = 20 | DependencyProperty.Register("Icon", typeof(Project1UIIconType), typeof(Project1UIIcon), new PropertyMetadata(Project1UIIconType.Null)); 21 | 22 | public Project1UIIcon() 23 | { 24 | DefaultStyleKey = typeof(Project1UIIcon); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Project1UIKeyboardInput.cs: -------------------------------------------------------------------------------- 1 |  2 | using Project1.UI.Controls.Commands; 3 | using Project1.UI.Controls.Enums; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Diagnostics; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows; 11 | using System.Windows.Controls; 12 | using System.Windows.Input; 13 | 14 | namespace Project1.UI.Controls 15 | { 16 | public class Project1UIKeyboardInput : Control 17 | { 18 | public string Placeholder 19 | { 20 | get { return (string)GetValue(PlaceholderProperty); } 21 | set { SetValue(PlaceholderProperty, value); } 22 | } 23 | 24 | public static readonly DependencyProperty PlaceholderProperty = 25 | DependencyProperty.Register("Placeholder", typeof(string), typeof(Project1UIKeyboardInput), new PropertyMetadata("")); 26 | 27 | public string KeyText 28 | { 29 | get { return (string)GetValue(KeyTextProperty); } 30 | set { SetValue(KeyTextProperty, value); } 31 | } 32 | 33 | public static readonly DependencyProperty KeyTextProperty = 34 | DependencyProperty.Register("KeyText", typeof(string), typeof(Project1UIKeyboardInput), new PropertyMetadata("")); 35 | public Project1UIKeyboardInput() 36 | { 37 | this.DefaultStyleKey = typeof(Project1UIKeyboardInput); 38 | this.CommandBindings.Add(new CommandBinding(Project1UIInputCommands.ClearTextCommand, OnClearTextCommand)); 39 | 40 | } 41 | 42 | private void OnClearTextCommand(object sender, ExecutedRoutedEventArgs e) 43 | { 44 | KeyText = string.Empty; 45 | } 46 | 47 | protected override void OnMouseDown(MouseButtonEventArgs e) 48 | { 49 | base.OnMouseDown(e); 50 | Focus(); 51 | } 52 | protected override void OnKeyDown(KeyEventArgs e) 53 | { 54 | base.OnKeyDown(e); 55 | string key; 56 | if (e.KeyboardDevice.Modifiers == ModifierKeys.Control && e.Key != Key.LeftCtrl) 57 | { 58 | key = "CTRL + " + e.Key.ToString(); 59 | } 60 | else 61 | { 62 | key = e.Key.ToString(); 63 | } 64 | KeyText = key; 65 | } 66 | 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Project1UIListView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | 9 | namespace Project1.UI.Controls 10 | { 11 | public class Project1UIListView : ListView 12 | { 13 | public object Selected 14 | { 15 | get { return (object)GetValue(SelectedProperty); } 16 | set { SetValue(SelectedProperty, value); } 17 | } 18 | public static readonly DependencyProperty SelectedProperty = 19 | DependencyProperty.Register("Selected", typeof(object), typeof(Project1UIListView)); 20 | 21 | public Project1UIListView() 22 | { 23 | 24 | } 25 | protected override void OnSelectionChanged(SelectionChangedEventArgs e) 26 | { 27 | base.OnSelectionChanged(e); 28 | Selected = SelectedItems; 29 | 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/ToastManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Project1.UI.Controls 8 | { 9 | public static class ToastManager 10 | { 11 | private static Project1UIToast toast_; 12 | 13 | public static void Add(Project1UIToast toast) 14 | { 15 | if (toast_ != null) 16 | { 17 | toast_.Hide(); 18 | } 19 | toast_ = toast; 20 | } 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Controls/Toggle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Input; 9 | 10 | namespace Project1.UI.Controls 11 | { 12 | public class Toggle : Control 13 | { 14 | public bool IsChecked 15 | { 16 | get { return (bool)GetValue(IsCheckedProperty); } 17 | set { SetValue(IsCheckedProperty, value); } 18 | } 19 | public static readonly DependencyProperty IsCheckedProperty = 20 | DependencyProperty.Register("IsChecked", typeof(bool), typeof(Toggle), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback(OnIsCheckedChanged))); 21 | 22 | private static void OnIsCheckedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) 23 | { 24 | var control = d as Toggle; 25 | if (e.OldValue != e.NewValue && control.Text == "关") 26 | { 27 | control.Text = control.IsChecked ? control.OnText : control.OffText; 28 | } 29 | VisualStateManager.GoToState(control, control.IsChecked ? "On" : "Off", true); 30 | } 31 | 32 | public string OnText 33 | { 34 | get { return (string)GetValue(OnTextProperty); } 35 | set { SetValue(OnTextProperty, value); } 36 | } 37 | public static readonly DependencyProperty OnTextProperty = 38 | DependencyProperty.Register("OnText", typeof(string), typeof(Toggle), new PropertyMetadata("开")); 39 | public string OffText 40 | { 41 | get { return (string)GetValue(OffTextProperty); } 42 | set { SetValue(OffTextProperty, value); } 43 | } 44 | public static readonly DependencyProperty OffTextProperty = 45 | DependencyProperty.Register("OffText", typeof(string), typeof(Toggle), new PropertyMetadata("关")); 46 | public string Text 47 | { 48 | get { return (string)GetValue(TextProperty); } 49 | set { SetValue(TextProperty, value); } 50 | } 51 | public static readonly DependencyProperty TextProperty = 52 | DependencyProperty.Register("Text", typeof(string), typeof(Toggle), new PropertyMetadata("关")); 53 | 54 | public Toggle() 55 | { 56 | DefaultStyleKey = typeof(Toggle); 57 | } 58 | public override void OnApplyTemplate() 59 | { 60 | base.OnApplyTemplate(); 61 | VisualStateManager.GoToState(this, IsChecked ? "On" : "Off", true); 62 | } 63 | protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e) 64 | { 65 | base.OnMouseLeftButtonUp(e); 66 | IsChecked = !IsChecked; 67 | VisualStateManager.GoToState(this, IsChecked ? "On" : "Off", true); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Cores/BitmapImager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Media.Imaging; 9 | using System.Windows.Resources; 10 | 11 | namespace Project1.UI.Cores 12 | { 13 | public static class BitmapImager 14 | { 15 | 16 | public static BitmapImage Load(string filePath) 17 | { 18 | var bitmap = new BitmapImage(); 19 | bitmap.BeginInit(); 20 | if (filePath.IndexOf("pack://") != -1) 21 | { 22 | StreamResourceInfo info = Application.GetResourceStream(new Uri(filePath, UriKind.RelativeOrAbsolute)); 23 | using (var st = info.Stream) 24 | { 25 | bitmap.StreamSource = st; 26 | bitmap.EndInit(); 27 | bitmap.Freeze(); 28 | } 29 | } 30 | else 31 | { 32 | if (!File.Exists(filePath)) 33 | { 34 | return null; 35 | } 36 | byte[] imageData; 37 | using (var fileStream = new FileStream(@filePath, FileMode.Open, FileAccess.Read)) 38 | 39 | using (var binaryReader = new BinaryReader(fileStream)) 40 | { 41 | imageData = binaryReader.ReadBytes((int)fileStream.Length); 42 | bitmap.StreamSource = new MemoryStream(imageData); 43 | bitmap.EndInit(); 44 | bitmap.Freeze(); 45 | } 46 | } 47 | 48 | return bitmap; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Cores/Project1UIColor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Media; 7 | 8 | namespace Project1.UI.Cores 9 | { 10 | public class Project1UIColor 11 | { 12 | 13 | /// 14 | /// 红色 15 | /// 16 | public static SolidColorBrush Red { get; set; } = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#f63b36")); 17 | /// 18 | /// 绿色 19 | /// 20 | public static SolidColorBrush Green { get; set; } = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#24cf5f")); 21 | /// 22 | /// 黑色 23 | /// 24 | public static SolidColorBrush Black { get; set; } = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#424242")); 25 | 26 | public static Color Yellow { get; set; } = (Color)ColorConverter.ConvertFromString("#fff000"); 27 | 28 | /// 29 | /// 黄色 30 | /// 31 | public static SolidColorBrush YellowBrush { get; set; } = new SolidColorBrush(Yellow); 32 | 33 | /// 34 | /// 紫色 35 | /// 36 | public static Color Violet { get; set; } = (Color)ColorConverter.ConvertFromString("#0000EF"); 37 | /// 38 | /// 紫色笔刷 39 | /// 40 | public static SolidColorBrush VioletBrush { get; set; } = new SolidColorBrush(Violet); 41 | 42 | /// 43 | /// 主题色 44 | /// 45 | public static SolidColorBrush ThemeColor { get; set; } = VioletBrush; 46 | 47 | public static SolidColorBrush Get(string color, double opacity = 1) 48 | { 49 | return new SolidColorBrush((Color)ColorConverter.ConvertFromString(color)) 50 | { 51 | Opacity = opacity 52 | }; 53 | } 54 | public static Color GetMediaColor(string color) 55 | { 56 | return (Color)ColorConverter.ConvertFromString(color); 57 | 58 | } 59 | 60 | public static Color BrushToColor(Brush value, double opacity = 1) 61 | { 62 | var b = value; 63 | var res = (Color)b.GetValue(SolidColorBrush.ColorProperty); 64 | res.ScA = (float)opacity; 65 | return res; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Cores/UIDefaultSetting.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Project1.UI.Cores 8 | { 9 | /// 10 | /// UI默认设置 11 | /// 12 | public class UIDefaultSetting 13 | { 14 | /// 15 | /// 获取或设置主题名 16 | /// 17 | public static string DefaultThemeName { get; set; } = "Default"; 18 | /// 19 | /// 获取或设置主题路径 20 | /// 21 | public static string DefaultThemePath { get; set; } = null; 22 | /// 23 | /// 获取或设置主题颜色 24 | /// 25 | public static string DefaultThemeColor { get; set; } = "#ffc83d"; 26 | /// 27 | /// 获取主题全路径 28 | /// 29 | public static string DefaultThemeFullPath 30 | { 31 | get 32 | { 33 | return DefaultThemePath != null ? DefaultThemePath + DefaultThemeName : "/Project1.UI;component/Assets/Themes/" + DefaultThemeName; 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Cores/UINotifyPropertyChanged.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Project1.UI.Cores 9 | { 10 | public class UINotifyPropertyChanged : INotifyPropertyChanged 11 | { 12 | public event PropertyChangedEventHandler PropertyChanged; 13 | 14 | public void OnPropertyChanged(string propertyName = "") 15 | { 16 | 17 | PropertyChangedEventHandler handler = PropertyChanged; 18 | if (handler != null) 19 | { 20 | handler.Invoke(this, new PropertyChangedEventArgs(propertyName)); 21 | } 22 | 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Cores/WindowsCollection.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Project1.UI.Cores 9 | { 10 | public class WindowsCollection 11 | { 12 | private static readonly List _windows = new List(); 13 | 14 | public Project1UIWindow this[int index] 15 | { 16 | get 17 | { 18 | return _windows[index]; 19 | } 20 | set 21 | { 22 | _windows[index] = value; 23 | } 24 | } 25 | 26 | public static void Add(Project1UIWindow _window) 27 | { 28 | 29 | _windows.Add(_window); 30 | 31 | } 32 | 33 | public static void Remove(Project1UIWindow _window) 34 | { 35 | 36 | _windows.Remove(_window); 37 | 38 | } 39 | public static List ToList() 40 | { 41 | return _windows; 42 | } 43 | 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using System.Windows; 5 | 6 | // 有关程序集的一般信息由以下 7 | // 控制。更改这些特性值可修改 8 | // 与程序集关联的信息。 9 | [assembly: AssemblyTitle("Project1.UI")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("Project1.UI")] 14 | [assembly: AssemblyCopyright("Copyright © 2018")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] 18 | 19 | // 将 ComVisible 设置为 false 会使此程序集中的类型 20 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 21 | //请将此类型的 ComVisible 特性设置为 true。 22 | [assembly: ComVisible(false)] 23 | 24 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 25 | [assembly: Guid("b441ce6c-d252-4683-9f39-211f17794f56")] 26 | 27 | // 程序集的版本信息由下列四个值组成: 28 | // 29 | // 主版本 30 | // 次版本 31 | // 生成号 32 | // 修订号 33 | // 34 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 35 | //通过使用 "*",如下所示: 36 | // [assembly: AssemblyVersion("1.0.*")] 37 | [assembly: AssemblyVersion("1.0.0.0")] 38 | [assembly: AssemblyFileVersion("1.0.0.0")] 39 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Project1.UI.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.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 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Themes/CheckButton.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Themes/ContentCard.xaml: -------------------------------------------------------------------------------- 1 |  6 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Themes/DatePicker/ItemList.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Themes/Generic.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Themes/Icon.xaml: -------------------------------------------------------------------------------- 1 |  6 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Themes/Project1UIChart.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Themes/Project1UIColorSelect.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Themes/Project1UIIcon.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Themes/Project1UIProcessBar.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/Local/Project1.UI/Themes/TimeBox.xaml: -------------------------------------------------------------------------------- 1 |  6 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 13 | 14 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/AudioHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace ProjectEye.Core 5 | { 6 | /* 7 | * https://stackoverflow.com/questions/45422255/determine-if-windows-is-currently-playing-sound 8 | */ 9 | /// 10 | /// 声音辅助类 11 | /// 12 | public class AudioHelper 13 | { 14 | /// 15 | /// 指示系统当前是否在播放声音 16 | /// 17 | /// 18 | public static bool IsWindowsPlayingSound() 19 | { 20 | try 21 | { 22 | IMMDeviceEnumerator enumerator = (IMMDeviceEnumerator)(new MMDeviceEnumerator()); 23 | IMMDevice speakers = enumerator.GetDefaultAudioEndpoint(EDataFlow.eRender, ERole.eMultimedia); 24 | IAudioMeterInformation meter = (IAudioMeterInformation)speakers.Activate(typeof(IAudioMeterInformation).GUID, 0, IntPtr.Zero); 25 | if (meter != null) 26 | { 27 | 28 | float value = meter.GetPeakValue(); 29 | 30 | // this is a bit tricky. 0 is the official "no sound" value 31 | // but for example, if you open a video and plays/stops with it (w/o killing the app/window/stream), 32 | // the value will not be zero, but something really small (around 1E-09) 33 | // so, depending on your context, it is up to you to decide 34 | // if you want to test for 0 or for a small value 35 | return value > 1E-08; 36 | } 37 | else 38 | { 39 | return false; 40 | } 41 | } 42 | catch (Exception ec) 43 | { 44 | LogHelper.Warning(ec.ToString()); 45 | return false; 46 | } 47 | } 48 | 49 | [ComImport, Guid("BCDE0395-E52F-467C-8E3D-C4579291692E")] 50 | private class MMDeviceEnumerator 51 | { 52 | } 53 | 54 | private enum EDataFlow 55 | { 56 | eRender, 57 | eCapture, 58 | eAll, 59 | } 60 | 61 | private enum ERole 62 | { 63 | eConsole, 64 | eMultimedia, 65 | eCommunications, 66 | } 67 | 68 | [InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("A95664D2-9614-4F35-A746-DE8DB63617E6")] 69 | private interface IMMDeviceEnumerator 70 | { 71 | void NotNeeded(); 72 | IMMDevice GetDefaultAudioEndpoint(EDataFlow dataFlow, ERole role); 73 | // the rest is not defined/needed 74 | } 75 | 76 | [InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("D666063F-1587-4E43-81F1-B948E807363F")] 77 | private interface IMMDevice 78 | { 79 | [return: MarshalAs(UnmanagedType.IUnknown)] 80 | object Activate([MarshalAs(UnmanagedType.LPStruct)] Guid iid, int dwClsCtx, IntPtr pActivationParams); 81 | // the rest is not defined/needed 82 | } 83 | 84 | [InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("C02216F6-8C67-4B5B-9D00-D008E73E0064")] 85 | private interface IAudioMeterInformation 86 | { 87 | float GetPeakValue(); 88 | // the rest is not defined/needed 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/BusyVerdictHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace ProjectEye.Core 4 | { 5 | /// 6 | /// 繁忙判断帮助类 7 | /// 用于判断用户的繁忙状态 8 | /// 9 | public class BusyVerdictHelper 10 | { 11 | private readonly static string[] MusicApps = { 12 | "cloudmusic",""}; 13 | /// 14 | /// 指示用户当前是否是在看视频 15 | /// 16 | /// 17 | public static bool IsWatchingVideo() 18 | { 19 | Process[] processes = Process.GetProcesses(); 20 | //processes.Where(m => m.ProcessName) 21 | 22 | return false; 23 | } 24 | 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Enums/SoundType.cs: -------------------------------------------------------------------------------- 1 | namespace ProjectEye.Core.Enums 2 | { 3 | public enum SoundType 4 | { 5 | /// 6 | /// 休息结束 7 | /// 8 | RestOverSound, 9 | /// 10 | /// 番茄时钟工作开始 11 | /// 12 | TomatoWorkStartSound, 13 | /// 14 | /// 番茄时钟工作结束 15 | /// 16 | TomatoWorkEndSound, 17 | /// 18 | /// 其他 19 | /// 20 | Other 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/FileHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace ProjectEye.Core 5 | { 6 | public class FileHelper 7 | { 8 | /// 9 | /// 在运行目录写入文件 10 | /// 11 | /// 路径 12 | /// 内容 13 | public static void Write(string path, string contents, bool isRunPath = true) 14 | { 15 | if (isRunPath) 16 | { 17 | path = AppDomain.CurrentDomain.BaseDirectory + path; 18 | } 19 | string dir = Path.GetDirectoryName(path); 20 | if (!Directory.Exists(dir)) 21 | { 22 | Directory.CreateDirectory(dir); 23 | } 24 | File.WriteAllText(path, contents); 25 | } 26 | /// 27 | /// 在运行目录中读取一个文件 28 | /// 29 | /// 30 | /// 31 | public static string Read(string path) 32 | { 33 | path = AppDomain.CurrentDomain.BaseDirectory + path; 34 | if (File.Exists(path)) 35 | { 36 | return File.ReadAllText(path); 37 | } 38 | return string.Empty; 39 | } 40 | /// 41 | /// 在运行目录中判断文件是否存在 42 | /// 43 | /// 44 | /// 45 | public static bool Exists(string path) 46 | { 47 | path = AppDomain.CurrentDomain.BaseDirectory + path; 48 | return File.Exists(path); 49 | 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/LogHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace ProjectEye.Core 5 | { 6 | public class LogHelper 7 | { 8 | public enum Level 9 | { 10 | /// 11 | /// 调试 12 | /// 13 | DEBUG, 14 | /// 15 | /// 错误 16 | /// 17 | ERROR, 18 | /// 19 | /// 警告 20 | /// 21 | WARNING 22 | } 23 | public static void Debug(string text, bool write = false, bool console = true) 24 | { 25 | Log(Level.DEBUG, text, write, console); 26 | } 27 | public static void Error(string text, bool write = true, bool console = true) 28 | { 29 | Log(Level.ERROR, text, write, console); 30 | } 31 | public static void Warning(string text, bool write = true, bool console = true) 32 | { 33 | Log(Level.WARNING, text, write, console); 34 | } 35 | private static void Log(Level level, string text, bool write = false, bool console = true) 36 | { 37 | string log = LogFormat(level, text); 38 | if (write) 39 | { 40 | //写入日志文件 41 | WriteFile(level, log); 42 | } 43 | if (console) 44 | { 45 | //在debug模式下打印到输出 46 | System.Diagnostics.Debug.WriteLine(log); 47 | } 48 | } 49 | private static void WriteFile(Level level, string text) 50 | { 51 | try 52 | { 53 | string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, 54 | "Log", 55 | $"{level.ToString()}_{DateTime.Now.ToString("yyyy_MM_dd")}.log"); 56 | string dir = Path.GetDirectoryName(filePath); 57 | if (!Directory.Exists(dir)) 58 | { 59 | Directory.CreateDirectory(dir); 60 | } 61 | File.AppendAllText(filePath, text); 62 | } 63 | catch 64 | { 65 | //... 66 | } 67 | } 68 | private static string LogFormat(Level level, string text) 69 | { 70 | string logText = $"[{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}] [{level.ToString()}]\r\n{text}\r\n------------------------\r\n\r\n"; 71 | return logText; 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Models/EyesTest/EyesTestListModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Xml.Serialization; 3 | 4 | namespace ProjectEye.Core.Models.EyesTest 5 | { 6 | [XmlRootAttribute("EyesTestList")] 7 | public class EyesTestListModel 8 | { 9 | public List Data { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Models/EyesTest/EyesTestModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Xml.Serialization; 3 | 4 | namespace ProjectEye.Core.Models.EyesTest 5 | { 6 | [XmlRootAttribute("EyesTest")] 7 | public class EyesTestModel 8 | { 9 | /// 10 | /// 统计日期 11 | /// 12 | public DateTime Date { get; set; } 13 | /// 14 | /// 分数 15 | /// 16 | public double Score { get; set; } = 0; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Models/Options/AnimationModel.cs: -------------------------------------------------------------------------------- 1 | using static Project1.UI.Controls.Project1UIWindow; 2 | 3 | namespace ProjectEye.Core.Models.Options 4 | { 5 | public class AnimationModel 6 | { 7 | public int ID { get; set; } 8 | /// 9 | /// 动画名 10 | /// 11 | public string DisplayName { get; set; } 12 | /// 13 | /// 动画类型 14 | /// 15 | public AnimationType AnimationType { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Models/Options/BehaviorModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | using System.Xml.Serialization; 3 | 4 | namespace ProjectEye.Core.Models.Options 5 | { 6 | /// 7 | /// 行为模型 8 | /// 9 | [XmlRootAttribute("Behavior")] 10 | public class BehaviorModel 11 | { 12 | /// 13 | /// 全屏时跳过休息 14 | /// 15 | public bool IsFullScreenBreak { get; set; } = false; 16 | /// 17 | /// 是否启用进程跳过功能 18 | /// 19 | public bool IsBreakProgressList { get; set; } = false; 20 | /// 21 | /// 跳过进程名单 22 | /// 23 | public ObservableCollection BreakProgressList { get; set; } = new ObservableCollection(); 24 | /// 25 | /// 是否禁用跳过休息(为true时将不允许跳过而是直接进入休息 26 | /// 27 | public bool IsDisabledSkip { get; set; } = false; 28 | /// 29 | /// 超时未选择时进入休息状态 30 | /// 31 | public bool IsHandleTimeoutRest { get; set; } = true; 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Models/Options/ComboxModel.cs: -------------------------------------------------------------------------------- 1 | using System.Xml.Serialization; 2 | 3 | namespace ProjectEye.Core.Models.Options 4 | { 5 | [XmlRootAttribute("ComboxModel")] 6 | public class ComboxModel 7 | { 8 | public string DisplayName { get; set; } = "请选择"; 9 | 10 | public string Value { get; set; } = "0"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Models/Options/GeneralModel.cs: -------------------------------------------------------------------------------- 1 | using System.Xml.Serialization; 2 | 3 | namespace ProjectEye.Core.Models.Options 4 | { 5 | /// 6 | /// 通用设置模型 7 | /// 8 | [XmlRootAttribute("General")] 9 | public class GeneralModel 10 | { 11 | /// 12 | /// 开机启动 13 | /// 14 | public bool Startup { get; set; } = false; 15 | /// 16 | /// 不要提醒 17 | /// 18 | public bool Noreset { get; set; } = false; 19 | /// 20 | /// 统计数据 21 | /// 22 | public bool Data { get; set; } = false; 23 | /// 24 | /// 休息结束提示音 25 | /// 26 | public bool Sound { get; set; } = true; 27 | /// 28 | /// 离开监听 29 | /// 30 | public bool LeaveListener { get; set; } = false; 31 | /// 32 | /// 提醒间隔时间(单位:分钟) 33 | /// 34 | public int WarnTime { get; set; } = 20; 35 | /// 36 | /// 休息结束提示音效文件路径,为空时使用默认 37 | /// 38 | public string SoundPath { get; set; } = ""; 39 | /// 40 | /// 休息时间(单位:秒) 41 | /// 42 | public int RestTime { get; set; } = 20; 43 | /// 44 | /// 是否启用一周数据分析 45 | /// 46 | public bool IsWeekDataAnalysis { get; set; } = false; 47 | /// 48 | /// 是否是番茄时钟模式 49 | /// 50 | public bool IsTomatoMode { get; set; } = false; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Models/Options/KeyboardShortcutModel.cs: -------------------------------------------------------------------------------- 1 | using System.Xml.Serialization; 2 | 3 | namespace ProjectEye.Core.Models.Options 4 | { 5 | [XmlRootAttribute("KeyboardShortcut")] 6 | public class KeyboardShortcutModel 7 | { 8 | /// 9 | /// 休息快捷键 10 | /// 11 | public string Reset { get; set; } = ""; 12 | /// 13 | /// 不休息快捷键 14 | /// 15 | public string NoReset { get; set; } = ""; 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Models/Options/OptionsModel.cs: -------------------------------------------------------------------------------- 1 | using System.Xml.Serialization; 2 | 3 | namespace ProjectEye.Core.Models.Options 4 | { 5 | [XmlRootAttribute("Options")] 6 | public class OptionsModel 7 | { 8 | /// 9 | /// 通用设置 10 | /// 11 | public GeneralModel General { get; set; } 12 | /// 13 | /// 外观 14 | /// 15 | public StyleModel Style { get; set; } 16 | /// 17 | /// 快捷键 18 | /// 19 | public KeyboardShortcutModel KeyboardShortcuts { get; set; } 20 | /// 21 | /// 行为 22 | /// 23 | public BehaviorModel Behavior { get; set; } 24 | /// 25 | /// 番茄模式 26 | /// 27 | public TomatoModel Tomato { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Models/Options/ThemeModel.cs: -------------------------------------------------------------------------------- 1 | using System.Xml.Serialization; 2 | 3 | namespace ProjectEye.Core.Models.Options 4 | { 5 | [XmlRootAttribute("theme")] 6 | public class ThemeModel 7 | { 8 | public int ID { get; set; } 9 | public string DisplayName { get; set; } = "默认"; 10 | 11 | public string ThemeName { get; set; } = "Default"; 12 | public string ThemeColor { get; set; } = "#ffc83d"; 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Models/Options/TomatoModel.cs: -------------------------------------------------------------------------------- 1 | using System.Xml.Serialization; 2 | 3 | namespace ProjectEye.Core.Models.Options 4 | { 5 | [XmlRootAttribute("Tomato")] 6 | public class TomatoModel 7 | { 8 | /// 9 | /// 工作时间 10 | /// 11 | public int WorkMinutes { get; set; } = 25; 12 | /// 13 | /// 短休息 14 | /// 15 | public int ShortRestMinutes { get; set; } = 5; 16 | /// 17 | /// 长休息 18 | /// 19 | public int LongRestMinutes { get; set; } = 30; 20 | /// 21 | /// 是否开启工作开始提示音 22 | /// 23 | public bool IsWorkStartSound { get; set; } = true; 24 | /// 25 | /// 是否开启工作结束提示音 26 | /// 27 | public bool IsWorkEndSound { get; set; } = true; 28 | /// 29 | /// 工作开始提示音路径 30 | /// 31 | public string WorkStartSoundPath { get; set; } = ""; 32 | /// 33 | /// 工作结束提示音路径 34 | /// 35 | public string WorkEndSoundPath { get; set; } = ""; 36 | /// 37 | /// 是否开启交互模式 38 | /// 39 | public bool IsEnabledInteractiveModel { get; set; } = false; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Models/Statistic/StatisticListModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Xml.Serialization; 3 | 4 | namespace ProjectEye.Core.Models.Statistic 5 | { 6 | [XmlRootAttribute("StatisticList")] 7 | public class StatisticListModel 8 | { 9 | public List Data { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Models/Statistic/StatisticModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Xml.Serialization; 3 | 4 | namespace ProjectEye.Core.Models.Statistic 5 | { 6 | [XmlRootAttribute("Statistic")] 7 | public class StatisticModel 8 | { 9 | public int ID { get; set; } 10 | /// 11 | /// 统计日期 12 | /// 13 | public DateTime Date { get; set; } 14 | /// 15 | /// 用眼时长(单位小时) 16 | /// 17 | public double WorkingTime { get; set; } = 0; 18 | /// 19 | /// 休息时长(单位分钟) 20 | /// 21 | public double ResetTime { get; set; } = 0; 22 | /// 23 | /// 跳过次数 24 | /// 25 | public int SkipCount { get; set; } = 0; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Models/Statistic/TomatoModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ProjectEye.Core.Models.Statistic 4 | { 5 | /// 6 | /// 番茄工作数据统计实体模型 7 | /// 8 | public class TomatoModel 9 | { 10 | public int ID { get; set; } 11 | /// 12 | /// 统计日期 13 | /// 14 | public DateTime Date { get; set; } 15 | /// 16 | /// 番茄数,每完成4次工作并休息获得一个 17 | /// 18 | public int TomatoCount { get; set; } 19 | /// 20 | /// 重启次数 21 | /// 22 | public int RestartCount { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Models/WindowModel.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace ProjectEye.Core.Models 4 | { 5 | public class WindowModel 6 | { 7 | /// 8 | /// 窗口实例 9 | /// 10 | public Window window { get; set; } 11 | /// 12 | /// 所在屏幕(驱动名称) 13 | /// 14 | public string screen { get; set; } 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/ProcessHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace ProjectEye.Core 5 | { 6 | public class ProcessHelper 7 | { 8 | public static bool Run(string filename, string[] args) 9 | { 10 | try 11 | { 12 | string arguments = ""; 13 | foreach (string arg in args) 14 | { 15 | arguments += $"\"{arg}\" "; 16 | } 17 | arguments = arguments.Trim(); 18 | Process process = new Process(); 19 | ProcessStartInfo startInfo = new ProcessStartInfo(filename, arguments); 20 | process.StartInfo = startInfo; 21 | process.Start(); 22 | return true; 23 | } 24 | catch (Exception ex) 25 | { 26 | LogHelper.Warning(ex.ToString()); 27 | return false; 28 | } 29 | 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/RestEventHandler.cs: -------------------------------------------------------------------------------- 1 | namespace ProjectEye.Core 2 | { 3 | public delegate void RestEventHandler(object sender, int timed); 4 | } 5 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/ScreenExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using System.Windows; 4 | using System.Windows.Media; 5 | 6 | namespace ProjectEye.Core 7 | { 8 | public static class ScreenExtensions 9 | { 10 | public struct Dpi 11 | { 12 | public uint x { get; set; } 13 | public uint y { get; set; } 14 | 15 | } 16 | public static Dpi GetDpi(this System.Windows.Forms.Screen screen, DpiType dpiType) 17 | { 18 | Dpi dpi = new Dpi(); 19 | var pnt = new System.Drawing.Point(screen.Bounds.Left + 1, screen.Bounds.Top + 1); 20 | var mon = MonitorFromPoint(pnt, 2/*MONITOR_DEFAULTTONEAREST*/); 21 | 22 | Win32APIHelper.RtlGetVersion(out Win32APIHelper.OsVersionInfo osVersionInfo); 23 | if (osVersionInfo.MajorVersion != 10) 24 | { 25 | Matrix m = 26 | PresentationSource.FromVisual(Application.Current.MainWindow).CompositionTarget.TransformToDevice; 27 | dpi.x = (uint)m.M11 * 96; // notice it's divided by 96 already 28 | dpi.y = (uint)m.M22 * 96; // notice it's divided by 96 already 29 | 30 | } 31 | else 32 | { 33 | uint dpiX, dpiY; 34 | GetDpiForMonitor(mon, dpiType, out dpiX, out dpiY); 35 | dpi.x = dpiX; 36 | dpi.y = dpiY; 37 | } 38 | return dpi; 39 | 40 | } 41 | 42 | //https://msdn.microsoft.com/en-us/library/windows/desktop/dd145062(v=vs.85).aspx 43 | [DllImport("User32.dll")] 44 | private static extern IntPtr MonitorFromPoint([In] System.Drawing.Point pt, [In] uint dwFlags); 45 | 46 | //https://msdn.microsoft.com/en-us/library/windows/desktop/dn280510(v=vs.85).aspx 47 | [DllImport("Shcore.dll")] 48 | private static extern IntPtr GetDpiForMonitor([In] IntPtr hmonitor, [In] DpiType dpiType, [Out] out uint dpiX, [Out] out uint dpiY); 49 | } 50 | 51 | //https://msdn.microsoft.com/en-us/library/windows/desktop/dn280511(v=vs.85).aspx 52 | public enum DpiType 53 | { 54 | Effective = 0, 55 | Angular = 1, 56 | Raw = 2, 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Service/BackgroundWorkerService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | 5 | namespace ProjectEye.Core.Service 6 | { 7 | /// 8 | /// 管理整个程序的后台工作任务 9 | /// 10 | public class BackgroundWorkerService : IService 11 | { 12 | /// 13 | /// 获取当前是否正在执行后台任务 14 | /// 15 | public bool IsBusy 16 | { 17 | get 18 | { 19 | return backgroundWorker != null ? backgroundWorker.IsBusy : false; 20 | } 21 | } 22 | public delegate void EventHandler(); 23 | public event EventHandler OnCompleted, DoWork; 24 | 25 | private BackgroundWorker backgroundWorker; 26 | private List actions; 27 | 28 | public BackgroundWorkerService() 29 | { 30 | backgroundWorker = new BackgroundWorker(); 31 | backgroundWorker.DoWork += BackgroundWorker_DoWork; 32 | backgroundWorker.RunWorkerCompleted += BackgroundWorker_RunWorkerCompleted; 33 | actions = new List(); 34 | } 35 | public void Init() 36 | { 37 | DoWork?.Invoke(); 38 | } 39 | 40 | private void BackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) 41 | { 42 | OnCompleted?.Invoke(); 43 | } 44 | 45 | private void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e) 46 | { 47 | for (int i = 0; i < actions.Count; i++) 48 | { 49 | actions[i].Invoke(); 50 | actions.Remove(actions[i]); 51 | } 52 | } 53 | 54 | public void AddAction(Action action) 55 | { 56 | actions.Add(action); 57 | } 58 | 59 | public void Run() 60 | { 61 | if (!backgroundWorker.IsBusy) 62 | { 63 | DoWork?.Invoke(); 64 | backgroundWorker.RunWorkerAsync(); 65 | } 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Service/CacheService.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Caching; 2 | 3 | namespace ProjectEye.Core.Service 4 | { 5 | /// 6 | /// 内存缓存 Service 7 | /// 8 | public class CacheService : IService 9 | { 10 | private readonly ObjectCache cache; 11 | public CacheService() 12 | { 13 | cache = MemoryCache.Default; 14 | } 15 | public void Init() 16 | { 17 | 18 | } 19 | public object this[string key] 20 | { 21 | get 22 | { 23 | var result = cache.Get(key); 24 | if (result != null) 25 | { 26 | cache.Remove(key); 27 | } 28 | return result; 29 | } 30 | set 31 | { 32 | cache.Set(key, value, null); 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Service/IService.cs: -------------------------------------------------------------------------------- 1 | namespace ProjectEye.Core.Service 2 | { 3 | public interface IService 4 | { 5 | void Init(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Service/KeyboardShortcutsService.cs: -------------------------------------------------------------------------------- 1 | using ProjectEye.ViewModels; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Windows.Input; 5 | 6 | namespace ProjectEye.Core.Service 7 | { 8 | public class KeyboardShortcutsService : IService 9 | { 10 | private Dictionary keycommands; 11 | public KeyboardShortcutsService() 12 | { 13 | keycommands = new Dictionary(); 14 | } 15 | /// 16 | /// 设置快捷键命令 17 | /// 18 | /// 19 | /// 20 | public void Set(string key, Command command) 21 | { 22 | if (keycommands.ContainsKey(key)) 23 | { 24 | keycommands[key] = command; 25 | } 26 | else 27 | { 28 | keycommands.Add(key, command); 29 | } 30 | } 31 | public void Init() 32 | { 33 | 34 | } 35 | /// 36 | /// 执行快捷键命令 37 | /// 38 | /// 39 | public void Execute(KeyEventArgs keyEventArgs, object parameter = null) 40 | { 41 | string key; 42 | if (keyEventArgs.KeyboardDevice.Modifiers == ModifierKeys.Control && keyEventArgs.Key != Key.LeftCtrl) 43 | { 44 | key = "CTRL + " + keyEventArgs.Key.ToString(); 45 | } 46 | else 47 | { 48 | key = keyEventArgs.Key.ToString(); 49 | } 50 | if (keycommands.ContainsKey(key)) 51 | { 52 | Debug.WriteLine("执行快捷键命令:" + key); 53 | keycommands[key].Execute(parameter); 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Service/NotificationService.cs: -------------------------------------------------------------------------------- 1 | namespace ProjectEye.Core.Service 2 | { 3 | class NotificationService 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Service/RestService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Threading; 3 | 4 | namespace ProjectEye.Core.Service 5 | { 6 | public class RestService : IService 7 | { 8 | /// 9 | /// 计时器 10 | /// 11 | private readonly DispatcherTimer timer; 12 | 13 | private int timed = 0; 14 | 15 | /// 16 | /// 倒计时更改时发生 17 | /// 18 | public event RestEventHandler TimeChanged; 19 | /// 20 | /// 休息结束时发生 21 | /// 22 | public event RestEventHandler RestCompleted; 23 | /// 24 | /// 进入休息状态时发生 25 | /// 26 | public event RestEventHandler RestStart; 27 | private readonly ConfigService config; 28 | private readonly MainService main; 29 | public RestService( 30 | ConfigService config, 31 | MainService main) 32 | { 33 | this.config = config; 34 | this.main = main; 35 | //初始化计时器 36 | timer = new DispatcherTimer(); 37 | timer.Tick += new EventHandler(timer_Tick); 38 | timer.Interval = new TimeSpan(0, 0, 1); 39 | 40 | } 41 | 42 | 43 | 44 | public void Init() 45 | { 46 | } 47 | /// 48 | /// 开始休息 49 | /// 50 | public void Start() 51 | { 52 | timed = config.options.General.RestTime; 53 | timer.Start(); 54 | RestStart?.Invoke(this, timed); 55 | } 56 | /// 57 | /// 休息结束 58 | /// 59 | private void End() 60 | { 61 | WindowManager.Hide("TipWindow"); 62 | timer.Stop(); 63 | timed = config.options.General.RestTime; 64 | main.ReStartWorkTimerWatch(); 65 | OnResetCompleted(); 66 | 67 | } 68 | private void timer_Tick(object sender, EventArgs e) 69 | { 70 | if (timed <= 1) 71 | { 72 | End(); 73 | } 74 | else 75 | { 76 | timed--; 77 | OnTimeChanged(); 78 | } 79 | } 80 | private void OnTimeChanged() 81 | { 82 | TimeChanged?.Invoke(this, timed); 83 | } 84 | private void OnResetCompleted() 85 | { 86 | RestCompleted?.Invoke(this, 0); 87 | } 88 | 89 | 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Service/ScreenService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | using System.Windows.Interop; 4 | using System.Windows.Threading; 5 | 6 | namespace ProjectEye.Core.Service 7 | { 8 | /// 9 | /// 屏幕监听服务 10 | /// 用于处理插拔显示器时创建和刷新提示窗口 11 | /// 12 | public class ScreenService : IService 13 | { 14 | private const int WM_DISPLAYCHANGE = 0x007e; 15 | private const int ga = 0x020A; 16 | private readonly DispatcherTimer timer; 17 | private HwndSource source; 18 | private readonly HwndSourceHook hwndSourceHook; 19 | public ScreenService() 20 | { 21 | hwndSourceHook = new HwndSourceHook(WndProc); 22 | 23 | timer = new DispatcherTimer(); 24 | timer.Tick += new EventHandler(timer_Tick); 25 | timer.Interval = new TimeSpan(0, 0, 3); 26 | 27 | } 28 | 29 | private void timer_Tick(object sender, EventArgs e) 30 | { 31 | timer.Stop(); 32 | WindowManager.UpdateAllScreensWindow("TipWindow", true); 33 | } 34 | 35 | public void Init() 36 | { 37 | //创建一个隐藏的窗口,用于接收显示器拔插消息 38 | Window hookWindow = new Window(); 39 | hookWindow.Width = 0; 40 | hookWindow.Height = 0; 41 | hookWindow.ShowInTaskbar = false; 42 | hookWindow.WindowStyle = WindowStyle.None; 43 | //hookWindow.WindowState = WindowState.Minimized; 44 | hookWindow.Visibility = Visibility.Hidden; 45 | hookWindow.SourceInitialized += new EventHandler(hookWindow_SourceInitialized); 46 | hookWindow.Show(); 47 | } 48 | 49 | public void Dispose() 50 | { 51 | if (source != null) 52 | { 53 | source.RemoveHook(hwndSourceHook); 54 | source.Dispose(); 55 | } 56 | } 57 | 58 | private void hookWindow_SourceInitialized(object sender, EventArgs e) 59 | { 60 | source = HwndSource.FromHwnd(new WindowInteropHelper((Window)sender).Handle); 61 | source.AddHook(hwndSourceHook); 62 | 63 | } 64 | 65 | 66 | 67 | private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 68 | { 69 | switch (msg) 70 | { 71 | case WM_DISPLAYCHANGE: 72 | timer.Start(); 73 | break; 74 | } 75 | return IntPtr.Zero; 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Service/ServiceCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | 6 | namespace ProjectEye.Core.Service 7 | { 8 | public class ServiceCollection 9 | { 10 | /// 11 | /// 已创建的实例 12 | /// 13 | private IList instanceList; 14 | public ServiceCollection() 15 | { 16 | instanceList = new List(); 17 | } 18 | public void Add() where T : IService 19 | { 20 | var type = typeof(T); 21 | CreateInstance(type); 22 | } 23 | public void AddInstance(object obj) 24 | { 25 | instanceList.Add(obj); 26 | } 27 | public void Initialize() 28 | { 29 | foreach (var instance in instanceList) 30 | { 31 | MethodInfo method = instance.GetType().GetMethod("Init"); 32 | if (method != null) 33 | { 34 | method.Invoke(instance, null); 35 | } 36 | } 37 | } 38 | //public void AddViews() 39 | //{ 40 | // string assemblyName = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name; 41 | // string viewsNameSpace = assemblyName + ".Views"; 42 | // var viewTypeList = from t in Assembly.GetExecutingAssembly().GetTypes() 43 | // where t.IsClass && t.Namespace == viewsNameSpace 44 | // select t; 45 | // foreach (var viewType in viewTypeList) 46 | // { 47 | 48 | // } 49 | // //q.ToList().ForEach(t => Debug.WriteLine(t.Name)); 50 | //} 51 | /// 52 | /// 创建实例 53 | /// 54 | private void CreateInstance(Type type) 55 | { 56 | var constructorInfoObj = type.GetConstructors()[0]; 57 | var constructorParameters = constructorInfoObj.GetParameters(); 58 | int constructorParametersLength = constructorParameters.Length; 59 | Type[] types = new Type[constructorParametersLength]; 60 | object[] objs = new object[constructorParametersLength]; 61 | for (int i = 0; i < constructorParametersLength; i++) 62 | { 63 | string typeFullName = constructorParameters[i].ParameterType.FullName; 64 | Type t = Type.GetType(typeFullName); 65 | types[i] = t; 66 | 67 | objs[i] = GetInstance(typeFullName); 68 | 69 | } 70 | ConstructorInfo ctor = type.GetConstructor(types); 71 | object instance = ctor.Invoke(objs); 72 | if (instance != null) 73 | { 74 | instanceList.Add(instance); 75 | 76 | } 77 | } 78 | /// 79 | /// 获取实例 80 | /// 81 | /// 82 | /// 83 | public object GetInstance(string typeFullName) 84 | { 85 | var result = instanceList.Where(m => m.GetType().FullName == typeFullName); 86 | if (result.Count() > 0) 87 | { 88 | return result.Single(); 89 | } 90 | return null; 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/Service/SystemResourcesService.cs: -------------------------------------------------------------------------------- 1 | using ProjectEye.Core.Models.Options; 2 | using System.Collections.Generic; 3 | using System.Windows; 4 | 5 | namespace ProjectEye.Core.Service 6 | { 7 | public class SystemResourcesService : IService 8 | { 9 | public List Themes { get; set; } 10 | public List PreAlertActions { get; set; } 11 | public List Animations { get; set; } 12 | public List Languages { get; set; } 13 | 14 | public void Init() 15 | { 16 | Themes = new List(); 17 | PreAlertActions = new List(); 18 | Animations = new List(); 19 | Languages = new List(); 20 | 21 | Themes.Add(new ThemeModel() 22 | { 23 | DisplayName = $"{Application.Current.Resources["Lang_Default"]}", 24 | ThemeName = "Blue", 25 | ThemeColor = "#4F6BED" 26 | }); 27 | Themes.Add(new ThemeModel() 28 | { 29 | DisplayName = $"{Application.Current.Resources["Lang_Dark"]}", 30 | ThemeName = "Dark", 31 | ThemeColor = "#4F6BED" 32 | }); 33 | 34 | PreAlertActions.Add(new ComboxModel() 35 | { 36 | DisplayName = $"{Application.Current.Resources["Lang_Startthebreak"]}", 37 | Value = "1" 38 | }); 39 | PreAlertActions.Add(new ComboxModel() 40 | { 41 | DisplayName = $"{Application.Current.Resources["Lang_Skipthebreak"]}", 42 | Value = "2" 43 | }); 44 | //预置动画 45 | Animations.Add(new AnimationModel() 46 | { 47 | ID = 0, 48 | AnimationType = Project1.UI.Controls.Project1UIWindow.AnimationType.None, 49 | DisplayName = $"{Application.Current.Resources["Lang_None"]}" 50 | }); 51 | Animations.Add(new AnimationModel() 52 | { 53 | ID = 1, 54 | AnimationType = Project1.UI.Controls.Project1UIWindow.AnimationType.RightBottomScale, 55 | DisplayName = $"{Application.Current.Resources["Lang_Zoomfrombottom-rightcorner"]}" 56 | }); 57 | Animations.Add(new AnimationModel() 58 | { 59 | ID = 2, 60 | AnimationType = Project1.UI.Controls.Project1UIWindow.AnimationType.Opacity, 61 | DisplayName = $"{Application.Current.Resources["Lang_Fadeinandfadeout"]}" 62 | }); 63 | Animations.Add(new AnimationModel() 64 | { 65 | ID = 3, 66 | AnimationType = Project1.UI.Controls.Project1UIWindow.AnimationType.Cool, 67 | DisplayName = $"Cool" 68 | }); 69 | //语言 70 | Languages.Add(new ComboxModel() 71 | { 72 | DisplayName = "中文", 73 | Value = "zh" 74 | }); 75 | Languages.Add(new ComboxModel() 76 | { 77 | DisplayName = "English", 78 | Value = "en" 79 | }); 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/ShortcutHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Reflection; 4 | 5 | namespace ProjectEye.Core 6 | { 7 | public class ShortcutHelper 8 | { 9 | /// 10 | /// 为本程序创建一个快捷方式。 11 | /// 12 | /// 快捷方式的完全限定路径。 13 | /// 快捷方式启动程序时需要使用的参数。 14 | private static bool CreateShortcut(string lnkFilePath, string args) 15 | { 16 | try 17 | { 18 | var shellType = Type.GetTypeFromProgID("WScript.Shell"); 19 | dynamic shell = Activator.CreateInstance(shellType); 20 | var shortcut = shell.CreateShortcut(lnkFilePath); 21 | shortcut.TargetPath = Assembly.GetEntryAssembly().Location; 22 | shortcut.Arguments = args; 23 | shortcut.WorkingDirectory = AppDomain.CurrentDomain.SetupInformation.ApplicationBase; 24 | shortcut.Save(); 25 | return true; 26 | } 27 | catch (Exception e) 28 | { 29 | LogHelper.Warning(e.ToString()); 30 | return false; 31 | } 32 | } 33 | /// 34 | /// 设置开机启动 35 | /// 36 | /// 37 | /// 38 | public static bool SetStartup(bool startup = true) 39 | { 40 | string path = Path.Combine( 41 | Environment.GetFolderPath(Environment.SpecialFolder.Startup), 42 | "Project Eye.lnk"); 43 | if (startup) 44 | { 45 | if (File.Exists(path)) 46 | { 47 | return true; 48 | } 49 | return CreateShortcut(path, ""); 50 | } 51 | else 52 | { 53 | if (File.Exists(path)) 54 | { 55 | File.Delete(path); 56 | } 57 | return true; 58 | } 59 | } 60 | /// 61 | /// 创建桌面快捷方式 62 | /// 63 | /// 64 | /// 65 | public static bool CreateDesktopShortcut() 66 | { 67 | return CreateShortcut(Path.Combine( 68 | Environment.GetFolderPath(Environment.SpecialFolder.Desktop), 69 | "Project Eye.lnk"), ""); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/TypeExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace ProjectEye.Core 2 | { 3 | public class TypeExtensions 4 | { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Core/XmlExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Xml; 4 | using System.Xml.Serialization; 5 | 6 | namespace ProjectEye.Core 7 | { 8 | public class XmlExtensions 9 | { 10 | private readonly string file; 11 | public XmlExtensions(string file) 12 | { 13 | this.file = file; 14 | } 15 | public object ToModel(Type type) 16 | { 17 | try 18 | { 19 | XmlSerializer serializer = new XmlSerializer(type); 20 | XmlReader xmlReader = XmlReader.Create(file); 21 | if (serializer.CanDeserialize(xmlReader)) 22 | { 23 | var des = serializer.Deserialize(xmlReader); 24 | xmlReader.Dispose(); 25 | return des; 26 | } 27 | else 28 | { 29 | xmlReader.Dispose(); 30 | return null; 31 | } 32 | } 33 | catch (Exception e) 34 | { 35 | LogHelper.Warning(e.ToString()); 36 | return null; 37 | } 38 | 39 | } 40 | public bool Save(object data) 41 | { 42 | try 43 | { 44 | string dir = Path.GetDirectoryName(file); 45 | if (!Directory.Exists(dir)) 46 | { 47 | Directory.CreateDirectory(dir); 48 | } 49 | XmlSerializer serializer = new XmlSerializer(data.GetType()); 50 | TextWriter writer = new StreamWriter(file); 51 | serializer.Serialize(writer, data); 52 | writer.Close(); 53 | return true; 54 | } 55 | catch (Exception e) 56 | { 57 | LogHelper.Warning(e.ToString()); 58 | return false; 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Database/SQLiteConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using System.Data.Entity.Core.Common; 3 | using System.Data.SQLite; 4 | using System.Data.SQLite.EF6; 5 | 6 | namespace ProjectEye.Database 7 | { 8 | public class SQLiteConfiguration : DbConfiguration 9 | { 10 | public SQLiteConfiguration() 11 | { 12 | SetProviderFactory("System.Data.SQLite", SQLiteFactory.Instance); 13 | SetProviderFactory("System.Data.SQLite.EF6", SQLiteProviderFactory.Instance); 14 | SetProviderServices("System.Data.SQLite", (DbProviderServices)SQLiteProviderFactory.Instance.GetService(typeof(DbProviderServices))); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Database/StatisticContext.cs: -------------------------------------------------------------------------------- 1 | using ProjectEye.Core.Models.Statistic; 2 | using System.Data.Entity; 3 | using System.Data.SQLite; 4 | 5 | namespace ProjectEye.Database 6 | { 7 | public class StatisticContext : DbContext 8 | { 9 | /// 10 | /// 统计数据 11 | /// 12 | public DbSet Statistics { get; set; } 13 | /// 14 | /// 番茄数据 15 | /// 16 | public DbSet Tomatos { get; set; } 17 | // public StatisticContext(string n) 18 | //: base("StatisticContext") 19 | // { 20 | // DbConfiguration.SetConfiguration(new SQLiteConfiguration()); 21 | // } 22 | public StatisticContext() 23 | : base(new SQLiteConnection() 24 | { 25 | ConnectionString = "Data Source=.\\Data\\data.db" 26 | }, true) 27 | { 28 | DbConfiguration.SetConfiguration(new SQLiteConfiguration()); 29 | } 30 | 31 | protected override void OnModelCreating(DbModelBuilder modelBuilder) 32 | { 33 | var model = modelBuilder.Build(Database.Connection); 34 | new SQLiteBuilder(model).Handle(); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/Local/ProjectEye/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | SQLite.Interop 5 | 6 | 7 | SQLite.Interop 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Models/EyesTestModel.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace ProjectEye.Models 4 | { 5 | public class EyesTestModel : UINotifyPropertyChanged 6 | { 7 | private int Score_ = 0; 8 | public int Score 9 | { 10 | get 11 | { 12 | 13 | return Score_; 14 | } 15 | 16 | set 17 | { 18 | Score_ = value; 19 | OnPropertyChanged(); 20 | } 21 | } 22 | private string ScoreInfo_ = ""; 23 | public string ScoreInfo 24 | { 25 | get 26 | { 27 | 28 | return ScoreInfo_; 29 | } 30 | 31 | set 32 | { 33 | ScoreInfo_ = value; 34 | OnPropertyChanged(); 35 | } 36 | } 37 | 38 | private int Index_ = 1; 39 | public int Index 40 | { 41 | get 42 | { 43 | 44 | return Index_; 45 | } 46 | 47 | set 48 | { 49 | Index_ = value; 50 | OnPropertyChanged(); 51 | } 52 | } 53 | 54 | private double FontSize_; 55 | public double FontSize 56 | { 57 | get 58 | { 59 | 60 | return FontSize_; 61 | } 62 | 63 | set 64 | { 65 | FontSize_ = value; 66 | OnPropertyChanged(); 67 | } 68 | } 69 | 70 | private Visibility InfoVisibility_ = Visibility.Visible; 71 | public Visibility InfoVisibility 72 | { 73 | get 74 | { 75 | return InfoVisibility_; 76 | } 77 | set 78 | { 79 | InfoVisibility_ = value; 80 | OnPropertyChanged(); 81 | } 82 | } 83 | 84 | private Visibility TestVisibility_ = Visibility.Hidden; 85 | public Visibility TestVisibility 86 | { 87 | get 88 | { 89 | return TestVisibility_; 90 | } 91 | set 92 | { 93 | TestVisibility_ = value; 94 | OnPropertyChanged(); 95 | } 96 | } 97 | private Visibility ScoreVisibility_ = Visibility.Hidden; 98 | public Visibility ScoreVisibility 99 | { 100 | get 101 | { 102 | return ScoreVisibility_; 103 | } 104 | set 105 | { 106 | ScoreVisibility_ = value; 107 | OnPropertyChanged(); 108 | } 109 | } 110 | 111 | public double[] EyesData_; 112 | public double[] EyesData 113 | { 114 | get 115 | { 116 | return EyesData_; 117 | } 118 | set 119 | { 120 | EyesData_ = value; 121 | OnPropertyChanged(); 122 | } 123 | } 124 | public string[] Labels_; 125 | public string[] Labels 126 | { 127 | get 128 | { 129 | return Labels_; 130 | } 131 | set 132 | { 133 | Labels_ = value; 134 | OnPropertyChanged(); 135 | } 136 | } 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Models/TipViewDesignModel.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls; 2 | 3 | namespace ProjectEye.Models 4 | { 5 | public class TipViewDesignModel : UINotifyPropertyChanged 6 | { 7 | private Project1UIDesignContainer Container_; 8 | public Project1UIDesignContainer Container 9 | { 10 | get 11 | { 12 | return Container_; 13 | } 14 | set 15 | { 16 | Container_ = value; 17 | OnPropertyChanged("Container"); 18 | } 19 | } 20 | //是否显示模态弹窗 21 | private bool ShowModal_ = false; 22 | public bool ShowModal 23 | { 24 | get 25 | { 26 | return ShowModal_; 27 | } 28 | set 29 | { 30 | ShowModal_ = value; 31 | OnPropertyChanged(); 32 | } 33 | } 34 | //模态弹窗文本 35 | private string ModalText_ = "设置已更新"; 36 | public string ModalText 37 | { 38 | get 39 | { 40 | return ModalText_; 41 | } 42 | set 43 | { 44 | ModalText_ = value; 45 | OnPropertyChanged(); 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Models/UI/UIDesignModel.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls.Models; 2 | using System.Collections.Generic; 3 | 4 | namespace ProjectEye.Models.UI 5 | { 6 | public class UIDesignModel 7 | { 8 | /// 9 | /// 容器属性 10 | /// 11 | public ContainerModel ContainerAttr { get; set; } 12 | /// 13 | /// 元素集合 14 | /// 15 | public List Elements { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Models/UINotifyPropertyChanged.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace ProjectEye.Models 4 | { 5 | public class UINotifyPropertyChanged : INotifyPropertyChanged 6 | { 7 | public event PropertyChangedEventHandler PropertyChanged; 8 | 9 | public void OnPropertyChanged(string propertyName = "") 10 | { 11 | 12 | PropertyChangedEventHandler handler = PropertyChanged; 13 | if (handler != null) 14 | { 15 | handler.Invoke(this, new PropertyChangedEventArgs(propertyName)); 16 | } 17 | 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Local/ProjectEye/Models/UpdateModel.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace ProjectEye.Models 4 | { 5 | public class UpdateModel : UINotifyPropertyChanged 6 | { 7 | private bool PlayProcess_ = false; 8 | public bool PlayProcess 9 | { 10 | get { return PlayProcess_; } 11 | set { PlayProcess_ = value; OnPropertyChanged(); } 12 | } 13 | 14 | private Visibility UpVisibility_ = Visibility.Collapsed; 15 | 16 | public Visibility UpVisibility 17 | { 18 | get { return UpVisibility_; } 19 | set { UpVisibility_ = value; OnPropertyChanged(); } 20 | } 21 | 22 | private Visibility OpenUrlVisibility_ = Visibility.Collapsed; 23 | 24 | public Visibility OpenUrlVisibility 25 | { 26 | get { return OpenUrlVisibility_; } 27 | set { OpenUrlVisibility_ = value; OnPropertyChanged(); } 28 | } 29 | private Visibility InstallVisibility_ = Visibility.Collapsed; 30 | 31 | public Visibility InstallVisibility 32 | { 33 | get { return InstallVisibility_; } 34 | set { InstallVisibility_ = value; OnPropertyChanged(); } 35 | } 36 | 37 | private string Tip_ = "Loading..."; 38 | public string Tip 39 | { 40 | get { return Tip_; } 41 | set { Tip_ = value; OnPropertyChanged("Tip"); } 42 | } 43 | 44 | private string VersionInfo_ = ""; 45 | public string VersionInfo 46 | { 47 | get { return VersionInfo_; } 48 | set { VersionInfo_ = value; OnPropertyChanged("VersionInfo"); } 49 | } 50 | 51 | private string VersionUrl_ = ""; 52 | public string VersionUrl 53 | { 54 | get { return VersionUrl_; } 55 | set { VersionUrl_ = value; OnPropertyChanged("VersionUrl"); } 56 | } 57 | //是否显示模态弹窗 58 | private bool ShowModal_ = false; 59 | public bool ShowModal 60 | { 61 | get 62 | { 63 | return ShowModal_; 64 | } 65 | set 66 | { 67 | ShowModal_ = value; 68 | OnPropertyChanged(); 69 | } 70 | } 71 | //模态弹窗文本 72 | private string ModalText_ = ""; 73 | public string ModalText 74 | { 75 | get 76 | { 77 | return ModalText_; 78 | } 79 | set 80 | { 81 | ModalText_ = value; 82 | OnPropertyChanged(); 83 | } 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | using System.Windows; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Project Eye")] 9 | [assembly: AssemblyDescription("基于20-20-20规则的用眼提示程序")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Plan shit")] 12 | [assembly: AssemblyProduct("Project Eye")] 13 | [assembly: AssemblyCopyright("Copyright © 2019 Plan shit")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | //若要开始生成可本地化的应用程序,请设置 23 | //.csproj 文件中的 CultureYouAreCodingWith 24 | //例如,如果您在源文件中使用的是美国英语, 25 | //使用的是美国英语,请将 设置为 en-US。 然后取消 26 | //对以下 NeutralResourceLanguage 特性的注释。 更新 27 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 28 | 29 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 30 | 31 | 32 | [assembly: ThemeInfo( 33 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置 34 | //(未在页面中找到资源时使用, 35 | //或应用程序资源字典中找到时使用) 36 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 37 | //(未在页面中找到资源时使用, 38 | //、应用程序或任何主题专用资源字典中找到时使用) 39 | )] 40 | 41 | 42 | // 程序集的版本信息由下列四个值组成: 43 | // 44 | // 主版本 45 | // 次版本 46 | // 生成号 47 | // 修订号 48 | // 49 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 50 | //通过使用 "*",如下所示: 51 | // [assembly: AssemblyVersion("1.0.*")] 52 | [assembly: AssemblyVersion("1.4.3")] 53 | [assembly: AssemblyFileVersion("1.0.0.1")] 54 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Converters/NumberToStringConver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace ProjectEye.Resources.Converters 6 | { 7 | /// 8 | /// 滑块值转换为宽度 9 | /// 10 | public class NumberToStringConver : IValueConverter 11 | { 12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 13 | { 14 | 15 | return value.ToString(); 16 | } 17 | 18 | 19 | 20 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 21 | { 22 | throw new NotImplementedException(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Converters/SliderValueToWidthConver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace ProjectEye.Resources.Converters 6 | { 7 | /// 8 | /// 滑块值转换为宽度 9 | /// 10 | public class SliderValueToWidthConver : IMultiValueConverter 11 | { 12 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 13 | { 14 | double sliderValue = (double)values[0]; 15 | double sliderMaxValue = (double)values[1]; 16 | double sliderWidth = (double)values[2]; 17 | double result = 0; 18 | if (sliderWidth > 0) 19 | { 20 | result = sliderValue / sliderMaxValue * sliderWidth; 21 | } 22 | return result; 23 | } 24 | 25 | public object ConvertBack(object value, Type[] targetType, object parameter, CultureInfo culture) 26 | { 27 | throw new NotImplementedException(); 28 | } 29 | 30 | object[] IMultiValueConverter.ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) 31 | { 32 | throw new NotImplementedException(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Fonts/FabExMDL2.3.36.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/Fonts/FabExMDL2.3.36.ttf -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Themes/Blue/ContextMenu.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 41 | 42 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Themes/Blue/Images/tipImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/Themes/Blue/Images/tipImage.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Themes/Blue/Style.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Themes/Blue/TextBlock.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 11 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Themes/Blue/ToolTip.xaml: -------------------------------------------------------------------------------- 1 |  4 | 41 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Themes/Dark/CheckButton.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Themes/Dark/ContextMenu.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 37 | 38 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Themes/Dark/DatePicker/ItemList.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Themes/Dark/Images/tipImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/Themes/Dark/Images/tipImage.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Themes/Dark/Style.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Themes/Dark/TextBlock.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 11 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/Themes/Dark/ToolTip.xaml: -------------------------------------------------------------------------------- 1 |  4 | 41 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/break.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/break.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/coffee_lover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/coffee_lover.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/coffee_lover2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/coffee_lover2.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/conference_presentation__monochromatic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/conference_presentation__monochromatic.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/creative_process_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/creative_process_.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/desktop-computer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/desktop-computer.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/dizzy.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/dizzy.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/ecology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/ecology.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/files_and_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/files_and_folder.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/gear_2699.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/gear_2699.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/green-tomato-1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/green-tomato-1.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/green-tomato-10.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/green-tomato-10.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/green-tomato-2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/green-tomato-2.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/green-tomato-3.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/green-tomato-3.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/green-tomato-4.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/green-tomato-4.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/green-tomato-5.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/green-tomato-5.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/green-tomato-6.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/green-tomato-6.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/green-tomato-7.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/green-tomato-7.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/green-tomato-8.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/green-tomato-8.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/green-tomato-9.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/green-tomato-9.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/growth_monochromatic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/growth_monochromatic.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/hammer-and-wrench_1f6e0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/hammer-and-wrench_1f6e0.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/office_work_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/office_work_.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/office_work_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/office_work_2.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/overheated.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/overheated.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/product_manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/product_manager.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/red-tomato-1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/red-tomato-1.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/red-tomato-10.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/red-tomato-10.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/red-tomato-2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/red-tomato-2.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/red-tomato-3.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/red-tomato-3.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/red-tomato-4.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/red-tomato-4.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/red-tomato-5.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/red-tomato-5.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/red-tomato-6.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/red-tomato-6.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/red-tomato-7.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/red-tomato-7.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/red-tomato-8.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/red-tomato-8.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/red-tomato-9.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/red-tomato-9.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/relentless.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/relentless.wav -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/rest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/rest.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/sleeping.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/sleeping.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/sunglasses.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/sunglasses.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/tomato.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/tomato.ico -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/tomato.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/tomato.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/web_developer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/web_developer.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/web_developer2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/web_developer2.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/Resources/work.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/Resources/work.png -------------------------------------------------------------------------------- /src/Local/ProjectEye/ViewModels/AsyncCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using System.Windows.Input; 4 | 5 | namespace ProjectEye.ViewModels 6 | { 7 | public class AsyncCommand : ICommand 8 | { 9 | public event EventHandler CanExecuteChanged; 10 | 11 | private bool _isExecuting; 12 | private readonly Func _execute; 13 | private readonly Func _canExecute; 14 | 15 | public AsyncCommand(Func execute, Func canExecute = null) 16 | { 17 | _execute = execute; 18 | _canExecute = canExecute; 19 | } 20 | 21 | public bool CanExecute(T parameter) 22 | { 23 | return !_isExecuting && (_canExecute?.Invoke(parameter) ?? true); 24 | } 25 | 26 | public async Task ExecuteAsync(T parameter) 27 | { 28 | if (CanExecute(parameter)) 29 | { 30 | try 31 | { 32 | _isExecuting = true; 33 | await _execute(parameter); 34 | } 35 | finally 36 | { 37 | _isExecuting = false; 38 | } 39 | } 40 | 41 | RaiseCanExecuteChanged(); 42 | } 43 | 44 | public void RaiseCanExecuteChanged() 45 | { 46 | CanExecuteChanged?.Invoke(this, EventArgs.Empty); 47 | } 48 | 49 | public bool CanExecute(object parameter) 50 | { 51 | return CanExecute((T)parameter); 52 | } 53 | 54 | async void ICommand.Execute(object parameter) 55 | { 56 | await ExecuteAsync((T)parameter); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/ViewModels/Command.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Input; 3 | 4 | namespace ProjectEye.ViewModels 5 | { 6 | public class Command : ICommand 7 | { 8 | private Action _action; 9 | 10 | public Command(Action action) 11 | { 12 | _action = action; 13 | } 14 | 15 | 16 | #region ICommand Members 17 | public bool CanExecute(object parameter) 18 | { 19 | return true; 20 | } 21 | #pragma warning disable CS0067 // 从不使用事件“Command.CanExecuteChanged” 22 | public event EventHandler CanExecuteChanged; 23 | #pragma warning restore CS0067 // 从不使用事件“Command.CanExecuteChanged” 24 | public void Execute(object parameter) 25 | { 26 | if (parameter != null) 27 | { 28 | _action(parameter); 29 | } 30 | else 31 | { 32 | _action("NULL"); 33 | } 34 | OnExecuted(); 35 | } 36 | public delegate void ExecutedHandler(object parameter); 37 | public event ExecutedHandler Executed; 38 | public void OnExecuted() 39 | { 40 | Executed?.Invoke(null); 41 | } 42 | #endregion 43 | } 44 | } -------------------------------------------------------------------------------- /src/Local/ProjectEye/ViewModels/ContributorsViewModel.cs: -------------------------------------------------------------------------------- 1 | using ProjectEye.Core; 2 | using ProjectEye.Core.Service; 3 | using ProjectEye.Models; 4 | using System; 5 | using System.Diagnostics; 6 | using System.Reflection; 7 | using System.Windows; 8 | 9 | namespace ProjectEye.ViewModels 10 | { 11 | public class ContributorsViewModel 12 | { 13 | 14 | public Command openurlCommand { get; set; } 15 | 16 | public ContributorsViewModel() 17 | { 18 | 19 | openurlCommand = new Command(new Action(openurlCommand_action)); 20 | } 21 | 22 | 23 | private void openurlCommand_action(object obj) 24 | { 25 | Process.Start(new ProcessStartInfo(obj.ToString())); 26 | } 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/ViewModels/IViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace ProjectEye.ViewModels 4 | { 5 | interface IViewModel 6 | { 7 | /// 8 | /// 所在屏幕 9 | /// 10 | string ScreenName { get; set; } 11 | /// 12 | /// 窗口实例 13 | /// 14 | Window WindowInstance { get; set; } 15 | event ViewModelEventHandler ChangedEvent; 16 | void OnChanged(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/ViewModels/ViewModelEventHandler.cs: -------------------------------------------------------------------------------- 1 | namespace ProjectEye.ViewModels 2 | { 3 | public delegate void ViewModelEventHandler(); 4 | } 5 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Views/ContributorsWindow.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | mr-south-guo 20 | 21 | 22 | 23 | hiliangchunrui 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Views/ContributorsWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Data; 10 | using System.Windows.Documents; 11 | using System.Windows.Input; 12 | using System.Windows.Media; 13 | using System.Windows.Media.Imaging; 14 | using System.Windows.Shapes; 15 | 16 | namespace ProjectEye.Views 17 | { 18 | /// 19 | /// ContributorsWindow.xaml 的交互逻辑 20 | /// 21 | public partial class ContributorsWindow : Project1UIWindow 22 | { 23 | public ContributorsWindow() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Views/EyesTestWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls; 2 | 3 | namespace ProjectEye.Views 4 | { 5 | /// 6 | /// EyesTestWindow.xaml 的交互逻辑 7 | /// 8 | public partial class EyesTestWindow : Project1UIWindow 9 | { 10 | public EyesTestWindow() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Views/OptionsWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls; 2 | 3 | namespace ProjectEye.Views 4 | { 5 | /// 6 | /// OptionsWindow.xaml 的交互逻辑 7 | /// 8 | public partial class OptionsWindow : Project1UIWindow 9 | { 10 | public OptionsWindow() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Views/StatisticWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls; 2 | 3 | namespace ProjectEye.Views 4 | { 5 | /// 6 | /// StatisticWindow.xaml 的交互逻辑 7 | /// 8 | public partial class StatisticWindow : Project1UIWindow 9 | { 10 | public StatisticWindow() 11 | { 12 | InitializeComponent(); 13 | 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Views/TipViewDesignWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls; 2 | 3 | namespace ProjectEye.Views 4 | { 5 | /// 6 | /// TipWindow.xaml 的交互逻辑 7 | /// 8 | public partial class TipViewDesignWindow : Project1UIWindow 9 | { 10 | public TipViewDesignWindow() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Views/TipWindow.xaml: -------------------------------------------------------------------------------- 1 |  17 | 19 | 20 | 67 | 68 | 79 | 80 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Views/TipWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls; 2 | 3 | namespace ProjectEye.Views 4 | { 5 | /// 6 | /// TipWindow.xaml 的交互逻辑 7 | /// 8 | public partial class TipWindow : Project1UIWindow 9 | { 10 | public TipWindow() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/Views/UpdateWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Controls; 2 | 3 | namespace ProjectEye.Views 4 | { 5 | /// 6 | /// UpdateWindow.xaml 的交互逻辑 7 | /// 8 | public partial class UpdateWindow : Project1UIWindow 9 | { 10 | public UpdateWindow() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Local/ProjectEye/costura32/SQLite.Interop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/costura32/SQLite.Interop.dll -------------------------------------------------------------------------------- /src/Local/ProjectEye/costura64/SQLite.Interop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEye/costura64/SQLite.Interop.dll -------------------------------------------------------------------------------- /src/Local/ProjectEyeBug/App.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Local/ProjectEyeBug/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using Project1.UI.Cores; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Configuration; 5 | using System.Data; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | using System.Windows; 9 | 10 | namespace ProjectEyeBug 11 | { 12 | /// 13 | /// App.xaml 的交互逻辑 14 | /// 15 | public partial class App : Application 16 | { 17 | private System.Threading.Mutex mutex; 18 | public App() 19 | { 20 | Theme theme = new Theme(); 21 | UIDefaultSetting.DefaultThemeName = "blue"; 22 | UIDefaultSetting.DefaultThemePath = "/ProjectEye;component/Resources/Themes/"; 23 | theme.ApplyTheme(); 24 | } 25 | protected override void OnStartup(StartupEventArgs e) 26 | { 27 | base.OnStartup(e); 28 | #if !DEBUG 29 | if ( 30 | e.Args.Length == 0 || 31 | IsRuned() 32 | ) 33 | { 34 | Shutdown(); 35 | } 36 | 37 | #endif 38 | 39 | } 40 | #region 获取当前程序是否已运行 41 | /// 42 | /// 获取当前程序是否已运行 43 | /// 44 | private bool IsRuned() 45 | { 46 | bool ret; 47 | mutex = new System.Threading.Mutex(true, "ProjectEyeBug", out ret); 48 | if (!ret) 49 | { 50 | #if !DEBUG 51 | return true; 52 | 53 | #endif 54 | } 55 | return false; 56 | } 57 | #endregion 58 | 59 | 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Local/ProjectEyeBug/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/Local/ProjectEyeBug/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/Local/ProjectEyeBug/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Data; 10 | using System.Windows.Documents; 11 | using System.Windows.Input; 12 | using System.Windows.Media; 13 | using System.Windows.Media.Imaging; 14 | using System.Windows.Navigation; 15 | using System.Windows.Shapes; 16 | 17 | namespace ProjectEyeBug 18 | { 19 | /// 20 | /// MainWindow.xaml 的交互逻辑 21 | /// 22 | public partial class MainWindow : Project1.UI.Controls.Project1UIWindow 23 | { 24 | public MainWindow() 25 | { 26 | InitializeComponent(); 27 | } 28 | 29 | private void Project1UIButton_Click(object sender, RoutedEventArgs e) 30 | { 31 | Process.Start(new ProcessStartInfo("https://github.com/Planshit/ProjectEye/releases")); 32 | } 33 | 34 | private void bugreportbtn_Click(object sender, RoutedEventArgs e) 35 | { 36 | Process.Start(new ProcessStartInfo("https://github.com/Planshit/ProjectEye/issues/new")); 37 | } 38 | 39 | private void Project1UIButton_Click_1(object sender, RoutedEventArgs e) 40 | { 41 | string upexePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, 42 | "ProjectEye.exe"); 43 | Process.Start(upexePath); 44 | Close(); 45 | } 46 | 47 | private void Run_MouseDown(object sender, MouseButtonEventArgs e) 48 | { 49 | string logPath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, 50 | "Log"); 51 | Process.Start(logPath); 52 | } 53 | 54 | private void TextBlock_MouseDown(object sender, MouseButtonEventArgs e) 55 | { 56 | Clipboard.SetText("heis@thelittlepandaisbehind.com"); 57 | MessageBox.Show("邮箱已复制"); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/Local/ProjectEyeBug/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // 有关程序集的一般信息由以下 8 | // 控制。更改这些特性值可修改 9 | // 与程序集关联的信息。 10 | [assembly: AssemblyTitle("ProjectEyeBug")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("ProjectEyeBug")] 15 | [assembly: AssemblyCopyright("Copyright © 2020")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // 将 ComVisible 设置为 false 会使此程序集中的类型 20 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 21 | //请将此类型的 ComVisible 特性设置为 true。 22 | [assembly: ComVisible(false)] 23 | 24 | //若要开始生成可本地化的应用程序,请设置 25 | //.csproj 文件中的 CultureYouAreCodingWith 26 | //例如,如果您在源文件中使用的是美国英语, 27 | //使用的是美国英语,请将 设置为 en-US。 然后取消 28 | //对以下 NeutralResourceLanguage 特性的注释。 更新 29 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置 36 | //(未在页面中找到资源时使用, 37 | //或应用程序资源字典中找到时使用) 38 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 39 | //(未在页面中找到资源时使用, 40 | //、应用程序或任何主题专用资源字典中找到时使用) 41 | )] 42 | 43 | 44 | // 程序集的版本信息由下列四个值组成: 45 | // 46 | // 主版本 47 | // 次版本 48 | // 生成号 49 | // 修订号 50 | // 51 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 52 | //通过使用 "*",如下所示: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /src/Local/ProjectEyeBug/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本: 4.0.30319.42000 5 | // 6 | // 对此文件的更改可能导致不正确的行为,如果 7 | // 重新生成代码,则所做更改将丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ProjectEyeBug.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("ProjectEyeBug.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 | -------------------------------------------------------------------------------- /src/Local/ProjectEyeBug/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 ProjectEyeBug.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 | -------------------------------------------------------------------------------- /src/Local/ProjectEyeBug/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/Local/ProjectEyeBug/explosion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Planshit/ProjectEye/50519089db349ef7ce60534078c6b7d49e5ba76b/src/Local/ProjectEyeBug/explosion.png -------------------------------------------------------------------------------- /src/Local/ProjectEyeBug/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/Local/ProjectEyeUp/ProjectEyeUp.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {63CF77C6-343B-4F7B-AF1E-35D1D391DA0A} 8 | Exe 9 | ProjectEyeUp 10 | ProjectEyeUp 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | ..\ProjectEye\bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 0 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | ..\ProjectEye\bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/Local/ProjectEyeUp/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("ProjectEyeUp")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ProjectEyeUp")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("63cf77c6-343b-4f7b-af1e-35d1d391da0a")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.1.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | --------------------------------------------------------------------------------