├── .github
├── ISSUE_TEMPLATE
│ └── cn-bug-report.yaml
└── workflows
│ ├── Release.yml
│ ├── mirrorchyan.yml
│ └── mirrorchyan_release_note.yml
├── .gitignore
├── .idea
└── .idea.MFAAvalonia
│ └── .idea
│ ├── .gitignore
│ ├── avalonia.xml
│ ├── encodings.xml
│ ├── indexLayout.xml
│ └── vcs.xml
├── Directory.Build.props
├── LICENSE
├── LazyStaticGenerator
├── Generators
│ ├── LazyStaticGenerator.cs
│ └── MaaPropertyGenerator.cs
└── LazyStaticGenerator.csproj
├── MFAAvalonia.sln
├── MFAAvalonia.sln.DotSettings.user
├── MFAAvalonia
├── App.axaml
├── App.axaml.cs
├── Assets
│ ├── Localization
│ │ ├── Strings.Designer.cs
│ │ ├── Strings.en-us.resx
│ │ ├── Strings.resx
│ │ └── Strings.zh-hant.resx
│ ├── Style
│ │ ├── Geometry.axaml
│ │ ├── MdXaml.axaml
│ │ ├── MdXamlDocStyle.axaml
│ │ └── MdXamlStyles.axaml
│ ├── Theme
│ │ ├── DarkTheme.axaml
│ │ └── LightTheme.axaml
│ └── logo.ico
├── Configuration
│ ├── ConfigurationKeys.cs
│ ├── ConfigurationManager.cs
│ ├── GlobalConfiguration.cs
│ └── MFAConfiguration.cs
├── Extensions
│ ├── CheckBoxExtensions.cs
│ ├── ComboBoxExtensions.cs
│ ├── DragDropExtensions.cs
│ ├── IconProperties.cs
│ ├── MFAExtensions.cs
│ ├── MaaFW
│ │ ├── MaaControllerTypes.cs
│ │ ├── MaaInterface.cs
│ │ ├── MaaInterfaceAdvancedOption.cs
│ │ ├── MaaNode.cs
│ │ └── MaaProcessor.cs
│ ├── ScrollViewerExtensions.cs
│ └── ServiceProviderExtension.cs
├── Helper
│ ├── AutoInitDictionary.cs
│ ├── AvaloniaMemoryCracker.cs
│ ├── BrushHelper.cs
│ ├── Converters
│ │ ├── AnnouncementTitleConverter.cs
│ │ ├── CustomIsEnabledConverter.cs
│ │ ├── DeviceDisplayConverter.cs
│ │ ├── DynamicWidthConverter.cs
│ │ ├── GenericSingleOrListConverter.cs
│ │ ├── MaaInterfaceSelectAdvancedConverter.cs
│ │ ├── MaaInterfaceSelectOptionConverter.cs
│ │ ├── ReplaceConverter.cs
│ │ ├── SingleOrNestedListConverter.cs
│ │ ├── StringOrBoolOrObjectConverter.cs
│ │ ├── StringOrObjectConverter.cs
│ │ ├── TitleConverter.cs
│ │ ├── UIntOrObjectConverter.cs
│ │ ├── UniversalEnumConverter.cs
│ │ └── UniversalEqualityConverter.cs
│ ├── DispatcherHelper.cs
│ ├── EmulatorHelper.cs
│ ├── ExternalNotificationHelper.cs
│ ├── GlobalHotkeyService.cs
│ ├── IconHelper.cs
│ ├── Instances.cs
│ ├── JsonHelper.cs
│ ├── LangKeys.cs
│ ├── LangKeys.tt
│ ├── LanguageHelper.cs
│ ├── LoggerHelper.cs
│ ├── MFAUrls.cs
│ ├── ServiceRegistry.cs
│ ├── SimpleEncryptionHelper.cs
│ ├── TaskManager.cs
│ ├── ThemeHelper.cs
│ ├── ToastHelper.cs
│ ├── ToastNotification.cs
│ ├── TrayIconManager.cs
│ ├── ValueType
│ │ ├── DragItemViewModel.cs
│ │ ├── MFAHotKey.cs
│ │ ├── MFATask.cs
│ │ └── ObservableQueue.cs
│ ├── VersionChecker.cs
│ └── ViewsHelper.cs
├── Img
│ └── preview.png
├── MFAAvalonia.csproj
├── MFAAvalonia.desktop
├── MFAAvalonia.ico
├── NuGet.Config
├── Program.cs
├── Utilities
│ ├── Attributes
│ │ ├── LazyStaticAttribute.cs
│ │ ├── MaaJsonPropertyAttribute.cs
│ │ └── MaaPropertyAttribute.cs
│ └── UrlUtilities.cs
├── ViewLocator.cs
├── ViewModels
│ ├── Other
│ │ ├── LocalizationViewModel.cs
│ │ ├── LogItemViewModel.cs
│ │ ├── SupportedLanguage.cs
│ │ └── ThemeItemViewModel.cs
│ ├── Pages
│ │ ├── ResourcesViewModel.cs
│ │ ├── SettingsViewModel.cs
│ │ └── TaskQueueViewModel.cs
│ ├── UsersControls
│ │ ├── AdbEditorDialogViewModel.cs
│ │ ├── AddTaskDialogViewModel.cs
│ │ ├── CustomThemeDialogViewModel.cs
│ │ └── Settings
│ │ │ ├── ConnectSettingsUserControlModel.cs
│ │ │ ├── ExternalNotificationSettingsUserControlModel.cs
│ │ │ ├── GameSettingsUserControlModel.cs
│ │ │ ├── GuiSettingsUserControlModel.cs
│ │ │ ├── PerformanceUserControlModel.cs
│ │ │ ├── StartSettingsUserControlModel.cs
│ │ │ ├── TimerSettingsUserControlModel.cs
│ │ │ └── VersionUpdateSettingsUserControlModel.cs
│ ├── ViewModelBase.cs
│ └── Windows
│ │ ├── AnnouncementViewModel.cs
│ │ └── RootViewModel.cs
├── Views
│ ├── Pages
│ │ ├── ResourcesView.axaml
│ │ ├── ResourcesView.axaml.cs
│ │ ├── SettingsView.axaml
│ │ ├── SettingsView.axaml.cs
│ │ ├── TaskQueueView.axaml
│ │ └── TaskQueueView.axaml.cs
│ ├── UserControls
│ │ ├── AdbEditorDialogView.axaml
│ │ ├── AdbEditorDialogView.axaml.cs
│ │ ├── AddTaskDialogView.axaml
│ │ ├── AddTaskDialogView.axaml.cs
│ │ ├── CustomThemeDialogView.axaml
│ │ ├── CustomThemeDialogView.axaml.cs
│ │ ├── DragAdorner.cs
│ │ ├── HotKeyEditor.axaml
│ │ ├── HotKeyEditor.axaml.cs
│ │ ├── PinButton.cs
│ │ └── Settings
│ │ │ ├── AboutUserControl.axaml
│ │ │ ├── AboutUserControl.axaml.cs
│ │ │ ├── ConfigurationMgrUserControl.axaml
│ │ │ ├── ConfigurationMgrUserControl.axaml.cs
│ │ │ ├── ConnectSettingsUserControl.axaml
│ │ │ ├── ConnectSettingsUserControl.axaml.cs
│ │ │ ├── ExternalNotificationSettingsUserControl.axaml
│ │ │ ├── ExternalNotificationSettingsUserControl.axaml.cs
│ │ │ ├── GameSettingsUserControl.axaml
│ │ │ ├── GameSettingsUserControl.axaml.cs
│ │ │ ├── GuiSettingsUserControl.axaml
│ │ │ ├── GuiSettingsUserControl.axaml.cs
│ │ │ ├── HotKeySettingsUserControl.axaml
│ │ │ ├── HotKeySettingsUserControl.axaml.cs
│ │ │ ├── PerformanceUserControl.axaml
│ │ │ ├── PerformanceUserControl.axaml.cs
│ │ │ ├── StartSettingsUserControl.axaml
│ │ │ ├── StartSettingsUserControl.axaml.cs
│ │ │ ├── TimerSettingsUserControl.axaml
│ │ │ ├── TimerSettingsUserControl.axaml.cs
│ │ │ ├── VersionUpdateSettingsUserControl.axaml
│ │ │ └── VersionUpdateSettingsUserControl.axaml.cs
│ └── Windows
│ │ ├── AnnouncementView.axaml
│ │ ├── AnnouncementView.axaml.cs
│ │ ├── ErrorView.axaml
│ │ ├── ErrorView.axaml.cs
│ │ ├── RootView.axaml
│ │ └── RootView.axaml.cs
└── app.manifest
├── MFAUpdater
├── MFAUpdater.csproj
├── Program.cs
└── logo.ico
├── README.md
├── README_en.md
├── SukiUI
├── Animations
│ ├── SquishyDragExtensions.cs
│ ├── SquishyOverExtensions.cs
│ ├── SukiEasingOut.cs
│ └── SukiSpringEase.cs
├── ColorTheme
│ ├── Dark.axaml
│ ├── Light.axaml
│ └── NotificationColor.cs
├── Content
│ ├── Icons.cs
│ ├── Images
│ │ └── icons8-file-explorer-new-48.png
│ └── Shaders
│ │ ├── Background
│ │ ├── backgroundshadcn.sksl
│ │ ├── bubble.sksl
│ │ ├── bubblestrong.sksl
│ │ ├── cells.sksl
│ │ ├── flat.sksl
│ │ ├── gradient.sksl
│ │ ├── gradientdarker.sksl
│ │ ├── gradientsoft.sksl
│ │ └── waves.sksl
│ │ └── Loading
│ │ ├── glow.sksl
│ │ ├── pellets.sksl
│ │ └── simple.sksl
├── Controls
│ ├── BusyArea.axaml
│ ├── BusyArea.axaml.cs
│ ├── CircleProgressBar.axaml
│ ├── CircleProgressBar.axaml.cs
│ ├── CodeView.axaml
│ ├── CodeView.axaml.cs
│ ├── ContentExpandControl.axaml
│ ├── ContentExpandControl.axaml.cs
│ ├── Experimental
│ │ ├── ChatUI
│ │ │ ├── ChatMessage.cs
│ │ │ ├── ChatUI.axaml
│ │ │ └── ChatUI.axaml.cs
│ │ └── DesktopEnvironment
│ │ │ ├── InternalWindow.axaml
│ │ │ ├── InternalWindow.axaml.cs
│ │ │ ├── SDESoftware.cs
│ │ │ ├── SukiDesktopEnvironment.axaml
│ │ │ ├── SukiDesktopEnvironment.axaml.cs
│ │ │ ├── WindowManager.axaml
│ │ │ └── WindowManager.axaml.cs
│ ├── GlassMorphism
│ │ ├── BlurBackground.cs
│ │ ├── GlassCard.axaml
│ │ └── GlassCard.axaml.cs
│ ├── GroupBox.axaml
│ ├── GroupBox.axaml.cs
│ ├── Hosts
│ │ ├── SukiDialogHost.axaml
│ │ ├── SukiDialogHost.cs
│ │ ├── SukiMessageBoxHost.axaml
│ │ ├── SukiMessageBoxHost.axaml.cs
│ │ ├── SukiToastHost.axaml
│ │ └── SukiToastHost.cs
│ ├── InfoBadge.axaml
│ ├── InfoBadge.axaml.cs
│ ├── InfoBar.axaml
│ ├── InfoBar.axaml.cs
│ ├── Loading.cs
│ ├── PasswordBox.axaml
│ ├── PasswordBox.axaml.cs
│ ├── PropertyGrid
│ │ ├── CategoryViewModel.cs
│ │ ├── DateTimePickerSelectedDateConverter.cs
│ │ ├── IPropertyViewModel.cs
│ │ ├── IPropertyViewModel{T}.cs
│ │ ├── InstanceViewModel.cs
│ │ ├── PropertyGrid.axaml
│ │ ├── PropertyGrid.axaml.cs
│ │ ├── PropertyGridDialog.axaml
│ │ ├── PropertyGridDialog.axaml.cs
│ │ ├── PropertyGridTemplateSelector.axaml
│ │ ├── PropertyGridTemplateSelector.axaml.cs
│ │ ├── PropertyGridWindow.axaml
│ │ ├── PropertyGridWindow.axaml.cs
│ │ └── ViewModels
│ │ │ ├── BoolViewModel.cs
│ │ │ ├── ComplexTypeViewModel.cs
│ │ │ ├── DateTimeOffsetViewModel.cs
│ │ │ ├── DateTimeViewModel.cs
│ │ │ ├── DecimalViewModel.cs
│ │ │ ├── DoubleViewModel.cs
│ │ │ ├── EnumViewModel.cs
│ │ │ ├── FloatViewModel.cs
│ │ │ ├── IntegerViewModel.cs
│ │ │ ├── LongViewModel.cs
│ │ │ ├── PropertyViewModelBase.cs
│ │ │ └── StringViewModel.cs
│ ├── Settings
│ │ ├── SettingsLayout.axaml
│ │ ├── SettingsLayout.axaml.cs
│ │ └── SettingsLayoutItem.cs
│ ├── Stepper.axaml
│ ├── Stepper.axaml.cs
│ ├── SukiBackground.cs
│ ├── SukiDialog.axaml
│ ├── SukiDialog.cs
│ ├── SukiMainHost.axaml
│ ├── SukiMainHost.axaml.cs
│ ├── SukiSideMenu.axaml
│ ├── SukiSideMenu.axaml.cs
│ ├── SukiSideMenuItem.axaml
│ ├── SukiSideMenuItem.axaml.cs
│ ├── SukiStackPage.axaml
│ ├── SukiStackPage.axaml.cs
│ ├── SukiToast.axaml
│ ├── SukiToast.axaml.cs
│ ├── SukiTransitioningContentControl.axaml
│ ├── SukiTransitioningContentControl.axaml.cs
│ ├── SukiWindow.axaml
│ ├── SukiWindow.axaml.cs
│ ├── WaveProgress.axaml
│ └── WaveProgress.axaml.cs
├── Converters
│ ├── AdvancedIconSelectorConverter.cs
│ ├── BoolToPasswordCharConverter.cs
│ ├── ComboBoxItemConverter.cs
│ ├── IfConditionConverter.cs
│ ├── InfoBadgeOverflowConverter.cs
│ ├── IsCheckedToClassConverter.cs
│ ├── IsNotNullOrEmptyToDouble.cs
│ ├── ProgressToContentConverter.cs
│ ├── SideMenuScrollerToOpacityMask.cs
│ ├── SideMenuScrollerToVisibilityBool.cs
│ └── WaveProgress
│ │ ├── WaveProgressGradientOffsetConverter.cs
│ │ ├── WaveProgressValueColorConverter.cs
│ │ ├── WaveProgressValueConverter.cs
│ │ └── WaveProgressValueTextConverter.cs
├── CustomFont
│ ├── Quicksand-Bold.ttf
│ ├── Quicksand-Light.ttf
│ ├── Quicksand-Medium.ttf
│ ├── Quicksand-Regular.ttf
│ └── Quicksand-SemiBold.ttf
├── Dialogs
│ ├── DialogContentMaxWidthValueConverter.cs
│ ├── FluentSukiDialogBuilder.cs
│ ├── ISukiDialog.cs
│ ├── ISukiDialogManager.cs
│ ├── SukiDialogBuilder.cs
│ ├── SukiDialogManager.cs
│ └── SukiDialogManagerEventArgs.cs
├── Enums
│ ├── CornerPosition.cs
│ ├── SideMenuTogglePaneButtonPositionOptions.cs
│ ├── SukiBackgroundStyle.cs
│ ├── SukiButtonStyles.cs
│ ├── SukiColor.cs
│ └── ToastLocation.cs
├── Extensions
│ ├── ColorExtensions.cs
│ ├── ControlExtensions.cs
│ ├── EnumExtensions.cs
│ ├── MenuIconExtensions.cs
│ ├── ResourceNodeExtensions.cs
│ ├── TabControlExtensions.cs
│ └── WindowExtensions.cs
├── Helpers
│ ├── AnimationExtensions.cs
│ ├── CompositionAnimationHelper.cs
│ ├── ConditionalXAML
│ │ ├── If.cs
│ │ └── InlineSharp.cs
│ ├── ControlAnimations.cs
│ ├── DialogPool.cs
│ ├── FluentAnimator.cs
│ ├── SukiObservableObject.cs
│ ├── ToastPool.cs
│ └── ViewLocator.cs
├── Locale
│ ├── en-us.axaml
│ ├── en-us.axaml.cs
│ ├── zh-hans.axaml
│ ├── zh-hant.axaml
│ ├── zh_hans.axaml.cs
│ └── zh_hant.axaml.cs
├── MessageBox
│ ├── SukiMessageBox.cs
│ ├── SukiMessageBoxButtons.cs
│ ├── SukiMessageBoxButtonsFactory.cs
│ ├── SukiMessageBoxIcons.cs
│ ├── SukiMessageBoxIconsFactory.cs
│ ├── SukiMessageBoxOptions.cs
│ └── SukiMessageBoxResult.cs
├── Models
│ └── SukiColorTheme.cs
├── OIG.N5o-removebg-preview.png
├── Properties
│ ├── AssemblyInfo.cs
│ └── PublishProfiles
│ │ ├── FolderProfile.pubxml
│ │ └── FolderProfile.pubxml.user
├── Roboto-Medium.ttf
├── Roboto-Regular.ttf
├── SukiUI.csproj
├── Theme
│ ├── AutoCompleteBoxStyles.axaml
│ ├── BorderStyles.xaml
│ ├── Button.axaml
│ ├── ButtonLoadingStyles.axaml
│ ├── Calendar
│ │ ├── Calendar.axaml
│ │ ├── CalendarButton.axaml
│ │ ├── CalendarDayButton.axaml
│ │ └── CalendarItem.axaml
│ ├── CalendarDatePickerStyle.axaml
│ ├── CheckBoxStyles.axaml
│ ├── Colors.xaml
│ ├── ComboBoxItemStyle.axaml
│ ├── ComboBoxStyles.xaml
│ ├── ComboboxConverter.cs
│ ├── ContextMenu.axaml
│ ├── DataGridStyle.axaml
│ ├── DatePicker.axaml
│ ├── DropDownButton.axaml
│ ├── Expander.axaml
│ ├── FlyoutPresenter.axaml
│ ├── HyperlinkButton.axaml
│ ├── Index.axaml
│ ├── Index.axaml.cs
│ ├── ListBoxItemStyle.axaml
│ ├── ListBoxStyles.xaml
│ ├── ManagedFileChooser.axaml
│ ├── ManagedFileChooserConverters.cs
│ ├── Menu.axaml
│ ├── MenuFlyoutPresenter.axaml
│ ├── MenuItem.axaml
│ ├── NotificationCardStyle.axaml
│ ├── NotificationStyle.axaml
│ ├── NumericUpDownExtensions.cs
│ ├── NumericUpDownStyles.xaml
│ ├── PathIcon.axaml
│ ├── ProgressBar.axaml
│ ├── ProgressBarStyles.xaml
│ ├── RadioButtonStyles.xaml
│ ├── RichTextBoxStyles.axaml
│ ├── ScrollBarStyle.axaml
│ ├── ScrollViewerStyles.axaml
│ ├── ScrollableExtensions.cs
│ ├── Separator.axaml
│ ├── Shadcn
│ │ ├── BlackWhiteTheme.axaml
│ │ ├── ShadDarkStyles.axaml
│ │ └── Shadcn.cs
│ ├── SliderStyles.xaml
│ ├── SplitButton.axaml
│ ├── SplitView.axaml
│ ├── TabControl.axaml
│ ├── TabItem.axaml
│ ├── TextBlock.xaml
│ ├── TextBoxExtensions.cs
│ ├── TextBoxStyles.xaml
│ ├── TextEraserButton.axaml
│ ├── TextEraserButton.axaml.cs
│ ├── TextStyles.axaml
│ ├── TimePickerStyle.axaml
│ ├── ToggleButton.axaml
│ ├── ToggleSwitch.axaml
│ ├── ToolTipStyles.axaml
│ └── TreeViewStyles.xaml
├── Toasts
│ ├── FluentSukiToastBuilder.cs
│ ├── ISukiToast.cs
│ ├── ISukiToastManager.cs
│ ├── SukiToastBuilder.cs
│ ├── SukiToastDismissSource.cs
│ ├── SukiToastDismissedEventArgs.cs
│ ├── SukiToastManager.cs
│ └── SukiToastQueuedEventArgs.cs
├── Utilities
│ ├── Effects
│ │ ├── EffectBackgroundDraw.cs
│ │ ├── EffectDrawBase.cs
│ │ └── SukiEffect.cs
│ └── IsExternalInit.cs
└── suki_photo.ico
├── cliff.toml
├── dependencies.json
└── workflows
└── install.yml
/.github/ISSUE_TEMPLATE/cn-bug-report.yaml:
--------------------------------------------------------------------------------
1 | name: Bug 反馈(使用中文)
2 | description: 运行错误、操作异常、连接错误等
3 | labels: ["bug"]
4 | body:
5 | - type: checkboxes
6 | id: checks
7 | attributes:
8 | label: 在提问之前...
9 | description: |
10 | 请确认自己完成了要求之后再进行勾选
11 | options:
12 | - label: 我知道这个项目是独立的通用GUI项目,在这里反馈资源问题(如M9A)并不正确
13 | required: true
14 | - label: 我理解 Issue 是用于反馈和解决问题的,而非吐槽评论区,将尽可能提供更多信息帮助问题解决
15 | required: true
16 | - label: 我填写了简短且清晰明确的标题,以便开发者在翻阅 Issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
17 | required: true
18 | - label: 我使用的是当前更新版本的最新版,且已查看版本发布至今和 Pull Requests 中尚未发布的更新内容,并未提及该 Bug 已被修复的情况
19 | required: true
20 | - label: 我已检查了置顶议题(Pinned Issue)(公告)、活跃议题(Open Issue)、已关闭议题(Closed Issue),确认我的问题未被提及
21 | required: true
22 | - type: textarea
23 | id: describe
24 | attributes:
25 | label: 问题描述
26 | description: 描述问题时请尽可能详细
27 | validations:
28 | required: true
29 | - type: textarea
30 | id: version
31 | attributes:
32 | label: Version
33 | description: >-
34 | 请提供 MFA 版本。可在 MFA -> 设置 -> 软件更新中找到。
35 | placeholder: |
36 | MFA Version:
37 | validations:
38 | required: true
39 | - type: textarea
40 | id: logs
41 | attributes:
42 | label: 日志和配置文件
43 | description: |
44 | **请在关闭 MFA 后,上传以下 5 个文件:**
45 | 1. `debug` 文件夹中的 `maa.log` 日志文件,并说明问题出现的大致时间点
46 | 2. `log` 文件夹中的最新log
47 |
48 | 如果你在使用 MacBook,请点击屏幕左上角的“文件”,点击“打开日志文件夹”
49 | **请直接将完整的文件拖拽进来,而非自己裁切或复制的片段;若文件体积过大可压缩后再上传**
50 | placeholder: |
51 | 请确认上传文件前已关闭 MFA
52 | validations:
53 | required: true
54 | - type: textarea
55 | id: configuration
56 | attributes:
57 | label: 配置信息
58 | description: |
59 | 请说明操作系统及版本、模拟器品牌、模拟器分辨率、DPI、帧率;
60 | 最后请说明 GPU 加速推理是否开启,若开启请提供 GPU 型号。
61 | validations:
62 | required: true
63 | - type: textarea
64 | id: screenshots
65 | attributes:
66 | label: 截图或录屏
67 | description: |
68 | 可上传屏幕截图或录制以帮助解释你的问题,包括但不限于 MFA 软件截图、游戏画面截图
69 | 若是**识别相关问题**,请尽可能提供模拟器自带的截图工具截取的无遮挡的**原图**(或通过 adb 截取原图)
70 | 用其他的工具(如QQ/微信)截取的图片包含窗口边框且长宽比、分辨率不固定,不利于我们排除bug
71 | 若文件体积过大可压缩后再上传
72 | validations:
73 | required: false
74 | - type: textarea
75 | id: others
76 | attributes:
77 | label: 还有别的吗?
78 | description: |
79 | 任何能让我们对你所遇到的问题有更多了解的东西
80 | validations:
81 | required: false
82 |
--------------------------------------------------------------------------------
/.github/workflows/mirrorchyan.yml:
--------------------------------------------------------------------------------
1 | name: mirrorchyan
2 |
3 | on:
4 | workflow_dispatch:
5 |
6 | jobs:
7 | mirrorchyan:
8 | runs-on: macos-latest
9 | strategy:
10 | fail-fast: false
11 | matrix:
12 | os: [win, osx, linux]
13 | arch: [arm64, x64]
14 |
15 | steps:
16 | - uses: MirrorChyan/uploading-action@v1
17 | if: always()
18 | with:
19 | filetype: latest-release
20 | filename: "MFAAvalonia-*-${{ matrix.os }}-${{ matrix.arch }}.zip"
21 | mirrorchyan_rid: MFAAvalonia
22 |
23 | github_token: ${{ secrets.GITHUB_TOKEN }}
24 | owner: ${{ github.repository_owner }}
25 | repo: ${{ github.event.repository.name }}
26 | upload_token: ${{ secrets.MirrorChyanUploadToken }}
27 | os: ${{ matrix.os }}
28 | arch: ${{ matrix.arch }}
29 |
--------------------------------------------------------------------------------
/.github/workflows/mirrorchyan_release_note.yml:
--------------------------------------------------------------------------------
1 | name: mirrorchyan_release_note
2 |
3 | on:
4 | workflow_dispatch:
5 | release:
6 | types: [edited]
7 |
8 | jobs:
9 | mirrorchyan:
10 | runs-on: macos-latest
11 |
12 | steps:
13 | - id: uploading
14 | uses: MirrorChyan/release-note-action@v1
15 | with:
16 | mirrorchyan_rid: MFAAvalonia
17 |
18 | upload_token: ${{ secrets.MirrorChyanUploadToken }}
19 | github_token: ${{ secrets.GITHUB_TOKEN }}
20 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | bin/
2 | obj/
3 | /packages/
4 | riderModule.iml
5 | /_ReSharper.Caches/
--------------------------------------------------------------------------------
/.idea/.idea.MFAAvalonia/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # 默认忽略的文件
2 | /shelf/
3 | /workspace.xml
4 | # Rider 忽略的文件
5 | /.idea.MFAAvalonia.iml
6 | /modules.xml
7 | /contentModel.xml
8 | /projectSettingsUpdater.xml
9 | # 基于编辑器的 HTTP 客户端请求
10 | /httpRequests/
11 | # Datasource local storage ignored files
12 | /dataSources/
13 | /dataSources.local.xml
14 |
--------------------------------------------------------------------------------
/.idea/.idea.MFAAvalonia/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/.idea.MFAAvalonia/.idea/indexLayout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | .github
6 | workflows
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/.idea.MFAAvalonia/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 0.1.232-*
6 | all
7 |
8 |
9 |
--------------------------------------------------------------------------------
/LazyStaticGenerator/LazyStaticGenerator.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | Library
6 | false
7 | enable
8 | preview
9 | false
10 | true
11 | true
12 |
13 | LazyStaticGenerator
14 | LazyStaticGenerator
15 | true
16 | 1.0.0
17 | 1.0.0
18 | 1.0.0
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/MFAAvalonia.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MFAAvalonia", "MFAAvalonia\MFAAvalonia.csproj", "{0DEB7018-7094-4C4E-808E-46BA4A1D77FA}"
4 | EndProject
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LazyStaticGenerator", "LazyStaticGenerator\LazyStaticGenerator.csproj", "{C05457BE-61C5-4732-B3F6-3BC1C1C390AA}"
6 | EndProject
7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MFAUpdater", "MFAUpdater\MFAUpdater.csproj", "{B13E6AA2-CFE7-41F5-91EF-7F1C53566680}"
8 | EndProject
9 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SukiUI", "SukiUI\SukiUI.csproj", "{07048BB2-1A22-48C9-87F9-34D4664DC2A9}"
10 | EndProject
11 | Global
12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
13 | Debug|Any CPU = Debug|Any CPU
14 | Release|Any CPU = Release|Any CPU
15 | EndGlobalSection
16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
17 | {0DEB7018-7094-4C4E-808E-46BA4A1D77FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18 | {0DEB7018-7094-4C4E-808E-46BA4A1D77FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
19 | {0DEB7018-7094-4C4E-808E-46BA4A1D77FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
20 | {0DEB7018-7094-4C4E-808E-46BA4A1D77FA}.Release|Any CPU.Build.0 = Release|Any CPU
21 | {C05457BE-61C5-4732-B3F6-3BC1C1C390AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22 | {C05457BE-61C5-4732-B3F6-3BC1C1C390AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
23 | {C05457BE-61C5-4732-B3F6-3BC1C1C390AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
24 | {C05457BE-61C5-4732-B3F6-3BC1C1C390AA}.Release|Any CPU.Build.0 = Release|Any CPU
25 | {B13E6AA2-CFE7-41F5-91EF-7F1C53566680}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26 | {B13E6AA2-CFE7-41F5-91EF-7F1C53566680}.Debug|Any CPU.Build.0 = Debug|Any CPU
27 | {B13E6AA2-CFE7-41F5-91EF-7F1C53566680}.Release|Any CPU.ActiveCfg = Release|Any CPU
28 | {B13E6AA2-CFE7-41F5-91EF-7F1C53566680}.Release|Any CPU.Build.0 = Release|Any CPU
29 | {07048BB2-1A22-48C9-87F9-34D4664DC2A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30 | {07048BB2-1A22-48C9-87F9-34D4664DC2A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
31 | {07048BB2-1A22-48C9-87F9-34D4664DC2A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
32 | {07048BB2-1A22-48C9-87F9-34D4664DC2A9}.Release|Any CPU.Build.0 = Release|Any CPU
33 | EndGlobalSection
34 | EndGlobal
35 |
--------------------------------------------------------------------------------
/MFAAvalonia/App.axaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/MFAAvalonia/Assets/Style/MdXaml.axaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/MFAAvalonia/Assets/Style/MdXamlDocStyle.axaml:
--------------------------------------------------------------------------------
1 |
4 |
10 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/MFAAvalonia/Assets/Theme/DarkTheme.axaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/MFAAvalonia/Assets/Theme/LightTheme.axaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/MFAAvalonia/Assets/logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SweetSmellFox/MFAAvalonia/1c21cad95195cf84dc9c23d445117135847b2b8d/MFAAvalonia/Assets/logo.ico
--------------------------------------------------------------------------------
/MFAAvalonia/Extensions/MaaFW/MaaControllerTypes.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace MFAAvalonia.Extensions.MaaFW;
4 |
5 | public enum MaaControllerTypes
6 | {
7 | None = 0,
8 | Win32,
9 | Adb
10 | }
11 |
12 | public static class MaaControllerHelper
13 | {
14 | public static string ToResourceKey(this MaaControllerTypes type)
15 | {
16 | return type switch
17 | {
18 | MaaControllerTypes.Win32 => "TabWin32",
19 | MaaControllerTypes.Adb => "TabADB",
20 | _ => "TabADB"
21 | };
22 | }
23 |
24 | public static MaaControllerTypes ToMaaControllerTypes(this string? type, MaaControllerTypes defaultValue = MaaControllerTypes.Adb)
25 | {
26 | if (string.IsNullOrWhiteSpace(type))
27 | return defaultValue;
28 | if (type.Contains("win32", StringComparison.OrdinalIgnoreCase))
29 | return MaaControllerTypes.Win32;
30 | if (type.Contains("adb", StringComparison.OrdinalIgnoreCase))
31 | return MaaControllerTypes.Adb;
32 | return defaultValue;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/MFAAvalonia/Extensions/ServiceProviderExtension.cs:
--------------------------------------------------------------------------------
1 | using Avalonia.Markup.Xaml;
2 | using Microsoft.Extensions.DependencyInjection;
3 | using System;
4 |
5 | namespace MFAAvalonia.Extensions;
6 |
7 | public class ServiceProviderExtension: MarkupExtension
8 | {
9 | public Type ServiceType { get; set; }
10 |
11 | public override object ProvideValue(IServiceProvider serviceProvider)
12 | {
13 | return App.Services.GetRequiredService(ServiceType);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/MFAAvalonia/Helper/AutoInitDictionary.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace MFAAvalonia.Helper;
4 |
5 | public class AutoInitDictionary : Dictionary
6 | {
7 | public AutoInitDictionary()
8 | {
9 | this["exploreCount"] = 0;
10 | }
11 |
12 | // 重写索引器,确保不存在的键被访问时初始化为0
13 | public new int this[string key]
14 | {
15 | get
16 | {
17 | if (!ContainsKey(key))
18 | {
19 | this[key] = 0;
20 | }
21 |
22 | return base[key];
23 | }
24 | set => base[key] = value;
25 | }
26 | }
--------------------------------------------------------------------------------
/MFAAvalonia/Helper/AvaloniaMemoryCracker.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.Runtime.InteropServices;
4 | using System.Threading;
5 | using System.Threading.Tasks;
6 |
7 | namespace MFAAvalonia.Helper;
8 |
9 | public class AvaloniaMemoryCracker
10 | {
11 | #region 平台相关API
12 |
13 | [DllImport("kernel32.dll")]
14 | private extern static bool SetProcessWorkingSetSize(IntPtr proc, int min, int max);
15 |
16 | private static bool IsWindows =>
17 | RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
18 |
19 | #endregion
20 |
21 | #region 核心逻辑
22 |
23 | /// 启动内存优化守护进程
24 | /// 清理间隔秒数(默认30秒)
25 | public void Cracker(int intervalSeconds = 30)
26 | {
27 | Task.Factory.StartNew(() =>
28 | {
29 | while (true)
30 | {
31 | try
32 | {
33 | PerformMemoryCleanup();
34 | Thread.Sleep(TimeSpan.FromSeconds(intervalSeconds));
35 | }
36 | catch
37 | {
38 | // 异常处理可扩展日志记录
39 | }
40 | }
41 | }, TaskCreationOptions.LongRunning);
42 | }
43 |
44 | /// 执行内存清理三步策略
45 | private void PerformMemoryCleanup()
46 | {
47 | // 第一步:触发托管堆GC回收[1](@ref)
48 | GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced);
49 | GC.WaitForPendingFinalizers();
50 |
51 | // 第二步:针对Windows平台优化工作集[1](@ref)
52 | if (IsWindows)
53 | {
54 | SetProcessWorkingSetSize(
55 | Process.GetCurrentProcess().Handle,
56 | -1, -1
57 | );
58 | }
59 |
60 | // 第三步:可选扩展点(如内存池管理)
61 | // 可在此处集成引用计数或内存碎片整理逻辑[1](@ref)
62 | }
63 |
64 | #endregion
65 | }
66 |
--------------------------------------------------------------------------------
/MFAAvalonia/Helper/Converters/AnnouncementTitleConverter.cs:
--------------------------------------------------------------------------------
1 | using Avalonia;
2 | using Avalonia.Data.Converters;
3 | using Avalonia.Markup.Xaml;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Globalization;
7 |
8 | namespace MFAAvalonia.Helper.Converters;
9 |
10 | public class AnnouncementTitleConverter : MarkupExtension, IMultiValueConverter
11 | {
12 | public override object ProvideValue(IServiceProvider serviceProvider) => this;
13 |
14 | public object? Convert(IList