├── src
├── ProjectEvent.UI
│ ├── Styles
│ │ ├── Readme.md
│ │ └── Light
│ │ │ ├── Base
│ │ │ ├── Text.xaml
│ │ │ └── ContextMenu.xaml
│ │ │ └── Controls.xaml
│ ├── Themes
│ │ ├── Readme.md
│ │ ├── InputGroup
│ │ │ └── InputGroup.xaml
│ │ ├── ItemSelect
│ │ │ └── ItemSelect.xaml
│ │ ├── Input
│ │ │ └── TextField.xaml
│ │ ├── Base
│ │ │ └── Icon.xaml
│ │ ├── Navigation
│ │ │ └── Navigation.xaml
│ │ ├── TabContainer
│ │ │ └── TabHeaderButton.xaml
│ │ ├── PageContainer.xaml
│ │ ├── Action
│ │ │ └── ActionContainer.xaml
│ │ └── IconSelection
│ │ │ └── IconSelection.xaml
│ ├── Assets
│ │ ├── Icons
│ │ │ ├── tray.ico
│ │ │ ├── icon_max.ico
│ │ │ └── icon_max.png
│ │ ├── Fonts
│ │ │ ├── SegMDL2.ttf
│ │ │ └── fabric-icons.ttf
│ │ └── Images
│ │ │ └── rocket_launch__monochromatic.png
│ ├── Services
│ │ ├── IEventMangerService.cs
│ │ ├── ICallFunctionPipes.cs
│ │ ├── IApp.cs
│ │ ├── IEventLog.cs
│ │ ├── IGroup.cs
│ │ ├── IProjects.cs
│ │ └── ISettingsService.cs
│ ├── Models
│ │ ├── DataModels
│ │ │ ├── ComBoxActionModel.cs
│ │ │ ├── ActionItemModel.cs
│ │ │ ├── EventLogModel.cs
│ │ │ ├── GroupModel.cs
│ │ │ └── ProjectModel.cs
│ │ ├── ConditionModels
│ │ │ ├── WIFIConnectedEventConditionModel.cs
│ │ │ ├── IntervalTimerConditionModel.cs
│ │ │ ├── FileChangedConditionModel.cs
│ │ │ ├── BluetoothEventConditionModel.cs
│ │ │ ├── ProcessCreatedConditionModel.cs
│ │ │ └── TimeChangedConditionModel.cs
│ │ ├── EventLogPageModel.cs
│ │ ├── Settings
│ │ │ ├── SettingsModel.cs
│ │ │ └── GeneralModel.cs
│ │ ├── UINotifyPropertyChanged.cs
│ │ ├── IndexPageModel.cs
│ │ └── SettingsPageModel.cs
│ ├── Controls
│ │ ├── Action
│ │ │ ├── Models
│ │ │ │ ├── ComBoxModel.cs
│ │ │ │ ├── DelayActionInputModel.cs
│ │ │ │ ├── KeyboardActionInputModel .cs
│ │ │ │ ├── OpenURLActionInputModel.cs
│ │ │ │ ├── DeleteFileActionInputModel.cs
│ │ │ │ ├── ReadFileActionInputModel.cs
│ │ │ │ ├── SnippingActionInputModel.cs
│ │ │ │ ├── SoundPlayActionInputModel.cs
│ │ │ │ ├── GetIPAddressActionInputModel.cs
│ │ │ │ ├── SetDeviceVolumeActionInputModel.cs
│ │ │ │ ├── JsonDeserializeActionInputModel.cs
│ │ │ │ ├── RegexActionInputModel.cs
│ │ │ │ ├── KillProcessActionInputModel.cs
│ │ │ │ ├── LoopsActionInputModel.cs
│ │ │ │ ├── ActionModel.cs
│ │ │ │ ├── StartProcessActionInputModel.cs
│ │ │ │ ├── WriteFileActionInputModel.cs
│ │ │ │ ├── DownloadFileActionInputModel.cs
│ │ │ │ ├── DialogActionInputModel.cs
│ │ │ │ ├── IFActionInputModel.cs
│ │ │ │ ├── SystemNotificationActionInputModel.cs
│ │ │ │ ├── HttpRequestActionInputModel.cs
│ │ │ │ └── ActionInputModel.cs
│ │ │ ├── Types
│ │ │ │ └── InputType.cs
│ │ │ ├── Data
│ │ │ │ ├── GetIPAddressActionData.cs
│ │ │ │ ├── IFActionConditionData.cs
│ │ │ │ ├── HttpRequestActionData.cs
│ │ │ │ └── SystemNotificationActionData.cs
│ │ │ └── Builders
│ │ │ │ ├── IActionBuilder.cs
│ │ │ │ └── ShutdownActionBuilder.cs
│ │ ├── InputGroup
│ │ │ ├── InputType.cs
│ │ │ └── Models
│ │ │ │ └── InputModel.cs
│ │ ├── TabContainer
│ │ │ ├── TabItem.cs
│ │ │ └── TabHeaderButton.cs
│ │ ├── Input
│ │ │ └── InputTypes.cs
│ │ ├── Navigation
│ │ │ └── Models
│ │ │ │ └── NavigationItemModel.cs
│ │ ├── Converters
│ │ │ └── ToStringConverter.cs
│ │ ├── ItemSelect
│ │ │ └── Models
│ │ │ │ └── ItemModel.cs
│ │ ├── Window
│ │ │ ├── DefaultWindowCommands.cs
│ │ │ └── DialogWindow.xaml
│ │ └── Base
│ │ │ └── Icon.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Types
│ │ └── ToastType.cs
│ ├── Views
│ │ ├── IndexPage.xaml.cs
│ │ ├── EventLogPage.xaml.cs
│ │ ├── SettingsPage.xaml.cs
│ │ ├── AddEventPage.xaml.cs
│ │ └── EventLogPage.xaml
│ ├── MainWindow.xaml.cs
│ ├── App.xaml
│ ├── ViewModels
│ │ ├── Command.cs
│ │ ├── EventLogPageVM.cs
│ │ └── EventCommand.cs
│ ├── NotifyIconResources.xaml
│ └── Base
│ │ └── Color
│ │ ├── ColorTypes.cs
│ │ └── Colors.cs
├── Librarys
│ └── InTheHand.Net.Personal.dll
├── ProjectEvent.Core
│ ├── Win32
│ │ ├── KeyboardEventHandler.cs
│ │ └── CommonWin32API.cs
│ ├── Services
│ │ ├── ITaskService.cs
│ │ ├── Tasks
│ │ │ ├── IFileTaskService.cs
│ │ │ ├── IDeviceTaskService.cs
│ │ │ ├── IProcessTaskService.cs
│ │ │ ├── IBluetoothTaskService.cs
│ │ │ ├── IKeyboardTaskService.cs
│ │ │ ├── INetworkStatusTaskService.cs
│ │ │ └── DeviceTaskService.cs
│ │ ├── TimerTask
│ │ │ └── ITimerTaskService.cs
│ │ ├── EventHandler.cs
│ │ ├── IMainService.cs
│ │ ├── ContainerEventHandler.cs
│ │ ├── ActionInvokeHandler.cs
│ │ ├── ITimerService.cs
│ │ ├── IEventService.cs
│ │ ├── NotificationService.cs
│ │ ├── MainService.cs
│ │ └── MyNotificationActivator.cs
│ ├── Action
│ │ ├── Models
│ │ │ ├── OpenURLActionParamsModel.cs
│ │ │ ├── KeyboardActionParamsModel.cs
│ │ │ ├── SoundPlayActionParamsModel.cs
│ │ │ ├── DeleteFileActionParamsModel.cs
│ │ │ ├── ReadFileActionParamsModel.cs
│ │ │ ├── SnippingActionParamsModel.cs
│ │ │ ├── JsonDeserializeActionParamsModel.cs
│ │ │ ├── SetDeviceVolumeActionParamsModel.cs
│ │ │ ├── WriteFileActionParameterModel.cs
│ │ │ ├── DelayActionParamsModel.cs
│ │ │ ├── DownloadFileParamsModel.cs
│ │ │ ├── GetIPAddressActionParamsModel.cs
│ │ │ ├── RegexActionParamsModel.cs
│ │ │ ├── LoopsActionParamsModel.cs
│ │ │ ├── BaseGroupActionParamsModel.cs
│ │ │ ├── DialogActionParamsModel.cs
│ │ │ ├── ActionResultModel.cs
│ │ │ ├── KillProcessActionParamsModel.cs
│ │ │ ├── StartProcessActionParamsModel.cs
│ │ │ ├── SystemNotificationActionParamsModel.cs
│ │ │ ├── IFActionParameterModel.cs
│ │ │ ├── HttpRequestActionParameterModel.cs
│ │ │ └── ActionModel.cs
│ │ ├── Types
│ │ │ ├── ResultTypes
│ │ │ │ ├── LoopsResultType.cs
│ │ │ │ ├── DialogResultType.cs
│ │ │ │ ├── RegexResultType.cs
│ │ │ │ ├── ReadFileResultType.cs
│ │ │ │ ├── DeleteFileResultType.cs
│ │ │ │ ├── GetIPAddressResultType.cs
│ │ │ │ ├── SnippingResultType.cs
│ │ │ │ ├── DownloadFileResultType.cs
│ │ │ │ ├── HttpResultType.cs
│ │ │ │ └── StartProcessResultType.cs
│ │ │ ├── CommonResultKeyType.cs
│ │ │ ├── GlobalVariableType.cs
│ │ │ ├── ActionInvokeStateType.cs
│ │ │ └── IFActionConditionType.cs
│ │ ├── Checks
│ │ │ ├── ICheck.cs
│ │ │ └── WriteFileCheck.cs
│ │ ├── Actions
│ │ │ ├── IAction.cs
│ │ │ ├── DelayAction.cs
│ │ │ ├── SetDeviceVolumeAction.cs
│ │ │ ├── ShutdownAction.cs
│ │ │ ├── LoopsAction.cs
│ │ │ ├── OpenURLAction.cs
│ │ │ ├── DeleteFileAction.cs
│ │ │ ├── WriteFileAction.cs
│ │ │ ├── SystemNotificationAction.cs
│ │ │ ├── RegexAction.cs
│ │ │ ├── ReadFileAction.cs
│ │ │ └── JsonDeserializeAction.cs
│ │ └── ActionParameterConverter.cs
│ ├── Net
│ │ ├── HttpClient.cs
│ │ ├── Types
│ │ │ ├── MethodType.cs
│ │ │ └── ParamsType.cs
│ │ ├── Models
│ │ │ └── HttpResultModel.cs
│ │ └── NetworkWatcher.cs
│ ├── Event
│ │ ├── Structs
│ │ │ ├── BluetoothEventDataStruct.cs
│ │ │ ├── NetworkStatusDataStruct.cs
│ │ │ └── KeyboardEventDataStruct.cs
│ │ ├── Types
│ │ │ ├── WIFIConnectedEventVariableType.cs
│ │ │ ├── NetworkStatusEventVariableType.cs
│ │ │ ├── RunGameEventVariableType.cs
│ │ │ ├── FileChangedEventVariableType.cs
│ │ │ ├── BluetoothEventVariableType.cs
│ │ │ ├── KeyboardEventVariableType.cs
│ │ │ ├── ProcessCreatedEventVariableType.cs
│ │ │ └── EventType.cs
│ │ ├── EventLoger.cs
│ │ └── Models
│ │ │ ├── EventLogModel.cs
│ │ │ └── EventModel.cs
│ ├── Types
│ │ ├── GamePlatformType.cs
│ │ ├── PipeCallFunctionType.cs
│ │ ├── ToastActionType.cs
│ │ ├── IPAddressType.cs
│ │ ├── LogLevelType.cs
│ │ └── ToastScenarioType.cs
│ ├── Condition
│ │ ├── Models
│ │ │ ├── FileChangedDataModel.cs
│ │ │ └── ConditionCheckResultModel.cs
│ │ ├── Types
│ │ │ └── TimeChangedRepetitionType.cs
│ │ ├── ICondition.cs
│ │ ├── KeyboardEventCondition.cs
│ │ ├── RunGameEventCondition.cs
│ │ ├── NetworkStatusEventCondition.cs
│ │ ├── WIFIConnectedEventCondition.cs
│ │ ├── OnDeviceStartupCondition.cs
│ │ ├── OnFileChangedCondition.cs
│ │ ├── OnIntervalTimerCondition.cs
│ │ ├── BluetoothEventCondition.cs
│ │ └── OnProcessCreatedCondition.cs
│ ├── Structs
│ │ ├── PipeCallFunctionStruct.cs
│ │ └── PipeCallFunctionFeedbackStruct.cs
│ ├── Extensions
│ │ └── ManagementBaseObjectExtentions.cs
│ ├── Helper
│ │ ├── ObjectConvert.cs
│ │ └── AudioHelper.cs
│ ├── ProjectEvent.Core.csproj
│ └── PipeCallFunction.cs
└── NotifyIconWpf
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── NotifyIconWpf.csproj
│ ├── Interop
│ ├── Point.cs
│ ├── IconState.cs
│ ├── NotifyIconVersion.cs
│ ├── SystemInfo.cs
│ ├── WindowClass.cs
│ ├── MouseEvent.cs
│ ├── NotifyCommand.cs
│ └── BalloonFlags.cs
│ └── BalloonIcon.cs
├── privacy.txt
├── .github
└── ISSUE_TEMPLATE
│ ├── feature-request-----.md
│ └── bug-report-----.md
├── LICENSE
└── readme.md
/src/ProjectEvent.UI/Styles/Readme.md:
--------------------------------------------------------------------------------
1 | 控件主题样式
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Themes/Readme.md:
--------------------------------------------------------------------------------
1 | 自定义控件模板
--------------------------------------------------------------------------------
/privacy.txt:
--------------------------------------------------------------------------------
1 | ## Personal data we collect / 我们收集的数据
2 |
3 | none.
4 | 完全不收集
5 |
--------------------------------------------------------------------------------
/src/Librarys/InTheHand.Net.Personal.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Planshit/ProjectEvent/HEAD/src/Librarys/InTheHand.Net.Personal.dll
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Assets/Icons/tray.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Planshit/ProjectEvent/HEAD/src/ProjectEvent.UI/Assets/Icons/tray.ico
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Assets/Fonts/SegMDL2.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Planshit/ProjectEvent/HEAD/src/ProjectEvent.UI/Assets/Fonts/SegMDL2.ttf
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Assets/Icons/icon_max.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Planshit/ProjectEvent/HEAD/src/ProjectEvent.UI/Assets/Icons/icon_max.ico
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Assets/Icons/icon_max.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Planshit/ProjectEvent/HEAD/src/ProjectEvent.UI/Assets/Icons/icon_max.png
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Assets/Fonts/fabric-icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Planshit/ProjectEvent/HEAD/src/ProjectEvent.UI/Assets/Fonts/fabric-icons.ttf
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Assets/Images/rocket_launch__monochromatic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Planshit/ProjectEvent/HEAD/src/ProjectEvent.UI/Assets/Images/rocket_launch__monochromatic.png
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Win32/KeyboardEventHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Win32
6 | {
7 | public delegate void KeyboardEventHandler(int keycode);
8 | }
9 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Services/IEventMangerService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Services
6 | {
7 | public interface IEventMangerService
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Services/ITaskService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Services
6 | {
7 | public interface ITaskService
8 | {
9 | void Run();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Services/Tasks/IFileTaskService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Services.Tasks
6 | {
7 | public interface IFileTaskService : ITaskService
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Services/Tasks/IDeviceTaskService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Services.Tasks
6 | {
7 | public interface IDeviceTaskService : ITaskService
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Services/Tasks/IProcessTaskService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Services.Tasks
6 | {
7 | public interface IProcessTaskService : ITaskService
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/NotifyIconWpf/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Markup;
2 |
3 | //provides simplified declaration in XAML
4 | [assembly: XmlnsPrefix("http://www.hardcodet.net/taskbar", "tb")]
5 | [assembly: XmlnsDefinition("http://www.hardcodet.net/taskbar", "Hardcodet.Wpf.TaskbarNotification")]
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Services/Tasks/IBluetoothTaskService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Services.Tasks
6 | {
7 | public interface IBluetoothTaskService : ITaskService
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Services/Tasks/IKeyboardTaskService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Services.Tasks
6 | {
7 | public interface IKeyboardTaskService : ITaskService
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Services/TimerTask/ITimerTaskService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Services.TimerTask
6 | {
7 | public interface ITimerTaskService : ITaskService
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Services/Tasks/INetworkStatusTaskService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Services.Tasks
6 | {
7 | public interface INetworkStatusTaskService : ITaskService
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Services/EventHandler.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Event.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.Core.Services
7 | {
8 | public delegate void EventHandler(EventModel @event, bool isSuccess);
9 | }
10 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/OpenURLActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class OpenURLActionParamsModel
8 | {
9 | public string URL { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Services/ICallFunctionPipes.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Services
6 | {
7 | public interface ICallFunctionPipes
8 | {
9 | void StartServer();
10 | void CloseServer();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/KeyboardActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class KeyboardActionParamsModel
8 | {
9 | public string Keys { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/SoundPlayActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class SoundPlayActionParamsModel
8 | {
9 | public string Path { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/DeleteFileActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class DeleteFileActionParamsModel
8 | {
9 | public string Path { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/ReadFileActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class ReadFileActionParamsModel
8 | {
9 | public string FilePath { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/SnippingActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class SnippingActionParamsModel
8 | {
9 | public string SavePath { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Net/HttpClient.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Net
6 | {
7 | public class HttpClient
8 | {
9 | public static readonly System.Net.Http.HttpClient client = new System.Net.Http.HttpClient();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/JsonDeserializeActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class JsonDeserializeActionParamsModel
8 | {
9 | public string Content { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/SetDeviceVolumeActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class SetDeviceVolumeActionParamsModel
8 | {
9 | public string Volume { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Services/IMainService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Services
6 | {
7 | public interface IMainService
8 | {
9 | ///
10 | /// 启动
11 | ///
12 | void Run();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Net/Types/MethodType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Net.Types
6 | {
7 | ///
8 | /// 请求方法
9 | ///
10 | public enum MethodType
11 | {
12 | GET = 1,
13 | POST = 2
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Net/Types/ParamsType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Net.Types
6 | {
7 | ///
8 | /// 参数类型
9 | ///
10 | public enum ParamsType
11 | {
12 | Json = 0,
13 | FormData = 1,
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Models/DataModels/ComBoxActionModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Models.DataModels
6 | {
7 | public class ComBoxActionModel
8 | {
9 | public int ID { get; set; }
10 | public string Name { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/ComBoxModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Controls.Action.Models
6 | {
7 | public class ComBoxModel
8 | {
9 | public int ID { get; set; }
10 | public string DisplayName { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature-request-----.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request 功能建议
3 | about: 我希望增加或调整某个功能
4 | title: "[feature] 我希望能增加/调整..."
5 | labels: enhancement
6 | assignees: ''
7 |
8 | ---
9 |
10 | **你的建议**
11 | 我希望能增加/调整...
12 |
13 | **这样做能带来什么改变**
14 | ...
15 |
16 | **你使用这个软件多长时间了**
17 | 少于1周
18 | 少于1个月
19 | 少于1年
20 | 大于1年
21 |
22 | **备注**
23 | ...
24 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/DelayActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | public class DelayActionInputModel
9 | {
10 | public string Seconds { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/KeyboardActionInputModel .cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | public class KeyboardActionInputModel
9 | {
10 | public string Keys { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/OpenURLActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | public class OpenURLActionInputModel
9 | {
10 | public string URL { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/NotifyIconWpf/NotifyIconWpf.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.0
5 | true
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/DeleteFileActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | public class DeleteFileActionInputModel
9 | {
10 | public string Path { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/ReadFileActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | public class ReadFileActionInputModel
9 | {
10 | public string FilePath { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/SnippingActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | public class SnippingActionInputModel
9 | {
10 | public string SavePath { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/SoundPlayActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | public class SoundPlayActionInputModel
9 | {
10 | public string Path { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Event/Structs/BluetoothEventDataStruct.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Event.Structs
6 | {
7 | public struct BluetoothEventDataStruct
8 | {
9 | public string DeviceName { get; set; }
10 | public bool IsConnected { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Event/Types/WIFIConnectedEventVariableType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Event.Types
6 | {
7 | public enum WIFIConnectedEventVariableType
8 | {
9 | ///
10 | /// wifi名称
11 | ///
12 | SSID
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Types/ResultTypes/LoopsResultType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Types.ResultTypes
6 | {
7 | public enum LoopsResultType
8 | {
9 | ///
10 | /// 当前次数
11 | ///
12 | Index = 1,
13 |
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Event/Types/NetworkStatusEventVariableType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Event.Types
6 | {
7 | public enum NetworkStatusEventVariableType
8 | {
9 | ///
10 | /// 网络是否连接
11 | ///
12 | IsConnected
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/GetIPAddressActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | public class GetIPAddressActionInputModel
9 | {
10 | public ComBoxModel Type { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/SetDeviceVolumeActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | public class SetDeviceVolumeActionInputModel
9 | {
10 | public string Volume { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/WriteFileActionParameterModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class WriteFileActionParameterModel
8 | {
9 | public string FilePath { get; set; }
10 |
11 | public string Content { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Types/ResultTypes/DialogResultType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Types.ResultTypes
6 | {
7 | public enum DialogResultType
8 | {
9 | ///
10 | /// 点击的按钮值
11 | ///
12 | ClickButtonValue
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Types/ResultTypes/RegexResultType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Types.ResultTypes
6 | {
7 | public enum RegexResultType
8 | {
9 | ///
10 | /// 匹配成功数
11 | ///
12 | Count = -2,
13 |
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Types/GamePlatformType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Types
6 | {
7 | ///
8 | /// 游戏平台类型
9 | ///
10 | public enum GamePlatformType
11 | {
12 | Steam,
13 | Epic,
14 | Tencent,
15 | Other
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/JsonDeserializeActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | public class JsonDeserializeActionInputModel
9 | {
10 | public string Content { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Event/Types/RunGameEventVariableType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Event.Types
6 | {
7 | public enum RunGameEventVariableType
8 | {
9 | ///
10 | /// 游戏所属平台(Steam,Epic,Other)
11 | ///
12 | GamePlatform,
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/InputGroup/InputType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Controls.InputGroup
6 | {
7 | public enum InputType
8 | {
9 | Text,
10 | Number,
11 | Date,
12 | Time,
13 | DateTime,
14 | Bool,
15 | Select
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Checks/ICheck.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Checks
6 | {
7 | public interface ICheck
8 | {
9 |
10 | ///
11 | /// 检查操作是否可执行
12 | ///
13 | ///
14 | bool IsCheck();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/DelayActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class DelayActionParamsModel
8 | {
9 | ///
10 | /// 延迟秒数
11 | ///
12 | public int Seconds { get; set; }
13 |
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Event/Structs/NetworkStatusDataStruct.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Event.Structs
6 | {
7 | public struct NetworkStatusDataStruct
8 | {
9 | ///
10 | /// 网络是否连接
11 | ///
12 | public bool IsConnected { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Services/ContainerEventHandler.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Event.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.Core.Services
7 | {
8 | public delegate void ContainerEventHandler(EventModel ev);
9 | public delegate void EventChangedHandler(EventModel oldValue, EventModel newValue);
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Condition/Models/FileChangedDataModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.Core.Condition.Models
7 | {
8 | public class FileChangedDataModel
9 | {
10 | public string WatchPath { get; set; }
11 | public FileSystemEventArgs FileSystemEventArgs { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/RegexActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 |
9 | public class RegexActionInputModel
10 | {
11 | public string Content { get; set; }
12 | public string Regex { get; set; }
13 |
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Services/IApp.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models.DataModels;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Services
7 | {
8 | public interface IApp
9 | {
10 | void Run();
11 | void Add(ProjectModel project);
12 | void Update(ProjectModel project);
13 | void Remove(int id);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Net/Models/HttpResultModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Net.Models
6 | {
7 | public class HttpResultModel
8 | {
9 | public bool IsSuccess { get; set; } = false;
10 | public string Content { get; set; } = string.Empty;
11 | public int StatusCode { get; set; } = 0;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Types/PipeCallFunctionType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Types
6 | {
7 | ///
8 | /// pipe call ui function type
9 | ///
10 | public enum PipeCallFunctionType
11 | {
12 | ///
13 | /// 对话框
14 | ///
15 | Dialog
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/KillProcessActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | public class KillProcessActionInputModel
9 | {
10 | public string ProcessName { get; set; }
11 | public bool IsFuzzy { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/DownloadFileParamsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class DownloadFileParamsModel
8 | {
9 | public string Url { get; set; }
10 | public string SavePath { get; set; }
11 | public Dictionary Headers { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Types/CommonResultKeyType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Types
6 | {
7 | ///
8 | /// 通用返回
9 | ///
10 | public enum CommonResultKeyType
11 | {
12 | ///
13 | /// 是否成功(true,false)
14 | ///
15 | IsSuccess = 1
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/LoopsActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 |
9 | public class LoopsActionInputModel
10 | {
11 | ///
12 | /// 循环次数
13 | ///
14 | public int Count { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/GetIPAddressActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Types;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.Core.Action.Models
7 | {
8 | public class GetIPAddressActionParamsModel
9 | {
10 | ///
11 | /// 获取类型
12 | ///
13 | public IPAddressType Type { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Types/ToastActionType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Types
6 | {
7 | public enum ToastActionType
8 | {
9 | ///
10 | /// 默认启动程序或显示主窗口
11 | ///
12 | Default = 0,
13 | ///
14 | /// 打开URL
15 | ///
16 | Url = 1,
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/RegexActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class RegexActionParamsModel
8 | {
9 | public string Content { get; set; }
10 | ///
11 | /// 正则表达式(不支持任何变量
12 | ///
13 | public string Regex { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Structs/PipeCallFunctionStruct.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Types;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.Core.Structs
7 | {
8 | public struct PipeCallFunctionStruct
9 | {
10 | public int ID { get; set; }
11 | public PipeCallFunctionType CallFunctionType { get; set; }
12 | public object Data { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/TabContainer/TabItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Windows.Controls;
5 |
6 | namespace ProjectEvent.UI.Controls.TabContainer
7 | {
8 | public class TabItem : ContentControl
9 | {
10 | public string Title { get; set; }
11 | public TabItem()
12 | {
13 | DefaultStyleKey = typeof(TabItem);
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Event/Types/FileChangedEventVariableType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Event.Types
6 | {
7 | public enum FileChangedEventVariableType
8 | {
9 | ///
10 | /// 变化类型
11 | ///
12 | Type,
13 | ///
14 | /// 文件路径
15 | ///
16 | Path
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Types/GlobalVariableType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Types
6 | {
7 | public enum GlobalVariableType
8 | {
9 | ///
10 | /// 当前时间戳(秒)
11 | ///
12 | Timestamp,
13 | ///
14 | /// 当前用户名
15 | ///
16 | CurrentUserName,
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/LoopsActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Action.Types;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.Core.Action.Models
7 | {
8 | public class LoopsActionParamsModel : BaseGroupActionParamsModel
9 | {
10 | ///
11 | /// 循环次数(为0时永远循环)
12 | ///
13 | public int Count { get; set; }
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Structs/PipeCallFunctionFeedbackStruct.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Types;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.Core.Structs
7 | {
8 | public struct PipeCallFunctionFeedbackStruct
9 | {
10 | public int ID { get; set; }
11 | public PipeCallFunctionType CallFunctionType { get; set; }
12 | public object FeedbackData { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Services/ActionInvokeHandler.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Action.Types;
2 | using ProjectEvent.Core.Event.Models;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace ProjectEvent.Core.Services
8 | {
9 | public delegate void ActionInvokeHandler(int taskID, int actionID, ActionInvokeStateType state);
10 | public delegate void ActionsInvokeHandler(int taskID, ActionInvokeStateType state);
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Types/ResultTypes/ReadFileResultType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Types.ResultTypes
6 | {
7 | public enum ReadFileResultType
8 | {
9 | ///
10 | /// 是否成功
11 | ///
12 | IsSuccess = 1,
13 | ///
14 | /// 读取内容
15 | ///
16 | Content = 2
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Event/Types/BluetoothEventVariableType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Event.Types
6 | {
7 | public enum BluetoothEventVariableType
8 | {
9 | ///
10 | /// 设备名称
11 | ///
12 | DeviceName,
13 | ///
14 | /// 是否连接(True,Flase)
15 | ///
16 | IsConnected,
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/BaseGroupActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | ///
8 | /// 组类型的action基础类
9 | ///
10 | public class BaseGroupActionParamsModel
11 | {
12 | ///
13 | /// 组内的action
14 | ///
15 | public List Actions { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Types/ResultTypes/DeleteFileResultType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Types.ResultTypes
6 | {
7 | public enum DeleteFileResultType
8 | {
9 | ///
10 | /// 是否成功
11 | ///
12 | IsSuccess = 1,
13 | ///
14 | /// 被删除文件路径
15 | ///
16 | Path = 2
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Types/ResultTypes/GetIPAddressResultType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Types.ResultTypes
6 | {
7 | public enum GetIPAddressResultType
8 | {
9 | ///
10 | /// 是否成功
11 | ///
12 | IsSuccess = 1,
13 | ///
14 | /// ip地址
15 | ///
16 | IP = 2
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Types/ResultTypes/SnippingResultType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Types.ResultTypes
6 | {
7 | public enum SnippingResultType
8 | {
9 | ///
10 | /// 是否成功
11 | ///
12 | IsSuccess = 1,
13 | ///
14 | /// 保持路径
15 | ///
16 | SavePath = 2
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/ActionModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using ProjectEvent.UI.Models.DataModels;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Collections.ObjectModel;
6 | using System.Text;
7 |
8 | namespace ProjectEvent.UI.Controls.Action.Models
9 | {
10 | public class ActionModel : UINotifyPropertyChanged
11 | {
12 | public ObservableCollection Actions { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/StartProcessActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | ///
9 | /// 启动进程action输入UI模型
10 | ///
11 | public class StartProcessActionInputModel
12 | {
13 | public string Path { get; set; }
14 | public string Args { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/WriteFileActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | ///
9 | /// 写文件action输入UI模型
10 | ///
11 | public class WriteFileActionInputModel
12 | {
13 | public string FilePath { get; set; }
14 | public string Content { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Types/ResultTypes/DownloadFileResultType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Types.ResultTypes
6 | {
7 | public enum DownloadFileResultType
8 | {
9 | ///
10 | /// 是否成功
11 | ///
12 | IsSuccess = 1,
13 | ///
14 | /// 文件保存地址
15 | ///
16 | SavePath = 2
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Types/IPAddressType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Types
6 | {
7 | ///
8 | /// IP地址类型
9 | ///
10 | public enum IPAddressType
11 | {
12 | ///
13 | /// 内网IP
14 | ///
15 | LocalIPV4,
16 | ///
17 | /// 公网IP
18 | ///
19 | PublicIPV4
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Services/IEventLog.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models.DataModels;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Services
7 | {
8 | public interface IEventLog
9 | {
10 | void Listen();
11 | void Save();
12 | ///
13 | /// 获取最近的一些日志
14 | ///
15 | ///
16 | List GetEventLogs();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/DownloadFileActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | public class DownloadFileActionInputModel
9 | {
10 | public string Url { get; set; }
11 |
12 | public string SavePath { get; set; }
13 | public Dictionary Headers { get; set; }
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Services/IGroup.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models.DataModels;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Services
7 | {
8 | public interface IGroup
9 | {
10 | void Load();
11 | GroupModel Add(GroupModel group);
12 | void Delete(int gid);
13 | void Update(GroupModel group);
14 | List GetGroups();
15 | GroupModel GetGroup(int id);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug-report-----.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report 问题反馈
3 | about: 软件出现了问题
4 | title: "[bug] 软件有问题"
5 | labels: bug
6 | assignees: ''
7 |
8 | ---
9 |
10 | **简单描述问题**
11 | 软件发生了什么问题?
12 |
13 | **复现步骤**
14 | 怎样操作这个问题才会出现:
15 | 1. 启动软件
16 | 2. 点击 '....'
17 | 3. ...
18 |
19 | **截图或视频**
20 | ...
21 |
22 | **软件版本**
23 | 在设置>关于中可以查看
24 | 核心程序集版本号:
25 | UI程序集版本号:
26 |
27 | **系统信息**
28 | - 版本:win10家庭版
29 | - 操作系统版本:19041
30 | - 设备:普通台式机/Surface Book 3/ThinkPad T430
31 |
32 | **备注**
33 | ...
34 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/DialogActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Types;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.Core.Action.Models
7 | {
8 | public class DialogActionParamsModel
9 | {
10 | public string Title { get; set; }
11 | public string Content { get; set; }
12 | public string Image { get; set; }
13 | public Dictionary Buttons { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/ActionResultModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class ActionResultModel
8 | {
9 | public int ID { get; set; }
10 |
11 | //public Dictionary Result { get; set; }
12 | public Dictionary Result { get; set; }
13 |
14 | //public Dictionary Result { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/DialogActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | public class DialogActionInputModel
9 | {
10 | public string Title { get; set; }
11 | public string Content { get; set; }
12 | public string Image { get; set; }
13 | public Dictionary Buttons { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/KillProcessActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class KillProcessActionParamsModel
8 | {
9 | ///
10 | /// 进程名称
11 | ///
12 | public string ProcessName { get; set; }
13 | ///
14 | /// 模糊匹配
15 | ///
16 | public bool IsFuzzy { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/StartProcessActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Models
6 | {
7 | public class StartProcessActionParamsModel
8 | {
9 | ///
10 | /// 进程路径
11 | ///
12 | public string Path { get; set; }
13 | ///
14 | /// 参数(可选)
15 | ///
16 | public string Args{ get; set; }
17 |
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/IFActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | ///
9 | /// if action输入UI模型
10 | ///
11 | public class IFActionInputModel
12 | {
13 | public string Left { get; set; }
14 | public string Right { get; set; }
15 | public ComBoxModel Condition { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Models/ConditionModels/WIFIConnectedEventConditionModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Models.ConditionModels
6 | {
7 | public class WIFIConnectedEventConditionModel : UINotifyPropertyChanged
8 | {
9 | private string SSID_;
10 | public string SSID
11 | {
12 | get { return SSID_; }
13 | set { SSID_ = value; OnPropertyChanged(); }
14 | }
15 |
16 |
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Models/EventLogPageModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Models
6 | {
7 | public class EventLogPageModel : UINotifyPropertyChanged
8 | {
9 | private string Log_;
10 | public string Log
11 | {
12 | get { return Log_; }
13 | set
14 | {
15 | Log_ = value;
16 | OnPropertyChanged();
17 | }
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Event/Types/KeyboardEventVariableType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Event.Types
6 | {
7 | public enum KeyboardEventVariableType
8 | {
9 | ///
10 | /// 动作:up释放按键,down按下按键
11 | ///
12 | Action,
13 | ///
14 | /// 键名
15 | ///
16 | KeyName,
17 | ///
18 | /// 键码
19 | ///
20 | KeyCode
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/NotifyIconWpf/Interop/Point.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | namespace Hardcodet.Wpf.TaskbarNotification.Interop
4 | {
5 | ///
6 | /// Win API struct providing coordinates for a single point.
7 | ///
8 | [StructLayout(LayoutKind.Sequential)]
9 | public struct Point
10 | {
11 | ///
12 | /// X coordinate.
13 | ///
14 | public int X;
15 | ///
16 | /// Y coordinate.
17 | ///
18 | public int Y;
19 | }
20 | }
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Types/LogLevelType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Types
6 | {
7 | ///
8 | /// 日志等级
9 | ///
10 | public enum LogLevelType
11 | {
12 | ///
13 | /// 调试
14 | ///
15 | DEBUG,
16 | ///
17 | /// 错误
18 | ///
19 | ERROR,
20 | ///
21 | /// 警告
22 | ///
23 | WARNING
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Types/ResultTypes/HttpResultType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Types.ResultTypes
6 | {
7 | public enum HttpResultType
8 | {
9 | ///
10 | /// 是否成功
11 | ///
12 | IsSuccess = 1,
13 | ///
14 | /// 响应内容
15 | ///
16 | Content = 2,
17 | ///
18 | /// 状态码
19 | ///
20 | StatusCode = 3
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Input/InputTypes.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Controls.Input
6 | {
7 | ///
8 | /// 输入框类型
9 | ///
10 | public enum InputTypes
11 | {
12 | ///
13 | /// 文本
14 | ///
15 | Text,
16 | ///
17 | /// 数字
18 | ///
19 | Number,
20 | ///
21 | /// 日期时间
22 | ///
23 | DateTime
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Styles/Light/Base/Text.xaml:
--------------------------------------------------------------------------------
1 |
4 |
10 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Condition/Models/ConditionCheckResultModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Condition.Models
6 | {
7 | ///
8 | /// 条件检查返回模型,在执行条件检查时返回。校验条件是否正确
9 | ///
10 | public class ConditionCheckResultModel
11 | {
12 | ///
13 | /// 是否正确
14 | ///
15 | public bool IsValid { get; set; }
16 | ///
17 | /// 消息
18 | ///
19 | public string Msg { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Types/ActionInvokeStateType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Types
6 | {
7 | ///
8 | /// action执行状态
9 | ///
10 | public enum ActionInvokeStateType
11 | {
12 | ///
13 | /// 运行中
14 | ///
15 | Runing,
16 | ///
17 | /// 完成
18 | ///
19 | Done,
20 | ///
21 | /// 繁忙
22 | ///
23 | Busy
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Models/DataModels/ActionItemModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Controls.Base;
2 | using ProjectEvent.UI.Types;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace ProjectEvent.UI.Models.DataModels
8 | {
9 | public class ActionItemModel
10 | {
11 | public int ID { get; set; }
12 | public string ActionName { get; set; }
13 | public IconTypes Icon { get; set; }
14 | public int Index { get; set; }
15 | public ActionType ActionType { get; set; }
16 | public int ParentID { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Models/DataModels/EventLogModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Models.DataModels
6 | {
7 | public class EventLogModel
8 | {
9 | ///
10 | /// 日志ID
11 | ///
12 | public long ID { get; set; }
13 | ///
14 | /// 项目ID
15 | ///
16 | public int ProjectID { get; set; }
17 | ///
18 | /// 触发时间
19 | ///
20 | public DateTime Time { get; set; }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Actions/IAction.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Action.Models;
2 | using ProjectEvent.Core.Action.Types;
3 | using ProjectEvent.Core.Services;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace ProjectEvent.Core.Action.Actions
10 | {
11 | public interface IAction
12 | {
13 | System.Action GenerateAction(int taskID, ActionModel action);
14 | ///
15 | /// 当action状态发生变化时
16 | ///
17 | event ActionInvokeHandler OnEventStateChanged;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/NotifyIconWpf/Interop/IconState.cs:
--------------------------------------------------------------------------------
1 | namespace Hardcodet.Wpf.TaskbarNotification.Interop
2 | {
3 | ///
4 | /// The state of the icon - can be set to
5 | /// hide the icon.
6 | ///
7 | public enum IconState
8 | {
9 | ///
10 | /// The icon is visible.
11 | ///
12 | Visible = 0x00,
13 |
14 | ///
15 | /// Hide the icon.
16 | ///
17 | Hidden = 0x01,
18 |
19 | // The icon is shared - currently not supported, thus commented out.
20 | //Shared = 0x02
21 | }
22 | }
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Condition/Types/TimeChangedRepetitionType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Condition.Types
6 | {
7 | ///
8 | /// 重复方式
9 | ///
10 | public enum TimeChangedRepetitionType
11 | {
12 | ///
13 | /// 不重复
14 | ///
15 | None = 1,
16 | ///
17 | /// 每天
18 | ///
19 | Day = 2,
20 | ///
21 | /// 每周
22 | ///
23 | Week = 3
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Services/IProjects.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models.DataModels;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Services
7 | {
8 | public interface IProjects
9 | {
10 | void LoadProjects();
11 | bool Add(ProjectModel project, bool isSave = true);
12 | void Update(ProjectModel project);
13 | void Delete(int ID);
14 | List GetProjects();
15 | ProjectModel GetProject(int ID);
16 | List GetProjects(int GID);
17 | int GetCreateID();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Condition/ICondition.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Condition.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.Core.Condition
7 | {
8 | public interface ICondition
9 | {
10 | ///
11 | /// 判断当前是否满足执行条件
12 | ///
13 | /// true是,false否
14 | bool IsPass(object data = null);
15 |
16 | ///
17 | /// 提供给外部检查条件是否输入正确
18 | ///
19 | ///
20 | ConditionCheckResultModel Check();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Models/Settings/SettingsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Models.Settings
6 | {
7 | public class SettingsModel
8 | {
9 | ///
10 | /// 常规设置
11 | ///
12 | public GeneralModel General { get; set; }
13 | ///
14 | /// UI程序版本号
15 | ///
16 | public string UIVersion { get; set; }
17 | ///
18 | /// 核心程序版本号
19 | ///
20 | public string CoreVersion { get; set; }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/SystemNotificationActionParamsModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Types;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.Core.Action.Models
7 | {
8 | public class SystemNotificationActionParamsModel
9 | {
10 | public string Title { get; set; }
11 | public string Content { get; set; }
12 | public ToastScenarioType ToastScenarioType { get; set; }
13 | public string Icon { get; set; }
14 | public ToastActionType ToastActionType { get; set; }
15 | public string Url { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Types/ResultTypes/StartProcessResultType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Action.Types.ResultTypes
6 | {
7 | ///
8 | /// 启动进程操作返回类型
9 | ///
10 | public enum StartProcessResultType
11 | {
12 | ///
13 | /// 是否成功
14 | ///
15 | IsSuccess = 1,
16 | ///
17 | /// 句柄
18 | ///
19 | Handle = 2,
20 | ///
21 | /// 进程id
22 | ///
23 | Id
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Event/Structs/KeyboardEventDataStruct.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Event.Structs
6 | {
7 | public struct KeyboardEventDataStruct
8 | {
9 | ///
10 | /// 操作up抬起,down按下
11 | ///
12 | public string Action { get; set; }
13 | ///
14 | /// 按键名字符串
15 | ///
16 | public string KeyName { get; set; }
17 | ///
18 | /// 按键虚拟键码
19 | ///
20 | public int KeyCode { get; set; }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Models/SystemNotificationActionInputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Controls.Action.Models
7 | {
8 | public class SystemNotificationActionInputModel
9 | {
10 | public string Title { get; set; }
11 | public string Content { get; set; }
12 | public ComBoxModel ToastScenarioType { get; set; }
13 | public string Icon { get; set; }
14 | public ComBoxModel ToastActionType { get; set; }
15 | public string Url { get; set; }
16 |
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | [assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)]
4 |
5 | // 在此类的 SDK 样式项目中,现在,在此文件中早前定义的几个程序集属性将在生成期间自动添加,并使用在项目属性中定义的值进行填充。有关包含的属性以及如何定制此过程的详细信息,请参阅
6 | // https://aka.ms/assembly-info-properties
7 |
8 |
9 | // 将 ComVisible 设置为 false 会使此程序集中的类型对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,请将该类型的 ComVisible
10 | // 属性设置为 true。
11 |
12 | [assembly: ComVisible(false)]
13 |
14 | // 如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID。
15 |
16 | [assembly: Guid("61cfe2cb-1ebe-42c1-bf15-8498eaee2724")]
17 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Types/ToastType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Types
6 | {
7 | ///
8 | /// 提醒类型
9 | ///
10 | public enum ToastType
11 | {
12 | ///
13 | /// 成功
14 | ///
15 | Success,
16 | ///
17 | /// 失败
18 | ///
19 | Failed,
20 | ///
21 | /// 警告
22 | ///
23 | Warning,
24 | ///
25 | /// 一般
26 | ///
27 | Normal
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Models/Settings/GeneralModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Models.Settings
6 | {
7 | public class GeneralModel : UINotifyPropertyChanged
8 | {
9 | private bool IsDeviceStartupRun_;
10 | ///
11 | /// 是否启用开机启动
12 | ///
13 | public bool IsDeviceStartupRun
14 | {
15 | get { return IsDeviceStartupRun_; }
16 | set
17 | {
18 | IsDeviceStartupRun_ = value;
19 | OnPropertyChanged();
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Event/Types/ProcessCreatedEventVariableType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Event.Types
6 | {
7 | public enum ProcessCreatedEventVariableType
8 | {
9 | ///
10 | /// 进程名称
11 | ///
12 | ProcessName,
13 | ///
14 | /// 执行路径
15 | ///
16 | ExecutablePath,
17 | ///
18 | /// 句柄
19 | ///
20 | Handle,
21 | ///
22 | /// 命令行参数
23 | ///
24 | CommandLine
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Services/ISettingsService.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Models.Settings;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Services
7 | {
8 | public interface ISettingsService
9 | {
10 | void Load();
11 | ///
12 | /// 更新程序设置
13 | ///
14 | /// 模块类型
15 | /// 模块数据
16 | void Update(T model);
17 | ///
18 | /// 获取程序设置
19 | ///
20 | ///
21 | SettingsModel GetSettings();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Navigation/Models/NavigationItemModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Base.Color;
2 | using ProjectEvent.UI.Controls.Base;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace ProjectEvent.UI.Controls.Navigation.Models
8 | {
9 | public class NavigationItemModel
10 | {
11 | public int ID { get; set; }
12 | public string Title { get; set; }
13 | public IconTypes Icon { get; set; }
14 | public ColorTypes IconColor { get; set; }
15 | public string BadgeText { get; set; }
16 | public string Uri { get; set; }
17 | //public bool IsSelected { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Condition/KeyboardEventCondition.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Condition.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace ProjectEvent.Core.Condition
8 | {
9 | public class KeyboardEventCondition : ICondition
10 | {
11 | public ConditionCheckResultModel Check()
12 | {
13 | //特殊事件直接通过
14 | var result = new ConditionCheckResultModel();
15 | result.IsValid = true;
16 | return result;
17 | }
18 |
19 | public bool IsPass(object data = null)
20 | {
21 | //特殊事件直接通过
22 | return true;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Condition/RunGameEventCondition.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Condition.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace ProjectEvent.Core.Condition
8 | {
9 | public class RunGameEventCondition : ICondition
10 | {
11 | public ConditionCheckResultModel Check()
12 | {
13 | //特殊事件直接通过
14 | var result = new ConditionCheckResultModel();
15 | result.IsValid = true;
16 | return result;
17 | }
18 |
19 | public bool IsPass(object data = null)
20 | {
21 | //特殊事件直接通过
22 | return true;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Views/IndexPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Windows;
5 | using System.Windows.Controls;
6 | using System.Windows.Data;
7 | using System.Windows.Documents;
8 | using System.Windows.Input;
9 | using System.Windows.Media;
10 | using System.Windows.Media.Imaging;
11 | using System.Windows.Navigation;
12 | using System.Windows.Shapes;
13 |
14 | namespace ProjectEvent.UI.Views
15 | {
16 | ///
17 | /// IndexPage.xaml 的交互逻辑
18 | ///
19 | public partial class IndexPage : Page
20 | {
21 | public IndexPage()
22 | {
23 | InitializeComponent();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Controls.Window;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Shapes;
13 |
14 | namespace ProjectEvent.UI
15 | {
16 | ///
17 | /// MainWindow.xaml 的交互逻辑
18 | ///
19 | public partial class MainWindow : DefaultWindow
20 | {
21 | public MainWindow()
22 | {
23 | InitializeComponent();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Models/ConditionModels/IntervalTimerConditionModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Models.ConditionModels
6 | {
7 | public class IntervalTimerConditionModel : UINotifyPropertyChanged
8 | {
9 | private string Second_ = "60";
10 | public string Second
11 | {
12 | get { return Second_; }
13 | set { Second_ = value; OnPropertyChanged(); }
14 | }
15 |
16 | private string Num_ = "1";
17 | public string Num
18 | {
19 | get { return Num_; }
20 | set { Num_ = value; OnPropertyChanged(); }
21 | }
22 |
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Condition/NetworkStatusEventCondition.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Condition.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace ProjectEvent.Core.Condition
8 | {
9 | public class NetworkStatusEventCondition : ICondition
10 | {
11 | public ConditionCheckResultModel Check()
12 | {
13 | //特殊事件直接通过
14 | var result = new ConditionCheckResultModel();
15 | result.IsValid = true;
16 | return result;
17 | }
18 |
19 | public bool IsPass(object data = null)
20 | {
21 | //特殊事件直接通过
22 | return true;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Views/EventLogPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Windows;
5 | using System.Windows.Controls;
6 | using System.Windows.Data;
7 | using System.Windows.Documents;
8 | using System.Windows.Input;
9 | using System.Windows.Media;
10 | using System.Windows.Media.Imaging;
11 | using System.Windows.Navigation;
12 | using System.Windows.Shapes;
13 |
14 | namespace ProjectEvent.UI.Views
15 | {
16 | ///
17 | /// EventLogPage.xaml 的交互逻辑
18 | ///
19 | public partial class EventLogPage : Page
20 | {
21 | public EventLogPage()
22 | {
23 | InitializeComponent();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Views/SettingsPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Windows;
5 | using System.Windows.Controls;
6 | using System.Windows.Data;
7 | using System.Windows.Documents;
8 | using System.Windows.Input;
9 | using System.Windows.Media;
10 | using System.Windows.Media.Imaging;
11 | using System.Windows.Navigation;
12 | using System.Windows.Shapes;
13 |
14 | namespace ProjectEvent.UI.Views
15 | {
16 | ///
17 | /// SettingsPage.xaml 的交互逻辑
18 | ///
19 | public partial class SettingsPage : Page
20 | {
21 | public SettingsPage()
22 | {
23 | InitializeComponent();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Models/ConditionModels/FileChangedConditionModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Models.ConditionModels
6 | {
7 | public class FileChangedConditionModel : UINotifyPropertyChanged
8 | {
9 | private string WatchPath_;
10 | public string WatchPath
11 | {
12 | get { return WatchPath_; }
13 | set { WatchPath_ = value; OnPropertyChanged(); }
14 | }
15 | private string Extname_ = "*.*";
16 | public string Extname
17 | {
18 | get { return Extname_; }
19 | set { Extname_ = value; OnPropertyChanged(); }
20 | }
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/IFActionParameterModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Action.Types;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.Core.Action.Models
7 | {
8 | public class IFActionParameterModel
9 | {
10 | //public BaseIFActionInputModel LeftInput { get; set; }
11 | //public BaseIFActionInputModel RightInput { get; set; }
12 | public string LeftInput { get; set; }
13 | public string RightInput { get; set; }
14 | public IFActionConditionType Condition { get; set; }
15 |
16 | public List PassActions { get; set; }
17 |
18 | public List NoPassActions { get; set; }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/HttpRequestActionParameterModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Net.Types;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.Core.Action.Models
7 | {
8 | public class HttpRequestActionParameterModel
9 | {
10 | public string Url { get; set; }
11 | public int Timeout { get; set; }
12 | public Dictionary Headers { get; set; }
13 | public Dictionary QueryParams { get; set; }
14 | public Dictionary Files { get; set; }
15 | public ParamsType ParamsType { get; set; }
16 | public MethodType Method { get; set; }
17 | public string JsonStr { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/InputGroup/Models/InputModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Controls.Action.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using System.Windows;
6 |
7 | namespace ProjectEvent.UI.Controls.InputGroup.Models
8 | {
9 | public class InputModel
10 | {
11 | public InputType Type { get; set; }
12 | public string BindingName { get; set; }
13 | public string Placeholder { get; set; }
14 |
15 | public DependencyProperty BindingProperty { get; set; }
16 | public string Title { get; set; }
17 | ///
18 | /// 可选择项(仅输入类型是select时有效)
19 | ///
20 | public List SelectItems { get; set; }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Types/ToastScenarioType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Types
6 | {
7 | public enum ToastScenarioType
8 | {
9 | ///
10 | /// 默认
11 | ///
12 | Default,
13 | ///
14 | /// 提醒通知。 这类通知将以预先展开的状态显示在用户屏幕上并一直显示,直至消失。
15 | ///
16 | Reminder,
17 | ///
18 | /// 警报通知。 这类通知将以预先展开的状态显示在用户屏幕上并一直显示,直至消失。 音频在默认情况下将循环播放,并将使用警报音频。
19 | ///
20 | Alarm,
21 | ///
22 | /// 来电通知。 这将以特殊通话格式以预先展开的形式显示在用户屏幕上并一直显示,直至消失。 音频在默认情况下将循环播放,并将使用铃声音频。
23 | ///
24 | IncomingCall
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Models/UINotifyPropertyChanged.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Runtime.CompilerServices;
5 | using System.Text;
6 |
7 | namespace ProjectEvent.UI.Models
8 | {
9 | public class UINotifyPropertyChanged : INotifyPropertyChanged
10 | {
11 | public event PropertyChangedEventHandler PropertyChanged;
12 |
13 | public void OnPropertyChanged([CallerMemberName]string propertyName = "")
14 | {
15 |
16 | PropertyChangedEventHandler handler = PropertyChanged;
17 | if (handler != null)
18 | {
19 | handler.Invoke(this, new PropertyChangedEventArgs(propertyName));
20 | }
21 |
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Converters/ToStringConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Text;
5 | using System.Windows.Data;
6 |
7 | namespace ProjectEvent.UI.Controls.Converters
8 | {
9 | [ValueConversion(typeof(object), typeof(string))]
10 | public class ToStringConverter : IValueConverter
11 | {
12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
13 | {
14 | return value == null ? null : value.ToString();
15 | }
16 |
17 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
18 | {
19 | throw new NotImplementedException();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/ItemSelect/Models/ItemModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Base.Color;
2 | using ProjectEvent.UI.Controls.Base;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace ProjectEvent.UI.Controls.ItemSelect.Models
8 | {
9 | public class ItemModel
10 | {
11 | public int ID { get; set; }
12 | public string Title { get; set; }
13 | public string Tag { get; set; } = string.Empty;
14 |
15 | public string Description { get; set; } = string.Empty;
16 | public string ImageUri { get; set; }
17 | public IconTypes Icon { get; set; } = IconTypes.AppIconDefault;
18 | public bool IsSelected { get; set; }
19 | public ColorTypes Color { get; set; } = ColorTypes.White;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Event/EventLoger.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Event.Models;
2 | using ProjectEvent.Core.Event.Types;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Text;
7 |
8 | namespace ProjectEvent.Core.Event
9 | {
10 | public static class EventLoger
11 | {
12 | private static List _logs = new List();
13 |
14 | public static void Add(EventLogModel eventLog)
15 | {
16 | eventLog.ID = _logs.Count + 1;
17 | eventLog.Time = DateTime.Now;
18 | _logs.Add(eventLog);
19 | }
20 |
21 | public static List Get(EventType eventType)
22 | {
23 | return _logs.Where(m => m.EventType == eventType).ToList();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Models/DataModels/GroupModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.UI.Controls.Base;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.UI.Models.DataModels
7 | {
8 | ///
9 | /// 分组数据模型
10 | ///
11 | public class GroupModel
12 | {
13 | ///
14 | /// 分组ID
15 | ///
16 | public int ID { get; set; }
17 | ///
18 | /// 分组名称
19 | ///
20 | public string Name { get; set; }
21 | ///
22 | /// 分组图标
23 | ///
24 | public IconTypes Icon { get; set; }
25 | ///
26 | /// 排序
27 | ///
28 | public int Index { get; set; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Extensions/ManagementBaseObjectExtentions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.Core.Extensions
6 | {
7 | public static class ManagementBaseObjectExtentions
8 | {
9 | public static string TryGetProperty(this System.Management.ManagementBaseObject wmiObj, string propertyName)
10 | {
11 | string retval;
12 | try
13 | {
14 | var p = wmiObj.GetPropertyValue(propertyName);
15 | retval = p != null ? p.ToString() : string.Empty;
16 | }
17 | catch (System.Management.ManagementException)
18 | {
19 | retval = string.Empty;
20 | }
21 | return retval;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Controls/Action/Types/InputType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Controls.Action.Types
6 | {
7 | public enum InputType
8 | {
9 | ///
10 | /// 文本输入
11 | ///
12 | Text,
13 | ///
14 | /// 下拉选择
15 | ///
16 | Select,
17 | ///
18 | /// 自定义键值
19 | ///
20 | CustomKeyValue,
21 | ///
22 | /// 数字
23 | ///
24 | Number,
25 | ///
26 | /// 单选
27 | ///
28 | Bool,
29 | ///
30 | /// 多行文本输入
31 | ///
32 | MultiLineText,
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Models/ActionModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Action.Types;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.Core.Action.Models
7 | {
8 | public class ActionModel
9 | {
10 | ///
11 | /// action id
12 | ///
13 | public int ID { get; set; }
14 | ///
15 | /// 执行次数
16 | ///
17 | public int Num { get; set; }
18 |
19 | ///
20 | /// 执行操作
21 | ///
22 | public ActionType Action { get; set; }
23 |
24 | ///
25 | /// 操作参数
26 | ///
27 | public object Parameter { get; set; }
28 | //public BaseParameterModel Parameter { get; set; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Views/AddEventPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Windows;
5 | using System.Windows.Controls;
6 | using System.Windows.Data;
7 | using System.Windows.Documents;
8 | using System.Windows.Input;
9 | using System.Windows.Media;
10 | using System.Windows.Media.Imaging;
11 | using System.Windows.Navigation;
12 | using System.Windows.Shapes;
13 |
14 | namespace ProjectEvent.UI.Views
15 | {
16 | ///
17 | /// AddEventPage.xaml 的交互逻辑
18 | ///
19 | public partial class AddEventPage : Page
20 | {
21 | public AddEventPage()
22 | {
23 | InitializeComponent();
24 | }
25 |
26 | private void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
27 | {
28 |
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Event/Models/EventLogModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Event.Types;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace ProjectEvent.Core.Event.Models
7 | {
8 | ///
9 | /// 事件日志模型
10 | ///
11 | public class EventLogModel
12 | {
13 | public int ID { get; set; }
14 | ///
15 | /// 执行时间
16 | ///
17 | public DateTime Time { get; set; }
18 | ///
19 | /// 是否成功
20 | ///
21 | public bool IsSuccess { get; set; }
22 | ///
23 | /// 事件类型
24 | ///
25 | public EventType EventType { get; set; }
26 | ///
27 | /// 自定义标签
28 | ///
29 | public object Tag { get; set; }
30 |
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/NotifyIconWpf/Interop/NotifyIconVersion.cs:
--------------------------------------------------------------------------------
1 | namespace Hardcodet.Wpf.TaskbarNotification.Interop
2 | {
3 | ///
4 | /// The notify icon version that is used. The higher
5 | /// the version, the more capabilities are available.
6 | ///
7 | public enum NotifyIconVersion
8 | {
9 | ///
10 | /// Default behavior (legacy Win95). Expects
11 | /// a size of 488.
12 | ///
13 | Win95 = 0x0,
14 |
15 | ///
16 | /// Behavior representing Win2000 an higher. Expects
17 | /// a size of 504.
18 | ///
19 | Win2000 = 0x3,
20 |
21 | ///
22 | /// Extended tooltip support, which is available
23 | /// for Vista and later.
24 | ///
25 | Vista = 0x4
26 | }
27 | }
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Action/Checks/WriteFileCheck.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json.Linq;
2 | using ProjectEvent.Core.Action.Models;
3 | using ProjectEvent.Core.Helper;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Text;
7 |
8 | namespace ProjectEvent.Core.Action.Checks
9 | {
10 | public class WriteFileCheck : ICheck
11 | {
12 | private readonly object parameter;
13 | public WriteFileCheck(object parameter)
14 | {
15 | this.parameter = parameter;
16 | }
17 | public bool IsCheck()
18 | {
19 | var p = ObjectConvert.Get(parameter);
20 | if (p == null)
21 | {
22 | return false;
23 | }
24 | else if (p.FilePath == string.Empty)
25 | {
26 | return false;
27 | }
28 | return true;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Condition/WIFIConnectedEventCondition.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Condition.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace ProjectEvent.Core.Condition
8 | {
9 | public class WIFIConnectedEventCondition : ICondition
10 | {
11 | ///
12 | /// 连接指定WIFI名称
13 | ///
14 | public string SSID { get; set; }
15 | public ConditionCheckResultModel Check()
16 | {
17 | //特殊事件直接通过
18 | var result = new ConditionCheckResultModel();
19 | result.IsValid = true;
20 | return result;
21 | }
22 |
23 | public bool IsPass(object data = null)
24 | {
25 | var filterSSID = data != null ? data.ToString() : string.Empty;
26 | return string.IsNullOrEmpty(SSID) || SSID == filterSSID;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Styles/Light/Controls.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Models/ConditionModels/BluetoothEventConditionModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Models.ConditionModels
6 | {
7 | public class BluetoothEventConditionModel : UINotifyPropertyChanged
8 | {
9 | private string DeviceName_;
10 | public string DeviceName
11 | {
12 | get { return DeviceName_; }
13 | set { DeviceName_ = value; OnPropertyChanged(); }
14 | }
15 |
16 | private bool Caseinsensitive_;
17 | public bool Caseinsensitive
18 | {
19 | get { return Caseinsensitive_; }
20 | set { Caseinsensitive_ = value; OnPropertyChanged(); }
21 | }
22 | private bool FuzzyMatch_;
23 | public bool FuzzyMatch
24 | {
25 | get { return FuzzyMatch_; }
26 | set { FuzzyMatch_ = value; OnPropertyChanged(); }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Models/ConditionModels/ProcessCreatedConditionModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjectEvent.UI.Models.ConditionModels
6 | {
7 | public class ProcessCreatedConditionModel : UINotifyPropertyChanged
8 | {
9 | private string ProcessName_;
10 | public string ProcessName
11 | {
12 | get { return ProcessName_; }
13 | set { ProcessName_ = value; OnPropertyChanged(); }
14 | }
15 |
16 | private bool Caseinsensitive_;
17 | public bool Caseinsensitive
18 | {
19 | get { return Caseinsensitive_; }
20 | set { Caseinsensitive_ = value; OnPropertyChanged(); }
21 | }
22 | private bool FuzzyMatch_;
23 | public bool FuzzyMatch
24 | {
25 | get { return FuzzyMatch_; }
26 | set { FuzzyMatch_ = value; OnPropertyChanged(); }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Condition/OnDeviceStartupCondition.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Condition.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace ProjectEvent.Core.Condition
8 | {
9 | public class OnDeviceStartupCondition : ICondition
10 | {
11 |
12 | public ConditionCheckResultModel Check()
13 | {
14 | //开机启动不需要输入条件,直接通过
15 | var result = new ConditionCheckResultModel();
16 | result.IsValid = true;
17 | return result;
18 | }
19 |
20 | public bool IsPass(object data = null)
21 | {
22 | Windows.ApplicationModel.Activation.IActivatedEventArgs args =
23 | global::Windows.ApplicationModel.AppInstance.GetActivatedEventArgs();
24 | return args.Kind == Windows.ApplicationModel.Activation.ActivationKind.StartupTask;
25 | //return Environment.GetCommandLineArgs().Contains("-autorun");//注册表
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/ProjectEvent.Core/Event/Models/EventModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Action.Models;
2 | using ProjectEvent.Core.Condition;
3 | using ProjectEvent.Core.Event.Types;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Text;
7 |
8 | namespace ProjectEvent.Core.Event.Models
9 | {
10 | public class EventModel
11 | {
12 | public int ID { get; set; }
13 | public bool IsEnabled { get; set; }
14 | public string Name { get; set; }
15 | public EventType EventType { get; set; }
16 | public ICondition Condition { get; set; }
17 |
18 | public List Actions { get; set; }
19 |
20 | public EventModel Copy()
21 | {
22 | return new EventModel()
23 | {
24 | ID = ID,
25 | Actions = Actions,
26 | Condition = Condition,
27 | EventType = EventType,
28 | IsEnabled = IsEnabled,
29 | Name = Name
30 | };
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/Models/ConditionModels/TimeChangedConditionModel.cs:
--------------------------------------------------------------------------------
1 | using ProjectEvent.Core.Condition.Types;
2 | using ProjectEvent.UI.Controls.Action.Models;
3 | using ProjectEvent.UI.Event;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Text;
7 |
8 | namespace ProjectEvent.UI.Models.ConditionModels
9 | {
10 | public class TimeChangedConditionModel : UINotifyPropertyChanged
11 | {
12 | private DateTime Time_ = DateTime.Now;
13 | public DateTime Time
14 | {
15 | get { return Time_; }
16 | set { Time_ = value; OnPropertyChanged(); }
17 | }
18 |
19 | private ComBoxModel RepetitionType_ = new ComBoxModel()
20 | {
21 | ID = (int)TimeChangedRepetitionType.None,
22 | DisplayName = "不重复"
23 | };
24 | public ComBoxModel RepetitionType
25 | {
26 | get { return RepetitionType_; }
27 | set { RepetitionType_ = value; OnPropertyChanged(); }
28 | }
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/ProjectEvent.UI/ViewModels/Command.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Windows.Input;
5 |
6 | namespace ProjectEvent.UI.ViewModels
7 | {
8 | public class Command : ICommand
9 | {
10 | private Action