├── .gitattributes ├── .github └── workflows │ ├── build-test.yml │ └── release-canary.yml ├── .gitignore ├── LICENSE ├── README.md ├── assets └── qq_group.png ├── azure-pipelines.yml ├── design └── README.md ├── scripts ├── .gitignore ├── build_canary.ps1 ├── get_adb.ps1 └── sdk │ ├── .gitignore │ ├── AutumnBox.SDK.nuspec │ ├── build.ps1 │ ├── push.ps1 │ └── sdk.psm1 └── src ├── AutumnBox.Basic.Shared ├── AutumnBox.Basic.Shared.projitems ├── AutumnBox.Basic.Shared.shproj ├── BasicBooter.cs ├── Calling │ ├── CPMExtension.cs │ ├── CommandExecutorExtension.cs │ ├── CommandResultExtension.cs │ ├── Events.cs │ ├── HestExecutor.cs │ └── ICommandExecutor.cs ├── Data │ ├── CommandResult.cs │ ├── INotifyDisposed.cs │ ├── INotifyOutput.cs │ ├── Output.cs │ ├── OutputBuilder.cs │ ├── OutputReceivedEvent.cs │ └── Size.cs ├── Device │ ├── DeviceBase.cs │ ├── DeviceCommander.cs │ ├── DeviceExtension.Execute.cs │ ├── DeviceExtension.Management.cs │ ├── DeviceExtension.Reboot.cs │ ├── DeviceState.cs │ ├── Emulator.cs │ ├── FastbootFixedExecutor.cs │ ├── IDevice.cs │ ├── Management │ │ ├── AppFx │ │ │ ├── BroadcastSender.cs │ │ │ ├── ComponentName.cs │ │ │ ├── DevicePolicyManager.cs │ │ │ ├── InstallTarget.cs │ │ │ ├── Intent.cs │ │ │ ├── IntentStringHelper.cs │ │ │ ├── PackageInfo.cs │ │ │ ├── PackageManager.cs │ │ │ ├── PackageManagerInstallOption.cs │ │ │ ├── ServiceManager.cs │ │ │ └── TrimMemoryLevel.cs │ │ └── OS │ │ │ ├── AndroidKeyCode.cs │ │ │ ├── BuildPropKeys.cs │ │ │ ├── DeviceBuildPropGetter.cs │ │ │ ├── DeviceBuildPropManager.cs │ │ │ ├── DeviceBuildPropSetter.cs │ │ │ ├── FileSystem.cs │ │ │ ├── Inputer.cs │ │ │ ├── ShellCommandHelper.cs │ │ │ ├── UserInfo.cs │ │ │ ├── UserManager.cs │ │ │ ├── VideoRecorder.cs │ │ │ └── WindowManager.cs │ ├── ManagementV2 │ │ ├── AppFx │ │ │ ├── ActivityManager.cs │ │ │ ├── ComponentName.cs │ │ │ ├── Intent.cs │ │ │ ├── IntentStringHelper.cs │ │ │ ├── PackageInstaller.cs │ │ │ └── TrimMemoryLevel.cs │ │ └── OS │ │ │ ├── AndroidKeyCode.cs │ │ │ ├── AndroidShell.cs │ │ │ ├── BatteryInfo.cs │ │ │ ├── BatteryManager.cs │ │ │ ├── BuildKeys.cs │ │ │ ├── BuildReder.cs │ │ │ ├── CachedBuildReader.cs │ │ │ ├── Cat.cs │ │ │ ├── HardwareInfo.cs │ │ │ ├── HardwareInfoGetter.cs │ │ │ ├── KeyInputer.cs │ │ │ ├── MemInfoGetter.cs │ │ │ ├── MemoryInfo.cs │ │ │ ├── ScreenCap.cs │ │ │ ├── ScreenCapture.cs │ │ │ ├── StatGetter.cs │ │ │ ├── Uptime.cs │ │ │ ├── UserInfo.cs │ │ │ ├── UserManager.cs │ │ │ └── WindowManager.cs │ ├── NetDevice.cs │ └── UsbDevice.cs ├── Exceptions │ ├── AdbCommandFailedException.cs │ ├── AdbShellCommandFailedException.cs │ ├── CommandCancelledException.cs │ ├── CommandErrorException.cs │ ├── CommandFaultException.cs │ ├── CommandNotFoundException.cs │ ├── DeviceHasNoSuException.cs │ ├── DeviceNotAliveException.cs │ ├── DeviceNotFoundException.cs │ └── PackageNotFoundException.cs ├── ManagedAdb │ ├── CommandDriven │ │ ├── CommandDrivenHelper.cs │ │ ├── CommandProcedure.cs │ │ ├── CommandStatus.cs │ │ ├── IAdbManager.cs │ │ ├── ICommandProcedure.cs │ │ ├── ICommandProcedureManager.cs │ │ ├── ProcedureManager.cs │ │ ├── StandardAdbManager.cs │ │ └── Unix │ │ │ └── UnixCPM.cs │ └── SocketDriven │ │ └── Future.cs ├── ModuleInfo.cs ├── MultipleDevices │ ├── DevicesArrayExtension.cs │ ├── DevicesChangedEvent.cs │ ├── DevicesCollection.cs │ ├── DevicesGetter.cs │ ├── DevicesMonitor.cs │ └── IDevicesGetter.cs └── Util │ ├── AdbServerKiller.cs │ ├── CommandResultExtension.cs │ ├── LinuxReturnCode.cs │ ├── LocalAdbServerKiller.cs │ ├── NativeMethods.cs │ ├── ProcessExtension.cs │ ├── ProcessKiller.cs │ ├── Settings.cs │ └── ThrowIf.cs ├── AutumnBox.Core ├── .gitignore ├── AutumnBox - Backup.Core.csproj └── AutumnBox.Core.csproj ├── AutumnBox.Extensions.Essentials.Shared ├── AutumnBox.Extensions.Essentials.Shared.projitems ├── AutumnBox.Extensions.Essentials.Shared.shproj ├── EssentialsLibrarin.cs ├── Extensions │ ├── EAutumnBoxAdFetcher.cs │ ├── EAutumnBoxExtensionStore.cs │ ├── EAutumnBoxGuideViewer.cs │ ├── EAutumnBoxRestarter.cs │ ├── EAutumnBoxUpdateChecker.cs │ ├── ECmdLauncher.cs │ ├── EDeviceRebooter.cs │ ├── EDonateCardRegister.cs │ ├── EEnableCurrentDeviceNetDebugging.cs │ ├── ELeafUIDemo.cs │ ├── ENetDeviceConnecter.cs │ ├── ENetDeviceDisconnecter.cs │ ├── EPSLauncher.cs │ └── ETest.cs └── Resources │ └── Icons │ ├── cmd.png │ ├── devpanelswitcher.png │ ├── disconnect-netdebbugging.png │ ├── enable-dev-netdebugging.png │ ├── icon.ico │ ├── ps.png │ ├── reboot.png │ └── wireless.png ├── AutumnBox.Extensions.Essentials └── AutumnBox.Extensions.Essentials.csproj ├── AutumnBox.Extensions.Standard.Shared ├── AutumnBox.Extensions.Standard.Shared.shproj ├── AutumnBox.Extensions.Standard.projitems ├── CoreLib.cs ├── Extensions │ ├── Fastboot │ │ ├── EFlashBoot.cs │ │ ├── EFlashRecovery.cs │ │ ├── EOemLock.cs │ │ ├── ESwitchABPlug.cs │ │ └── ESwitchABSlot.cs │ ├── Mix │ │ ├── EDeviceOwnerRemover.cs │ │ └── EFilePusher.cs │ └── Poweron │ │ ├── Dpm │ │ ├── DeviceOwnerSetter.cs │ │ ├── DpmFailedMessageParser.cs │ │ ├── DpmPro.cs │ │ ├── EAirForzenActivator.cs │ │ ├── EAnzenboksuActivator.cs │ │ ├── EBlackHole.cs │ │ ├── EFreezeYou.cs │ │ ├── EHideAnzen.cs │ │ ├── EIceBox.cs │ │ ├── EIslandActivator.cs │ │ ├── EStopApp.cs │ │ └── ETaiChi.cs │ │ ├── EApkInstaller.cs │ │ ├── EBreventActivator.cs │ │ ├── EClearAccounts.cs │ │ ├── EClearUsers.cs │ │ ├── EDpiModifier.cs │ │ ├── EGCM.cs │ │ ├── EGreenifyGranter.cs │ │ ├── EPermissionDogActivator.cs │ │ ├── EScreenShoter.cs │ │ ├── EShizukuActivator.cs │ │ ├── EStopAppMaxWellActivator.cs │ │ └── EUnlockSystemParation.cs ├── Icons │ ├── AirForzen.png │ ├── Anzenbokusu.png │ ├── Greenify.png │ ├── Island.png │ ├── ShizukuManager.png │ ├── Usersir.png │ ├── a_b.png │ ├── add.png │ ├── android.png │ ├── anzenbokusufake.png │ ├── appopsx.png │ ├── blackhole.png │ ├── brevent.png │ ├── cd.png │ ├── download.png │ ├── dpi.png │ ├── filepush.png │ ├── flash.png │ ├── freezeYou.png │ ├── gcm.png │ ├── icebox.png │ ├── knife.png │ ├── lock.png │ ├── nuclear.png │ ├── permissiondog.png │ ├── recorder.png │ ├── restart.png │ ├── restartdevice.png │ ├── screenshot.png │ ├── screenshotv2.png │ ├── stopapp.png │ ├── taichi.png │ └── unlock.png ├── Resources │ ├── dpmpro.file │ └── godpower.apk └── View │ ├── ScreenRecorderWindow.xaml │ └── ScreenRecorderWindow.xaml.cs ├── AutumnBox.Extensions.Standard ├── AssemblyInfo.cs └── AutumnBox.Extensions.Standard.csproj ├── AutumnBox.GUI ├── App.xaml ├── App.xaml.cs ├── AssemblyInfo.cs ├── AutumnBox.GUI.csproj ├── MVVM │ ├── FlexiableCommand.cs │ ├── InjectableObject.cs │ ├── MVVMCommand.cs │ ├── ModelBase.cs │ ├── NotificationObject.cs │ └── ViewModelBase.cs ├── Models │ ├── ExtensionDock.cs │ ├── LibDock.cs │ ├── OpenSourceProject.cs │ └── VersionInfo.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── PublishProfiles │ │ └── FolderProfile.pubxml │ └── app.manifest ├── Resources │ ├── CommonResources.xaml │ ├── Converters.xaml │ ├── Icons │ │ ├── Menu │ │ │ ├── cmd.png │ │ │ ├── debug.png │ │ │ ├── donate.png │ │ │ ├── exit.png │ │ │ ├── guide-book.png │ │ │ ├── icon.png │ │ │ ├── powershell.png │ │ │ └── settings.png │ │ ├── icon.ico │ │ └── new_leaf.ico │ ├── Images │ │ ├── android_phone.png │ │ ├── android_phone2.png │ │ ├── donate_alishop.png │ │ ├── donate_pot4winter.png │ │ ├── donate_wechatpay.jpg │ │ ├── github.png │ │ └── icon.png │ ├── Languages │ │ ├── Lang.cs │ │ ├── en-US.xaml │ │ ├── zh-CN.xaml │ │ └── zh-TW.xaml │ ├── Sounds │ │ └── ok.wav │ ├── Themes │ │ ├── ThemeDark.xaml │ │ └── ThemeLight.xaml │ └── URLs.xaml ├── Services │ ├── IAcrylicHelper.cs │ ├── IAdbDevicesManager.cs │ ├── IAppLifecycleManager.cs │ ├── IBuildInfo.cs │ ├── ILanguage.cs │ ├── ILanguageManager.cs │ ├── ILeafCardManager.cs │ ├── ILoggingManager.cs │ ├── IMessageBus.cs │ ├── INotificationManager.cs │ ├── IOpenFxManager.cs │ ├── IOperatingSystemService.cs │ ├── ISentenceService.cs │ ├── ISettings.cs │ ├── ISoundService.cs │ ├── IStorageManager.cs │ ├── ISubWindowDialog.cs │ ├── ISubWindowDialogManager.cs │ ├── ITabsManager.cs │ ├── IThemeManager.cs │ ├── IWallpaperManager.cs │ ├── IWindowManager.cs │ ├── Impl │ │ ├── Acrylic │ │ │ ├── AcrylicHelper.cs │ │ │ ├── OSVersions.cs │ │ │ ├── README.md │ │ │ └── SystemInfo.cs │ │ ├── AdbDevicesManagerImpl.cs │ │ ├── AppLifecycleManager.cs │ │ ├── AutumnBoxGuiBaseApiImpl.cs │ │ ├── BuildInfo.cs │ │ ├── LanguageManager.cs │ │ ├── LeafCardManager.cs │ │ ├── LoggingManager.cs │ │ ├── LoggingObject.cs │ │ ├── MessageBusImpl.cs │ │ ├── NotificationManager.cs │ │ ├── OS │ │ │ ├── HelpButtonHelper.cs │ │ │ ├── MachineInfo.cs │ │ │ ├── NativeMethods.cs │ │ │ ├── OtherProcessChecker.cs │ │ │ ├── ShortcutHelper.cs │ │ │ └── TaskKill.cs │ │ ├── OpenFxManagerImpl.cs │ │ ├── OperatingSystem.cs │ │ ├── SentenceService.cs │ │ ├── SettingsImpl.cs │ │ ├── SoundServiceImpl.cs │ │ ├── StorageManagerImpl.cs │ │ ├── SubWindowDialogManagerImpl.cs │ │ ├── TabManager.cs │ │ ├── ThemeManager.cs │ │ ├── WallpaperManager.cs │ │ └── WindowManager.cs │ ├── LanguageManagerExtension.cs │ ├── Messages.cs │ └── ThemeMode.cs ├── Util │ ├── AppUnloader.cs │ ├── AutumnObjectExtension.cs │ ├── DesignHelper.cs │ ├── Extensions.cs │ ├── FatalHandler.cs │ ├── Loader │ │ ├── AbstractAppLoader.cs │ │ ├── AppLoaderExtension.cs │ │ ├── AppLoaderFailedEventArgs.cs │ │ ├── AppLoadingException.cs │ │ ├── GeneralAppLoader.cs │ │ ├── StepAttribute.cs │ │ └── StepFinishedEventArgs.cs │ ├── Self.cs │ ├── UI │ │ └── Converters │ │ │ ├── BoolToVisibilityConverter.cs │ │ │ ├── BoolToVisibilityConverterParameter.cs │ │ │ ├── EndPointConverter.cs │ │ │ ├── NonBoolConverter.cs │ │ │ ├── NullToVisibilityConverter.cs │ │ │ ├── NullToVisibilityConverterParameter.cs │ │ │ ├── ObjectEqualsToVisibilityConverter.cs │ │ │ ├── VisibleIf.cs │ │ │ └── VisibleIfNot.cs │ ├── VersionInfos.cs │ └── Win32AdbManager.cs ├── ViewModels │ ├── VMAbout.cs │ ├── VMBottomBar.cs │ ├── VMDeviceBar.cs │ ├── VMDeviceDash.cs │ ├── VMDeviceSelector.cs │ ├── VMExtensionsFinder.cs │ ├── VMGuide.cs │ ├── VMHome.cs │ ├── VMInputWindow.cs │ ├── VMLeafCards.cs │ ├── VMLeafUI.cs │ ├── VMLibsView.cs │ ├── VMLog.cs │ ├── VMMainMenu.cs │ ├── VMMainTabs.cs │ ├── VMMainWindowV3.cs │ ├── VMOpenSource.cs │ ├── VMPanelMain.cs │ ├── VMSettingsDialog.cs │ ├── VMStartup.cs │ └── VMUpdateLogs.cs ├── Views │ ├── Controls │ │ ├── DeviceDash.xaml │ │ ├── DeviceDash.xaml.cs │ │ ├── DeviceSelector.xaml │ │ ├── DeviceSelector.xaml.cs │ │ ├── ExtensionsFinder.xaml │ │ ├── ExtensionsFinder.xaml.cs │ │ ├── MainMenu.xaml │ │ ├── MainMenu.xaml.cs │ │ ├── PanelAbout.xaml │ │ ├── PanelAbout.xaml.cs │ │ ├── PanelUpdateLogs.xaml │ │ ├── PanelUpdateLogs.xaml.cs │ │ ├── StatusBar.xaml │ │ ├── StatusBar.xaml.cs │ │ ├── TabsViewer.xaml │ │ ├── TabsViewer.xaml.cs │ │ ├── XCardsViewer.xaml │ │ └── XCardsViewer.xaml.cs │ ├── Custom │ │ └── NiceWindow.cs │ ├── SubWindowViews │ │ ├── Guide.xaml │ │ ├── Guide.xaml.cs │ │ ├── LeafChoiceView.xaml.cs │ │ ├── LeafUIChoiceView.xaml │ │ ├── LeafUIInputView.xaml │ │ ├── LeafUIInputView.xaml.cs │ │ ├── LeafUIMessageView.xaml │ │ ├── LeafUIMessageView.xaml.cs │ │ ├── LeafUISingleSelectView.xaml │ │ ├── LeafUISingleSelectView.xaml.cs │ │ ├── LeafUIYNView.xaml │ │ └── LeafUIYNView.xaml.cs │ └── Windows │ │ ├── AboutWindow.xaml │ │ ├── AboutWindow.xaml.cs │ │ ├── ChoiceWindow.xaml │ │ ├── ChoiceWindow.xaml.cs │ │ ├── DonateWindow.xaml │ │ ├── DonateWindow.xaml.cs │ │ ├── ExceptionWindow.xaml │ │ ├── ExceptionWindow.xaml.cs │ │ ├── InputWindow.xaml │ │ ├── InputWindow.xaml.cs │ │ ├── LeafWindow.xaml │ │ ├── LeafWindow.xaml.cs │ │ ├── LibsWindow.xaml │ │ ├── LibsWindow.xaml.cs │ │ ├── LicenseWindow.xaml │ │ ├── LicenseWindow.xaml.cs │ │ ├── LoadingWindow.xaml │ │ ├── LoadingWindow.xaml.cs │ │ ├── LogEasyWindow.xaml │ │ ├── LogEasyWindow.xaml.cs │ │ ├── LogWindow.xaml │ │ ├── LogWindow.xaml.cs │ │ ├── MainWindowV3.xaml │ │ ├── MainWindowV3.xaml.cs │ │ ├── MessageWindow.xaml │ │ ├── MessageWindow.xaml.cs │ │ ├── OpenSourceWindow.xaml │ │ ├── OpenSourceWindow.xaml.cs │ │ ├── SettingsWindow.xaml │ │ ├── SettingsWindow.xaml.cs │ │ ├── StartupWindow.xaml │ │ ├── StartupWindow.xaml.cs │ │ ├── YNWindow.xaml │ │ └── YNWindow.xaml.cs ├── build_ext.ps1 ├── create_build_info.ps1 └── place_adb.ps1 ├── AutumnBox.Leafx.Shared ├── AutumnBox.Leafx.Shared.projitems ├── AutumnBox.Leafx.Shared.shproj ├── Base │ └── NotificationObject.cs ├── Container │ ├── ComponentFactory.cs │ ├── ComponentNotFoundException.cs │ ├── ILake.cs │ ├── IRegisterableLake.cs │ ├── IdNotFoundException.cs │ ├── LakeExtension.Getter.cs │ ├── LakeExtension.ObjectManagement.cs │ ├── LakeExtension.Quick.cs │ ├── LakeExtension.Register.cs │ ├── Support │ │ ├── ClassComponentRegister.cs │ │ ├── ClassComponentsLoader.cs │ │ ├── ComponentAttribute.cs │ │ ├── ComponentFactoryReader.cs │ │ ├── LakeBase.cs │ │ ├── MergedLake.cs │ │ ├── ShouldAutoCreateException.cs │ │ ├── SnowLake.cs │ │ └── SunsetLake.cs │ └── TypeNotFoundException.cs ├── Enhancement │ ├── ClassTextKit │ │ ├── ClassTextAttribute.cs │ │ ├── ClassTextExtension.cs │ │ ├── ClassTextReader.cs │ │ └── ClassTextReaderCache.cs │ └── Runtime │ │ ├── MethodReplaceHelper.cs │ │ └── MethodReplacer.cs ├── ModuleInfo.cs └── ObjectManagement │ ├── AroundMethodArgs.cs │ ├── AroundMethodAttribute.cs │ ├── AutoInjectAttribute.cs │ ├── DependenciesInjector.cs │ ├── MethodProxy.cs │ ├── ObjectBuilder.cs │ ├── ObjectCache.General.cs │ ├── ObjectCache.KeyValue.cs │ ├── ObjectManagementConstants.cs │ └── ParameterArrayBuilder.cs ├── AutumnBox.Logging.Shared ├── Aogger.cs ├── AutumnBox.Logging.Shared.projitems ├── AutumnBox.Logging.Shared.shproj ├── CallerQuerier.cs ├── ILogger.cs ├── Internal │ ├── Log.cs │ ├── LoggerImpl.Generic.cs │ └── LoggerImpl.cs ├── LoggerExtension.cs ├── LoggerFactory.cs ├── Management │ ├── AsyncBufferedRealtimeFileLogger.cs │ ├── AsyncFileLogger.cs │ ├── ConsoleLogger.cs │ ├── CoreLoggerBase.cs │ ├── ICoreLogger.cs │ ├── ILog.cs │ ├── LoggingManager.cs │ ├── TraceLogger.cs │ └── WriteOnLastFileLogger.cs ├── ModuleInfo.cs ├── SLogger.Generic.cs └── SLogger.cs ├── AutumnBox.OpenFramework.Shared ├── AutumnBox.OpenFramework.Shared.projitems ├── AutumnBox.OpenFramework.Shared.shproj ├── BuildInfo.cs ├── Exceptions │ ├── AccessDeniedException.cs │ ├── DeviceStateIsNotCorrectException.cs │ ├── ExtensionCanceledException.cs │ ├── ExtensionCantBeStoppedException.cs │ ├── LibrarianAlreadyCreatedOnceException.cs │ ├── ServiceNotFoundException.cs │ ├── UserDeniedException.cs │ └── WrapperAlreadyCreatedOnceException.cs ├── Extension │ ├── Attribute │ │ ├── ExtAuthAttribute.cs │ │ ├── ExtDescAttribute.cs │ │ ├── ExtDeveloperMode.cs │ │ ├── ExtHiddenAttribute.cs │ │ ├── ExtIconAttribute.cs │ │ ├── ExtMinApiAttribute.cs │ │ ├── ExtNameAttribute.cs │ │ ├── ExtNormalRunnablePolicyAttribute.cs │ │ ├── ExtPriority.cs │ │ ├── ExtRegionsAttribute.cs │ │ ├── ExtRequireRootAttribute.cs │ │ ├── ExtRequiredDeviceStatesAttribute.cs │ │ ├── ExtRunnablePolicyAttribute.cs │ │ ├── ExtTargetApiAttribute.cs │ │ ├── ExtVersionAttribute.cs │ │ ├── ExtensionAttribute.cs │ │ ├── ExtensionI18NTextInfoAttribute.cs │ │ ├── ExtensionInfoAttribute.cs │ │ └── RunnableCheckArgs.cs │ ├── AutumnBoxExtension.Constants.cs │ ├── EmptyExtension.cs │ ├── ExtensionMetadataKeys.cs │ ├── IClassExtension.cs │ ├── IExtension.cs │ ├── IExtensionUsefulTools.cs │ ├── Leaf │ │ ├── LDoNotScanAttribute.cs │ │ ├── LMainAttribute.cs │ │ ├── LeafConstants.cs │ │ ├── LeafExtension.cs │ │ ├── LeafExtensionBase.cs │ │ └── LeafUIExtension.cs │ └── StatusMessages.cs ├── Implementation │ ├── AppManagerImpl.cs │ ├── CompImpl.cs │ ├── DeviceManager.cs │ ├── EmbeddedFileManagerImpl.cs │ ├── Md5Impl.cs │ ├── NotificationManager.cs │ ├── OSImpl.cs │ ├── OpenFxManagerImpl.cs │ ├── ResManagerImpl.cs │ ├── SoundImpl.cs │ ├── StorageImpl.cs │ ├── UxImpl.cs │ └── XCardsManager.cs ├── Management │ ├── ExtInfo │ │ ├── ClassExtensionInfo.cs │ │ ├── ClassExtensionInfoCache.cs │ │ ├── ClassExtensionProcedure.cs │ │ ├── ExtensionInfoExtension.cs │ │ ├── IExtensionInfo.cs │ │ ├── IExtensionProcedure.cs │ │ └── ValueReader.cs │ ├── ExtLibrary │ │ ├── ILibrarian.cs │ │ ├── Impl │ │ │ ├── AssemblyLibrarian.cs │ │ │ ├── DreamLibManager.cs │ │ │ └── ExtensionLibrarian.cs │ │ └── LibrarianExtension.cs │ ├── ExtTask │ │ ├── ExtensionTaskFactory.cs │ │ ├── ExtensionTaskManagerV2.cs │ │ └── IExtensionTaskManager.cs │ ├── IBaseApi.cs │ ├── IExtensionRegistry.cs │ ├── ILibsManager.cs │ ├── OpenFx.cs │ └── RegisteredExtensionInfo.cs ├── Open │ ├── ADBKit │ │ └── IDeviceManager.cs │ ├── ChoiceResult.cs │ ├── IAppManager.cs │ ├── ICompApi.cs │ ├── IEmbeddedFileService.cs │ ├── ILanguageManager.cs │ ├── IMd5.cs │ ├── INotificationManager.cs │ ├── IOpenFxManager.cs │ ├── IOperatingSystemAPI.cs │ ├── IResourcesManager.cs │ ├── ISoundService.cs │ ├── IStorage.cs │ ├── IStorageManager.cs │ ├── IUx.cs │ ├── IXCardsManager.cs │ ├── LKit │ │ ├── DialogClosedEventArgs.cs │ │ ├── ILeafDialog.cs │ │ ├── ILeafUI.cs │ │ └── LeafUIEvents.cs │ └── LakeProvider.cs └── Util │ └── ClassTextReaderExtension.cs ├── AutumnBox.Tests ├── AutumnBox.Tests.csproj ├── Basic │ ├── CommandDriven │ │ └── MyCommandProcedureManagerTest.cs │ ├── Devices │ │ └── DevicesTest.cs │ ├── Executor │ │ └── HestExecutorTest.cs │ └── MADB │ │ ├── BooterTest.cs │ │ └── Win32ManagerTest.cs ├── Leafx │ ├── ClassTextTest.cs │ ├── ComponentFactoryTest.cs │ ├── MethodProxyTest.cs │ ├── NamespaceComponentLoaderTest.cs │ ├── ObjectCacheTest.cs │ ├── ObjectInjectorTest.cs │ ├── SnowLakeTest.cs │ └── SunsetLakeTest.cs ├── Logging │ ├── AoggerTest.cs │ └── CallerQuerierTest.cs ├── OpenFX │ ├── ExtensionInfoTest.cs │ ├── FakeBaseApi.cs │ ├── FakeOpenFx.cs │ └── LeafExtensionTest.cs ├── Properties │ └── AssemblyInfo.cs ├── RegexDraft │ └── RegexesTest.cs ├── TestStartup.cs ├── Util │ └── Win32AdbManager.cs └── packages.config └── AutumnBox.sln /.gitattributes: -------------------------------------------------------------------------------- 1 | azure-pipelines.yml merge=ours 2 | -------------------------------------------------------------------------------- /.github/workflows/build-test.yml: -------------------------------------------------------------------------------- 1 | name: Unit Test 2 | 3 | on: 4 | push: 5 | branch: ["dev","ci-net5"] 6 | pull_request: 7 | branch: ["dev","master"] 8 | 9 | jobs: 10 | build: 11 | runs-on: windows-latest 12 | 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v2 16 | 17 | - name: Setup .NET 18 | uses: actions/setup-dotnet@v1 19 | with: 20 | dotnet-version: 5.0.* 21 | - name: Install dependencies 22 | run: dotnet restore src/ 23 | 24 | - name: Download adb binaries. 25 | run: ./scripts/get_adb.ps1 26 | 27 | - name: Building with script 28 | run: ./scripts/build_canary.ps1 29 | 30 | - name: Unit Test 31 | run: dotnet test src/ 32 | 33 | - name: Upload artifact 34 | uses: actions/upload-artifact@v2 35 | with: 36 | name: Canary-Artifact 37 | path: AutumnBox-Canary # or path/to/artifact -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # zsh2401@163.com # 2 | # 03/10/2017 # 3 | # giti file # 4 | 5 | ##files 6 | *.log 7 | *.exe 8 | *.exe.config 9 | *.exe.config 10 | *.exp 11 | *.ipch 12 | *.7z 13 | *.metagen 14 | *.ncb 15 | *.nupkg 16 | *.obj 17 | *.opensdf 18 | *.pdb 19 | *.ReSharper 20 | *.sdf 21 | *.suo 22 | *.swp 23 | *.user 24 | *.xml 25 | *.lastcodeanalysissucceeded 26 | *.zip 27 | *.rar 28 | *.lnk 29 | *.bak 30 | *.suo 31 | *.dll 32 | *.psd 33 | *.txt 34 | *.msi 35 | #fast 36 | gfast.exe 37 | makezip 38 | ##dirs 39 | AutumnBox-Canary 40 | adb_binary/ 41 | .vs/ 42 | publish/ 43 | out/ 44 | sdk/ 45 | bin/ 46 | obj/ 47 | maker/ 48 | HistoryRelease/ 49 | DemoPic/ 50 | packages/ 51 | dist/ 52 | publish/ 53 | debug-dist/ 54 | ##do_not 55 | !AutumnBox.ADBProvider/adb_tools/*.* 56 | -------------------------------------------------------------------------------- /assets/qq_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/assets/qq_group.png -------------------------------------------------------------------------------- /design/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/design/README.md -------------------------------------------------------------------------------- /scripts/.gitignore: -------------------------------------------------------------------------------- 1 | !sdk -------------------------------------------------------------------------------- /scripts/get_adb.ps1: -------------------------------------------------------------------------------- 1 | $ADBGitStore = "https://github.com/zsh2401/AutumnBox-AdbBinaries-Store" 2 | $BranchName = "1.0.41" 3 | $ADBBinariesDirectoryPath = [System.IO.Path]::Combine($PSScriptRoot, "../adb_binary") 4 | $ADBBinariesDirectory = [System.IO.DirectoryInfo]::new($ADBBinariesDirectoryPath); 5 | if ($ADBBinariesDirectory.Exists) { 6 | Remove-Item $ADBBinariesDirectory.FullName -Force -Recurse; 7 | $ADBBinariesDirectory.Create(); 8 | } 9 | git clone -b $BranchName $ADBGitStore $ADBBinariesDirectory.FullName --depth=1 -------------------------------------------------------------------------------- /scripts/sdk/.gitignore: -------------------------------------------------------------------------------- 1 | nuget.exe 2 | tmp 3 | API_KEY -------------------------------------------------------------------------------- /scripts/sdk/build.ps1: -------------------------------------------------------------------------------- 1 | Import-Module $([System.IO.Path]::Combine($PSScriptRoot,"sdk.psm1")) 2 | Build-SDK -------------------------------------------------------------------------------- /scripts/sdk/push.ps1: -------------------------------------------------------------------------------- 1 | Import-Module $([System.IO.Path]::Combine($PSScriptRoot,"sdk.psm1")) 2 | Push-SDK -------------------------------------------------------------------------------- /scripts/sdk/sdk.psm1: -------------------------------------------------------------------------------- 1 | $NetCoreSDK = [System.IO.Path]::Combine($PSScriptRoot,"../../src/AutumnBox.Core"); 2 | # $NetFxSDK = [System.IO.Path]::Combine($PSScriptRoot,"../../src/AutumnBox.Core"); 3 | $TmpDir = [System.IO.Path]::Combine($PSScriptRoot,"tmp"); 4 | $NugetExe = [System.IO.Path]::Combine($PSScriptRoot,"nuget.exe") 5 | $Nuspec = [System.IO.Path]::Combine($PSScriptRoot,"AutumnBox.SDK.nuspec") 6 | $NugetPackOutputDir = [System.IO.Path]::Combine($PSScriptRoot,"packages") 7 | $API_KEY_FILE = [System.IO.Path]::Combine($PSScriptRoot,"API_KEY") 8 | 9 | function Build-SDK(){ 10 | dotnet build $NetCoreSDK -o "$TmpDir/netcore31" -c SDK 11 | &$NugetExe pack $Nuspec -OutputDirectory $NugetPackOutputDir 12 | } 13 | function Push-SDK($version){ 14 | $CacheDirPath = $([System.IO.Path]::Combine($PSScriptRoot,[System.Guid]::NewGuid().ToString())) 15 | $CacheDirectory = [System.IO.DirectoryInfo]::new($CacheDirPath); 16 | $API_KEY = [System.IO.File]::ReadAllText($API_KEY_FILE); 17 | try{ 18 | &$NugetExe pack $Nuspec -OutputDirectory $CacheDirectory.FullName 19 | &$NugetExe push "$($CacheDirectory.FullName)\*" $API_KEY -Source https://api.nuget.org/v3/index.json 20 | $CacheDirectory.Delete($true); 21 | }catch{ 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/AutumnBox.Basic.Shared.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8e101f07-8c10-4ab6-a427-f24618c25de5 5 | 14.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Calling/CommandResultExtension.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.Basic.Data; 2 | using AutumnBox.Basic.Exceptions; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace AutumnBox.Basic.Calling 8 | { 9 | /// 10 | /// ICommandResult的拓展方法 11 | /// 12 | public static class CommandResultExtension 13 | { 14 | private const int STATUS_OK = 0; 15 | /// 16 | /// 当有返回码不为0时抛出异常 17 | /// 18 | /// 19 | /// 返回码不为0时抛出该异常 20 | /// 如果未抛出异常,则返回传入的结果以提供链式调用 21 | public static CommandResult ThrowIfError(this CommandResult result) 22 | { 23 | if (result.ExitCode != STATUS_OK) 24 | { 25 | throw new CommandErrorException(result.Output, result.ExitCode); 26 | } 27 | return result; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Data/CommandResult.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | 3 | namespace AutumnBox.Basic.Data 4 | { 5 | /// 6 | /// 命令结果 7 | /// 8 | public sealed class CommandResult 9 | { 10 | /// 11 | /// 构造命令结果 12 | /// 13 | /// 14 | /// 15 | public CommandResult(int exitCode, Output output) 16 | { 17 | ExitCode = exitCode; 18 | Output = output ?? throw new System.ArgumentNullException(nameof(output)); 19 | } 20 | 21 | /// 22 | /// 返回码 23 | /// 24 | public int ExitCode { get; } 25 | 26 | /// 27 | /// 指示其是否是被强制中断的 28 | /// 29 | public bool Cancelled { get; set; } = false; 30 | 31 | /// 32 | /// 输出 33 | /// 34 | public Output Output { get; } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Data/INotifyDisposed.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace AutumnBox.Basic.Data 7 | { 8 | /// 9 | /// 可通知其释放完成 10 | /// 11 | public interface INotifyDisposed 12 | { 13 | /// 14 | /// 当对象被释放后发生 15 | /// 16 | event EventHandler? Disposed; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Data/INotifyOutput.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/30 4:29:07 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | 12 | namespace AutumnBox.Basic.Data 13 | { 14 | /// 15 | /// 可通知输出的 16 | /// 17 | public interface INotifyOutput 18 | { 19 | /// 20 | /// 当输出发生时触发 21 | /// 22 | event OutputReceivedEventHandler OutputReceived; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Data/Output.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Basic.Shared/Data/Output.cs -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Device/Emulator.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/30 4:58:10 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | 7 | namespace AutumnBox.Basic.Device 8 | { 9 | /// 10 | /// 模拟器设备 11 | /// 12 | public sealed class Emulator : DeviceBase 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Device/IDevice.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/29 2:40:39 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using System; 7 | 8 | namespace AutumnBox.Basic.Device 9 | { 10 | /// 11 | /// 设备对象接口 12 | /// 13 | public interface IDevice : IEquatable 14 | { 15 | /// 16 | /// 序列号 17 | /// 18 | string SerialNumber { get; } 19 | /// 20 | /// 状态 21 | /// 22 | DeviceState State { get; } 23 | /// 24 | /// 刷新状态 25 | /// 26 | void RefreshState(); 27 | /// 28 | /// 检测设备是否还处于连接状态 29 | /// 30 | bool IsAlive(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Device/Management/AppFx/InstallTarget.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/9/29 23:50:54 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using System; 7 | 8 | namespace AutumnBox.Basic.Device.Management.AppFx 9 | { 10 | /// 11 | /// 决定包安装的位置 12 | /// 13 | public enum InstallTarget 14 | { 15 | /// 16 | /// Default 17 | /// 18 | Default, 19 | /// 20 | /// Install package on the internal system memory. 21 | /// 22 | InternalSystemMemory, 23 | /// 24 | /// Install package on the shared mass storage (such as sdcard). 25 | /// 26 | [Obsolete("Nowadays,install apps to sdcard will let your device slowly")] 27 | SharedMassStorage 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Device/Management/AppFx/ServiceManager.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/31 9:39:08 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using AutumnBox.Basic.Calling; 7 | using AutumnBox.Basic.Util; 8 | 9 | namespace AutumnBox.Basic.Device.Management.AppFx 10 | { 11 | /// 12 | /// 服务管理器 13 | /// 14 | public sealed class ServiceManager : DeviceCommander 15 | { 16 | /// 17 | /// 构造 18 | /// 19 | /// 20 | public ServiceManager(IDevice device) : base(device) 21 | { 22 | } 23 | /// 24 | /// 启动服务 25 | /// 26 | /// 27 | /// 28 | public void Start(ComponentName cn, Intent intent = null) 29 | { 30 | Executor.AdbShell(Device, 31 | $"am startservice -n {cn.ToString()} {intent?.ToString()}") 32 | .ThrowIfShellExitCodeNotEqualsZero(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Device/Management/AppFx/TrimMemoryLevel.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/30 5:49:54 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | namespace AutumnBox.Basic.Device.Management.AppFx 7 | { 8 | /// 9 | /// 内存收紧级别 10 | /// 11 | public enum TrimMemoryLevel 12 | { 13 | #pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 14 | HIDDEN, 15 | RUNNING_MODERATE, 16 | BACKGROUND, 17 | RUNNING_LOW, 18 | MODERATE, 19 | RUNNING_CRITICAL, 20 | COMPLETE 21 | #pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Device/Management/OS/BuildPropKeys.cs: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/1/12 23:45:40 4 | ** filename: BuildPropKeys.cs 5 | ** compiler: Visual Studio 2017 6 | ** desc: ... 7 | *********************************************************************************/ 8 | namespace AutumnBox.Basic.Device.Management.OS 9 | { 10 | /// 11 | /// build.prop中常用的key 12 | /// 13 | public static class BuildPropKeys 14 | { 15 | #pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 16 | public const string Board = "ro.product.board"; 17 | public const string ProductName = "ro.product.name"; 18 | public const string Model = "ro.product.model"; 19 | public const string Brand = "ro.product.brand"; 20 | public const string SdkVersion = "ro.build.version.sdk"; 21 | public const string AndroidVersion = "ro.build.version.release"; 22 | public const string NavigationBar = "qemu.hw.mainkeys"; 23 | #pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Device/Management/OS/ShellCommandHelper.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/9/28 4:25:44 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using AutumnBox.Basic.Exceptions; 7 | using AutumnBox.Basic.Util; 8 | using System; 9 | 10 | namespace AutumnBox.Basic.Device.Management.OS 11 | { 12 | /// 13 | /// Shell命令帮助 14 | /// 15 | public static class ShellCommandHelper 16 | { 17 | /// 18 | /// 检测某个命令是否存在 19 | /// 20 | /// 21 | /// 22 | [Obsolete("检测方式非常危险", true)] 23 | public static void CommandExistsCheck(IDevice device, string cmd) 24 | { 25 | throw new NotImplementedException(); 26 | //var result = new ShellCommand(device, cmd) 27 | // .Execute(); 28 | //if (result.ExitCode == (int)LinuxReturnCode.KeyHasExpired) 29 | //{ 30 | // throw new CommandNotFoundException(cmd); 31 | //} 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Device/Management/OS/UserInfo.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/9/28 4:45:34 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | 7 | namespace AutumnBox.Basic.Device.Management.OS 8 | { 9 | /// 10 | /// 用户信息 11 | /// 12 | public struct UserInfo 13 | { 14 | /// 15 | /// ID 16 | /// 17 | public int Id { get; set; } 18 | /// 19 | /// Name 20 | /// 21 | public string Name { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Device/ManagementV2/AppFx/TrimMemoryLevel.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/30 5:49:54 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | namespace AutumnBox.Basic.Device.ManagementV2.AppFx 7 | { 8 | /// 9 | /// 内存收紧级别 10 | /// 11 | public enum TrimMemoryLevel 12 | { 13 | #pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 14 | HIDDEN, 15 | RUNNING_MODERATE, 16 | BACKGROUND, 17 | RUNNING_LOW, 18 | MODERATE, 19 | RUNNING_CRITICAL, 20 | COMPLETE 21 | #pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Device/ManagementV2/OS/BuildKeys.cs: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/1/12 23:45:40 4 | ** filename: BuildPropKeys.cs 5 | ** compiler: Visual Studio 2017 6 | ** desc: ... 7 | *********************************************************************************/ 8 | namespace AutumnBox.Basic.Device.ManagementV2.OS 9 | { 10 | /// 11 | /// build.prop中常用的key 12 | /// 13 | public static class BuildKeys 14 | { 15 | #pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 16 | public const string Board = "ro.product.board"; 17 | public const string ProductName = "ro.product.name"; 18 | public const string Model = "ro.product.model"; 19 | public const string Brand = "ro.product.brand"; 20 | public const string SdkVersion = "ro.build.version.sdk"; 21 | public const string AndroidVersion = "ro.build.version.release"; 22 | public const string NavigationBar = "qemu.hw.mainkeys"; 23 | #pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Device/ManagementV2/OS/MemoryInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace AutumnBox.Basic.Device.ManagementV2.OS 6 | { 7 | /// 8 | /// 内存信息 9 | /// 10 | public struct MemoryInfo 11 | { 12 | #pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 13 | public int Total { get; set; } 14 | public int Free { get; set; } 15 | public int Buffers { get; set; } 16 | public int Available { get; set; } 17 | #pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Device/ManagementV2/OS/UserInfo.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/9/28 4:45:34 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | 7 | namespace AutumnBox.Basic.Device.ManagementV2.OS 8 | { 9 | /// 10 | /// 用户信息 11 | /// 12 | public struct UserInfo 13 | { 14 | /// 15 | /// ID 16 | /// 17 | public int Id { get; set; } 18 | /// 19 | /// Name 20 | /// 21 | public string Name { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Exceptions/AdbCommandFailedException.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/29 0:36:21 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using AutumnBox.Basic.Data; 7 | 8 | namespace AutumnBox.Basic.Exceptions 9 | { 10 | /// 11 | /// ADB命令执行失败异常 12 | /// 13 | public class AdbCommandFailedException : CommandErrorException 14 | { 15 | /// 16 | /// 构造 17 | /// 18 | /// 19 | /// 20 | public AdbCommandFailedException(Output output,int exitCode) 21 | : base(output?.ToString(),exitCode) 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Exceptions/AdbShellCommandFailedException.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/31 9:47:51 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | 7 | namespace AutumnBox.Basic.Exceptions 8 | { 9 | /// 10 | /// adb shell command执行失败异常 11 | /// 12 | public class AdbShellCommandFailedException : CommandErrorException 13 | { 14 | /// 15 | /// 构造 16 | /// 17 | /// 18 | /// 19 | public AdbShellCommandFailedException(string output, int exitCode) 20 | : base(output, exitCode) 21 | { 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Exceptions/CommandFaultException.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.Basic.Calling; 2 | using System; 3 | 4 | namespace AutumnBox.Basic.Exceptions 5 | { 6 | class CommandFaultException : Exception 7 | { 8 | public CommandFaultException(ICommandResult commandResult,string command=null) 9 | { 10 | CommandResult = commandResult ?? throw new ArgumentNullException(nameof(commandResult)); 11 | Command = command; 12 | } 13 | public string Command { get; set; } 14 | 15 | public ICommandResult CommandResult { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Exceptions/CommandNotFoundException.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/9/28 4:29:25 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using System; 7 | 8 | namespace AutumnBox.Basic.Exceptions 9 | { 10 | /// 11 | /// 命令找不到时的异常 12 | /// 13 | public class CommandNotFoundException : Exception 14 | { 15 | /// 16 | /// 命令找不到时的异常 17 | /// 18 | public CommandNotFoundException(string cmd) : base(cmd + "not found") 19 | { 20 | 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Exceptions/DeviceHasNoSuException.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/9/4 12:56:07 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using System; 7 | 8 | namespace AutumnBox.Basic.Exceptions 9 | { 10 | /// 11 | /// 设备没有SU权限 12 | /// 13 | public class DeviceHasNoSuException : Exception 14 | { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Exceptions/DeviceNotAliveException.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/30 4:59:05 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using System; 7 | 8 | namespace AutumnBox.Basic.Exceptions 9 | { 10 | /// 11 | /// 设备不再存活 12 | /// 13 | public class DeviceNotAliveException : Exception 14 | { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Exceptions/DeviceNotFoundException.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/1/18 19:42:36 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using System; 7 | 8 | namespace AutumnBox.Basic.Exceptions 9 | { 10 | /// 11 | /// 找不到设备异常 12 | /// 13 | [Serializable] 14 | public class DeviceNotFoundException:Exception 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Exceptions/PackageNotFoundException.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/1/15 3:14:35 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using System; 7 | 8 | namespace AutumnBox.Basic.Exceptions 9 | { 10 | /// 11 | /// 找不到包的异常 12 | /// 13 | [Serializable] 14 | public class PackageNotFoundException : Exception 15 | { 16 | /// 17 | /// 包名 18 | /// 19 | public string PackageName { get; private set; } 20 | /// 21 | /// 构建 22 | /// 23 | /// 24 | public PackageNotFoundException(string packageName = null) 25 | { 26 | this.PackageName = packageName; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/ManagedAdb/CommandDriven/CommandDrivenHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Runtime.CompilerServices; 5 | using System.Text; 6 | 7 | namespace AutumnBox.Basic.ManagedAdb.CommandDriven 8 | { 9 | /// 10 | /// CommandDriven命名空间下的一些常量 11 | /// 12 | public static class CommandDrivenHelper 13 | { 14 | /// 15 | /// Path环境变量的键 16 | /// 17 | public const string ENV_KEY_PATH = "PATH"; 18 | 19 | /// 20 | /// 安卓ADB服务器端口键 21 | /// 22 | public const string ENV_KEY_ANDROID_ADB_SERVER_PORT = "ANDROID_ADB_SERVER_PORT"; 23 | 24 | /// 25 | /// 初始化ADB环境 26 | /// 27 | /// 28 | /// 29 | /// 30 | public static void InitializeAdbEnvironment(this CommandProcedure cmd, DirectoryInfo dir, ushort port) 31 | { 32 | cmd.ExtraPathVariables.Add(dir.FullName); 33 | cmd.ExtraEnvironmentVariables[ENV_KEY_ANDROID_ADB_SERVER_PORT] = port.ToString(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/ManagedAdb/CommandDriven/CommandStatus.cs: -------------------------------------------------------------------------------- 1 | namespace AutumnBox.Basic.ManagedAdb.CommandDriven 2 | { 3 | /// 4 | /// 命令执行状态 5 | /// 6 | public enum CommandStatus 7 | { 8 | /// 9 | /// 准备 10 | /// 11 | Ready, 12 | /// 13 | /// 正在执行 14 | /// 15 | Executing, 16 | 17 | /// 18 | /// 成功 19 | /// 20 | Executed, 21 | 22 | /// 23 | /// 失败 24 | /// 25 | InnerException, 26 | 27 | /// 28 | /// 被取消 29 | /// 30 | Cancelled 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/ManagedAdb/CommandDriven/ICommandProcedureManager.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using AutumnBox.Basic.Data; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace AutumnBox.Basic.ManagedAdb.CommandDriven 8 | { 9 | /// 10 | /// 命令驱动器 11 | /// 12 | public interface ICommandProcedureManager : IDisposable, INotifyDisposed 13 | { 14 | /// 15 | /// 指示是否被释放 16 | /// 17 | bool DisposedValue { get; } 18 | 19 | /// 20 | /// 构建一个命令过程 21 | /// 22 | /// 命令名 23 | /// 额外参数 24 | /// 命令过程 25 | /// 参数为空 26 | /// 对象已经被释放 27 | ICommandProcedure OpenCommand(string commandName, params string[] args); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/ManagedAdb/SocketDriven/Future.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace AutumnBox.Basic.ManagedAdb.SocketDriven 6 | { 7 | class Future 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/ModuleInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | * ============================================================================== 4 | * 5 | * Filename: MInf 6 | * Description:  7 | * 8 | * Version: 1.0 9 | * Created: 2020/5/16 20:15:17 10 | * Compiler: Visual Studio 2019 11 | * 12 | * Author: zsh2401 13 | * 14 | * ============================================================================== 15 | */ 16 | using System; 17 | using System.Collections.Generic; 18 | using System.Text; 19 | 20 | namespace AutumnBox.Basic 21 | { 22 | /// 23 | /// 指示该模块的信息 24 | /// 25 | public static class ModuleInfo 26 | { 27 | /// 28 | /// 指示版本 29 | /// 30 | public static Version Version => Version.Parse(VERSION_STR); 31 | const string VERSION_STR = "2020.8.14"; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/MultipleDevices/DevicesArrayExtension.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/9/1 18:24:52 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using AutumnBox.Basic.Device; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | 10 | namespace AutumnBox.Basic.MultipleDevices 11 | { 12 | /// 13 | /// 设备数组拓展 14 | /// 15 | public static class DevicesArrayExtension 16 | { 17 | /// 18 | /// 设备数组对比 19 | /// 20 | /// 21 | /// 22 | /// 23 | public static bool DevicesEquals(this IEnumerable left, IEnumerable right) 24 | { 25 | if (left.Count() != right.Count()) return false; 26 | foreach (IDevice info in left) 27 | { 28 | if (!right.Contains(info)) return false; 29 | } 30 | return true; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/MultipleDevices/DevicesChangedEvent.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/9/1 18:28:42 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using AutumnBox.Basic.Device; 7 | using System; 8 | using System.Collections.Generic; 9 | 10 | namespace AutumnBox.Basic.MultipleDevices 11 | { 12 | /// 13 | /// 当连接设备拔插时的触发的事件 14 | /// 15 | /// 16 | /// 17 | public delegate void DevicesChangedHandler(object sender, DevicesChangedEventArgs e); 18 | /// 19 | /// 连接设备变化的事件的参数 20 | /// 21 | public class DevicesChangedEventArgs : EventArgs 22 | { 23 | /// 24 | /// 已连接设备列表 25 | /// 26 | public IEnumerable Devices { get; } 27 | /// 28 | /// 构造 29 | /// 30 | /// 31 | public DevicesChangedEventArgs(IEnumerable devList) 32 | { 33 | Devices = devList; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/MultipleDevices/DevicesCollection.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.Basic.Device; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace AutumnBox.Basic.MultipleDevices 5 | { 6 | class DevicesCollection : Collection 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/MultipleDevices/DevicesMonitor.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Basic.Shared/MultipleDevices/DevicesMonitor.cs -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/MultipleDevices/IDevicesGetter.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Basic.Shared/MultipleDevices/IDevicesGetter.cs -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Util/LinuxReturnCode.cs: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** auth: zsh2401@163.com 3 | ** date: 2017/12/29 20:46:08 4 | ** filename: ShellReturnCode.cs 5 | ** compiler: Visual Studio 2017 6 | ** desc: ... 7 | *********************************************************************************/ 8 | 9 | namespace AutumnBox.Basic.Util 10 | { 11 | /// 12 | /// Linux执行返回码 13 | /// 14 | public enum LinuxReturnCode 15 | { 16 | /// 17 | /// 没事 18 | /// 19 | None = 0, 20 | /// 21 | /// 错误 22 | /// 23 | Error = 1, 24 | /// 25 | /// KeyHasExpired 26 | /// 27 | KeyHasExpired = 127, 28 | /// 29 | /// 未知 30 | /// 31 | Unknow = -1, 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/AutumnBox.Basic.Shared/Util/Settings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace AutumnBox.Basic.Util 6 | { 7 | /// 8 | /// 设置 9 | /// 10 | public static class Settings 11 | { 12 | /// 13 | /// 是否在创建命令时创建窗口 14 | /// 15 | [Obsolete("无用的东西")] 16 | public static bool CreateNewWindow { get; set; } = false; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AutumnBox.Core/.gitignore: -------------------------------------------------------------------------------- 1 | AutumnBox.Core.xml -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials.Shared/AutumnBox.Extensions.Essentials.Shared.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 296957ae-70ab-40d6-b291-55eb291ce4a3 5 | 14.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials.Shared/Extensions/EAutumnBoxExtensionStore.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.OpenFramework.Extension; 2 | using AutumnBox.OpenFramework.Extension.Leaf; 3 | using System.Diagnostics; 4 | 5 | namespace AutumnBox.Essentials.Extensions 6 | { 7 | [ExtHidden] 8 | class EAutumnBoxExtensionStore : LeafExtensionBase 9 | { 10 | public const string URL_EXTENSION_STORE = "https://atmb.top/extensions/"; 11 | 12 | [LMain] 13 | public void EntryPoint() 14 | { 15 | ProcessStartInfo psi = new ProcessStartInfo 16 | { 17 | FileName = URL_EXTENSION_STORE, 18 | UseShellExecute = true 19 | }; 20 | Process.Start(psi); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials.Shared/Extensions/EAutumnBoxGuideViewer.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.OpenFramework.Extension; 2 | using AutumnBox.OpenFramework.Extension.Leaf; 3 | using System.Diagnostics; 4 | using System.IO; 5 | 6 | namespace AutumnBox.Essentials.Extensions 7 | { 8 | [ExtHidden] 9 | class EAutumnBoxGuideViewer : LeafExtensionBase 10 | { 11 | private const string URL_GUIDE = "https://www.atmb.top/guide"; 12 | 13 | [LMain] 14 | public void EntryPoint(string path = "") 15 | { 16 | ProcessStartInfo psi = new ProcessStartInfo 17 | { 18 | FileName = Path.Combine(URL_GUIDE, path), 19 | UseShellExecute = true 20 | }; 21 | Process.Start(psi); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials.Shared/Extensions/EAutumnBoxRestarter.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.Leafx.Enhancement.ClassTextKit; 2 | using AutumnBox.OpenFramework.Extension; 3 | using AutumnBox.OpenFramework.Extension.Leaf; 4 | using AutumnBox.OpenFramework.Open; 5 | 6 | namespace AutumnBox.Essentials.Extensions 7 | { 8 | [ExtHidden] 9 | [ExtName("Reboot AutumnBox")] 10 | [ClassText("confirm", "Are you sure to restart AutumnBox?", "zh-CN:确定要重启吗?")] 11 | class EAutumnBoxRestarter : LeafExtensionBase 12 | { 13 | [LMain] 14 | public void EntryPoint(INotificationManager notificationManager, 15 | IAppManager appManager) 16 | { 17 | //notificationManager.Info(appManager.CurrentLanguageCode); 18 | var task = notificationManager.Ask(this.RxGetClassText("confirm")); 19 | task.Wait(); 20 | if (task.Result) 21 | { 22 | appManager.RestartAppAsAdmin(); 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials.Shared/Extensions/ECmdLauncher.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | * ============================================================================== 4 | * 5 | * Filename: ECmdLauncher 6 | * Description:  7 | * 8 | * Version: 1.0 9 | * Created: 2020/8/9 3:42:01 10 | * Compiler: Visual Studio 2019 11 | * 12 | * Author: zsh2401 13 | * 14 | * ============================================================================== 15 | */ 16 | using AutumnBox.OpenFramework.Extension; 17 | using AutumnBox.OpenFramework.Extension.Leaf; 18 | using AutumnBox.OpenFramework.Management; 19 | 20 | namespace AutumnBox.Extensions.Essentials.Extensions 21 | { 22 | [ExtName("Launch ADB-CMD", "zh-cn:启动ADB命令行")] 23 | [ExtRequiredDeviceStates(AutumnBoxExtension.NoMatter)] 24 | [ExtIcon("Resources.Icons.cmd.png")] 25 | class ECmdLauncher : LeafExtensionBase 26 | { 27 | [LMain] 28 | public void EntryPoint(IBaseApi baseApi) 29 | { 30 | baseApi.UnstableInternalApiCall("open_command_line", "cmd.exe"); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials.Shared/Extensions/EPSLauncher.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | * ============================================================================== 4 | * 5 | * Filename: EPSLauncher 6 | * Description:  7 | * 8 | * Version: 1.0 9 | * Created: 2020/8/9 3:52:46 10 | * Compiler: Visual Studio 2019 11 | * 12 | * Author: zsh2401 13 | * 14 | * ============================================================================== 15 | */ 16 | using AutumnBox.OpenFramework.Extension; 17 | using AutumnBox.OpenFramework.Extension.Leaf; 18 | using AutumnBox.OpenFramework.Management; 19 | 20 | namespace AutumnBox.Extensions.Essentials.Extensions 21 | { 22 | [ExtName("Launch ADB-CMD(PS)", "zh-cn:ADB-PS命令行")] 23 | [ExtRequiredDeviceStates(AutumnBoxExtension.NoMatter)] 24 | [ExtIcon("Resources.Icons.ps.png")] 25 | class EPSLauncher : LeafExtensionBase 26 | { 27 | [LMain] 28 | public void EntryPoint(IBaseApi baseApi) 29 | { 30 | baseApi.UnstableInternalApiCall("open_command_line", "powershell.exe"); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/cmd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/cmd.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/devpanelswitcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/devpanelswitcher.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/disconnect-netdebbugging.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/disconnect-netdebbugging.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/enable-dev-netdebugging.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/enable-dev-netdebugging.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/icon.ico -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/ps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/ps.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/reboot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/reboot.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/wireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Essentials.Shared/Resources/Icons/wireless.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Essentials/AutumnBox.Extensions.Essentials.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0-windows 5 | AutumnBox.Extensions.Essentials 6 | AutumnBox.Extensions.Essentials 7 | true 8 | Debug;Release;Canary 9 | 1.1.0 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | false 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/AutumnBox.Extensions.Standard.Shared.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | d41be8e2-8b49-461d-bd30-601f9e34f83f 5 | 14.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/CoreLib.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/13 8:27:11 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using AutumnBox.OpenFramework.Management.ExtLibrary.Impl; 7 | using System; 8 | 9 | namespace AutumnBox.CoreModules 10 | { 11 | public sealed class CoreLib : ExtensionLibrarian 12 | { 13 | public const string STORAGE_ID = "AutumnBox.CoreModules.Storage"; 14 | public static CoreLib Current { get; private set; } 15 | public override string Name => "AutumnBox Core Modules"; 16 | public override Version Version => new Version(1, 2, 0); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Extensions/Poweron/Dpm/EAirForzenActivator.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/9/11 18:27:19 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using AutumnBox.OpenFramework.Extension; 7 | 8 | namespace AutumnBox.CoreModules.Extensions.Poweron.Dpm 9 | { 10 | [ExtName("激活空调狗", "en-us:Set AirForzen as DPM")] 11 | [ExtIcon("Icons.AirForzen.png")] 12 | internal class EAirForzenActivator : DeviceOwnerSetter 13 | { 14 | protected override string PackageName => "me.yourbay.airfrozen"; 15 | protected override string ComponentName => "me.yourbay.airfrozen/.main.core.mgmt.MDeviceAdminReceiver"; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Extensions/Poweron/Dpm/EAnzenboksuActivator.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/9/19 20:54:58 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | 7 | using AutumnBox.OpenFramework.Extension; 8 | 9 | namespace AutumnBox.CoreModules.Extensions.Poweron.Dpm 10 | { 11 | [ExtName("激活第二空间","en-us:Set Anzenboksu as DPM")] 12 | [ExtIcon("Icons.Anzenbokusu.png")] 13 | internal class EAnzenboksuActivator : DeviceOwnerSetter 14 | { 15 | protected override string PackageName => "com.hld.anzenbokusu"; 16 | protected override string ComponentName => "com.hld.anzenbokusu/.receiver.DPMReceiver"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Extensions/Poweron/Dpm/EBlackHole.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/9/10 20:07:46 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using AutumnBox.OpenFramework.Extension; 7 | 8 | namespace AutumnBox.CoreModules.Extensions.Poweron.Dpm 9 | { 10 | [ExtName("激活黑洞", "en-us:Set Blackhole as DPM")] 11 | [ExtIcon("Icons.blackhole.png")] 12 | internal class EBlackHole : DeviceOwnerSetter 13 | { 14 | protected override string ComponentName => "com.hld.apurikakusu/.receiver.DPMReceiver"; 15 | protected override string PackageName => "com.hld.apurikakusu"; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Extensions/Poweron/Dpm/EFreezeYou.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/9/11 18:27:19 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using AutumnBox.OpenFramework.Extension; 7 | 8 | namespace AutumnBox.CoreModules.Extensions.Poweron.Dpm 9 | { 10 | [ExtName("激活FreezeYou", "en-us:Set FreezeYou! as DPM")] 11 | [ExtIcon("Icons.freezeYou.png")] 12 | internal class EFreezeYou : DeviceOwnerSetter 13 | { 14 | protected override string PackageName => "cf.playhi.freezeyou"; 15 | protected override string ComponentName => "cf.playhi.freezeyou/.DeviceAdminReceiver"; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Extensions/Poweron/Dpm/EHideAnzen.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.OpenFramework.Extension; 2 | 3 | namespace AutumnBox.CoreModules.Extensions.Poweron.Dpm 4 | { 5 | [ExtName("激活第二空间伪装版")] 6 | [ExtIcon("Icons.anzenbokusufake.png")] 7 | [ExtRegions("zh-CN")] 8 | class EHideAnzen : DeviceOwnerSetter 9 | { 10 | protected override string PackageName => "com.hld.anzenbokusufake"; 11 | protected override string ComponentName => "com.hld.anzenbokusufake/com.hld.anzenbokusu.receiver.DPMReceiver"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Extensions/Poweron/Dpm/EIceBox.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/28 23:48:44 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using AutumnBox.OpenFramework.Extension; 7 | 8 | namespace AutumnBox.CoreModules.Extensions.Poweron.Dpm 9 | { 10 | [ExtName("激活冰箱", "en-us:Set Icebox as DPM")] 11 | [ExtPriority(ExtPriority.HIGH)] 12 | [ExtIcon("Icons.icebox.png")] 13 | internal class EIceBox : DeviceOwnerSetter 14 | { 15 | protected override string ComponentName => "com.catchingnow.icebox/.receiver.DPMReceiver"; 16 | protected override string PackageName => "com.catchingnow.icebox"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Extensions/Poweron/Dpm/EIslandActivator.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.OpenFramework.Extension; 2 | 3 | namespace AutumnBox.CoreModules.Extensions.Poweron.Dpm 4 | { 5 | [ExtName("Set Island as DPM", "zh-cn:一键激活岛")] 6 | [ExtIcon("Icons.Island.png")] 7 | class EIslandActivator : DeviceOwnerSetter 8 | { 9 | protected override string ComponentName => "com.oasisfeng.island/.IslandDeviceAdminReceiver"; 10 | protected override string PackageName => "com.oasisfeng.island"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Extensions/Poweron/Dpm/EStopApp.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/29 1:30:57 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using AutumnBox.OpenFramework.Extension; 7 | 8 | namespace AutumnBox.CoreModules.Extensions.Poweron.Dpm 9 | { 10 | [ExtName("激活小黑屋", "en-us:Set StopApp as DPM")] 11 | [ExtIcon("Icons.stopapp.png")] 12 | [ExtPriority(ExtPriority.HIGH + 1)] 13 | internal class EStopApp : DeviceOwnerSetter 14 | { 15 | protected override string ComponentName => "web1n.stopapp/.receiver.AdminReceiver"; 16 | protected override string PackageName => "web1n.stopapp"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Extensions/Poweron/Dpm/ETaiChi.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.OpenFramework.Extension; 2 | 3 | namespace AutumnBox.CoreModules.Extensions.Poweron.Dpm 4 | { 5 | [ExtName("Act TaiChi", "zh-cn:一键激活太极阴阳门")] 6 | [ExtIcon("Icons.taichi.png")] 7 | class ETaiChi : DeviceOwnerSetter 8 | { 9 | protected override string ComponentName => "me.weishu.exp/.DeviceAdmin"; 10 | 11 | protected override string PackageName => "me.weishu.exp"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/AirForzen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/AirForzen.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/Anzenbokusu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/Anzenbokusu.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/Greenify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/Greenify.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/Island.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/Island.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/ShizukuManager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/ShizukuManager.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/Usersir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/Usersir.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/a_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/a_b.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/add.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/android.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/anzenbokusufake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/anzenbokusufake.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/appopsx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/appopsx.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/blackhole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/blackhole.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/brevent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/brevent.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/cd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/cd.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/download.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/dpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/dpi.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/filepush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/filepush.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/flash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/flash.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/freezeYou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/freezeYou.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/gcm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/gcm.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/icebox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/icebox.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/knife.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/knife.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/lock.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/nuclear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/nuclear.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/permissiondog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/permissiondog.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/recorder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/recorder.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/restart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/restart.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/restartdevice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/restartdevice.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/screenshot.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/screenshotv2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/screenshotv2.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/stopapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/stopapp.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/taichi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/taichi.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Icons/unlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Icons/unlock.png -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Resources/dpmpro.file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Resources/dpmpro.file -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/Resources/godpower.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.Extensions.Standard.Shared/Resources/godpower.apk -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/View/ScreenRecorderWindow.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard.Shared/View/ScreenRecorderWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Shapes; 14 | 15 | namespace AutumnBox.CoreModules.View 16 | { 17 | /// 18 | /// ScreenRecorderWindow.xaml 的交互逻辑 19 | /// 20 | public partial class ScreenRecorderWindow : Window 21 | { 22 | public ScreenRecorderWindow() 23 | { 24 | InitializeComponent(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /src/AutumnBox.Extensions.Standard/AutumnBox.Extensions.Standard.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0-windows 5 | true 6 | Debug;Release;Canary 7 | 1.1.0 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/MVVM/InjectableObject.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.Leafx.Container; 2 | using AutumnBox.Leafx.ObjectManagement; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.ComponentModel; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows; 10 | 11 | namespace AutumnBox.GUI.MVVM 12 | { 13 | /// 14 | /// 表示一个属性可自动注入的对象 15 | /// 16 | public class InjectableObject 17 | { 18 | /// 19 | /// 指示是否在创建时注入属性 20 | /// 21 | protected virtual bool InjectProperties => true; 22 | 23 | /// 24 | /// 构造一个可注入对象 25 | /// 26 | public InjectableObject() 27 | { 28 | if ((!IsDesignMode()) && InjectProperties) 29 | { 30 | App.Current.Lake.InjectPropertyTo(this); 31 | } 32 | } 33 | 34 | /// 35 | /// 判断当前是否是设计模式 36 | /// 37 | /// 38 | public bool IsDesignMode() 39 | { 40 | return DesignerProperties.GetIsInDesignMode(new DependencyObject()); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/MVVM/ModelBase.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/15 16:21:23 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | 7 | namespace AutumnBox.GUI.MVVM 8 | { 9 | public class ModelBase : NotificationObject 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/MVVM/NotificationObject.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/15 15:44:31 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using System.ComponentModel; 7 | using System.Runtime.CompilerServices; 8 | 9 | namespace AutumnBox.GUI.MVVM 10 | { 11 | 12 | /// 13 | /// 表示可通知属性变化的类 14 | /// 15 | public class NotificationObject : InjectableObject, INotifyPropertyChanged 16 | { 17 | public event PropertyChangedEventHandler PropertyChanged; 18 | protected virtual void RaisePropertyChanged([CallerMemberName]string propertyName = null) 19 | { 20 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Models/LibDock.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.GUI.MVVM; 2 | using AutumnBox.OpenFramework.Management.ExtLibrary; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | 7 | namespace AutumnBox.GUI.Models 8 | { 9 | class LibDock : ModelBase 10 | { 11 | public ILibrarian Lib 12 | { 13 | get => _lib; set 14 | { 15 | _lib = value; 16 | RaisePropertyChanged(); 17 | } 18 | } 19 | private ILibrarian _lib; 20 | 21 | public int Count => Lib.Extensions.Count(); 22 | 23 | public LibDock(ILibrarian lib) 24 | { 25 | _lib = lib ?? throw new ArgumentNullException(nameof(lib)); 26 | } 27 | public static IEnumerable From(IEnumerable libs) 28 | { 29 | return from lib in libs 30 | select new LibDock(lib); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Models/OpenSourceProject.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.GUI.MVVM; 2 | 3 | namespace AutumnBox.GUI.Models 4 | { 5 | class OpenSourceProject : ModelBase 6 | { 7 | public string Name { get; set; } 8 | public string Description { get; set; } 9 | public string LicenseName { get; set; } 10 | public string Url { get; set; } 11 | public string Owner { get; set; } 12 | 13 | public OpenSourceProject(string name, string description, string licenseName, string url,string owner) 14 | { 15 | Name = name ?? throw new System.ArgumentNullException(nameof(name)); 16 | Description = description ?? throw new System.ArgumentNullException(nameof(description)); 17 | LicenseName = licenseName; 18 | Url = url; 19 | Owner = owner; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Models/VersionInfo.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.GUI.MVVM; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Media; 8 | 9 | namespace AutumnBox.GUI.Models 10 | { 11 | class VersionInfo : ModelBase 12 | { 13 | public string Version { get; set; } 14 | public string Time { get; set; } 15 | public string Content { get; set; } 16 | public VersionInfo(string version, string time, string content) 17 | { 18 | Version = version ?? throw new ArgumentNullException(nameof(version)); 19 | Time = time ?? throw new ArgumentNullException(nameof(time)); 20 | Content = content ?? throw new ArgumentNullException(nameof(content)); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Properties/PublishProfiles/FolderProfile.pubxml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 | Release 8 | Any CPU 9 | bin\Release\netcoreapp3.1\publish\ 10 | FileSystem 11 | netcoreapp3.1 12 | win-x86 13 | true 14 | True 15 | False 16 | False 17 | 18 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/CommonResources.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | Microsoft YaHei UI Light 6 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Icons/Menu/cmd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Icons/Menu/cmd.png -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Icons/Menu/debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Icons/Menu/debug.png -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Icons/Menu/donate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Icons/Menu/donate.png -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Icons/Menu/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Icons/Menu/exit.png -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Icons/Menu/guide-book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Icons/Menu/guide-book.png -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Icons/Menu/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Icons/Menu/icon.png -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Icons/Menu/powershell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Icons/Menu/powershell.png -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Icons/Menu/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Icons/Menu/settings.png -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Icons/icon.ico -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Icons/new_leaf.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Icons/new_leaf.ico -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Images/android_phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Images/android_phone.png -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Images/android_phone2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Images/android_phone2.png -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Images/donate_alishop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Images/donate_alishop.png -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Images/donate_pot4winter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Images/donate_pot4winter.png -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Images/donate_wechatpay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Images/donate_wechatpay.jpg -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Images/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Images/github.png -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Images/icon.png -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Sounds/ok.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Resources/Sounds/ok.wav -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Themes/ThemeDark.xaml: -------------------------------------------------------------------------------- 1 |  3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/Themes/ThemeLight.xaml: -------------------------------------------------------------------------------- 1 |  3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Resources/URLs.xaml: -------------------------------------------------------------------------------- 1 |  5 | https://github.com/zsh2401/AutumnBox 6 | https://github.com/zsh2401/www.atmb.top 7 | http://atmb.top/donate 8 | https://www.paypal.com/paypalme/zsh2401 9 | http://atmb.top/about 10 | 11 | 12 | http://atmb.top 13 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/IAcrylicHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AutumnBox.GUI.Services 4 | { 5 | interface IAcrylicHelper 6 | { 7 | void SetWindowBlur(IntPtr hWnd); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/IAdbDevicesManager.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.Basic.Device; 2 | using AutumnBox.Basic.MultipleDevices; 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | namespace AutumnBox.GUI.Services 7 | { 8 | interface IAdbDevicesManager 9 | { 10 | IDevice SelectedDevice { get; set; } 11 | void Initialize(); 12 | IEnumerable ConnectedDevices { get; } 13 | event DevicesChangedHandler ConnectedDevicesChanged; 14 | event EventHandler DeviceSelectionChanged; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/IAppLifecycleManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AutumnBox.GUI.Services 4 | { 5 | interface IAppLifecycleManager 6 | { 7 | event EventHandler AppLoaded; 8 | bool IsAppLoaded { get; } 9 | void LoadApplication(); 10 | void UnloadApplication(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/IBuildInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AutumnBox.GUI.Services 8 | { 9 | internal interface IBuildInfo 10 | { 11 | string LatestCommit { get; } 12 | string DateTime { get; } 13 | string LatestTag { get; } 14 | string Version { get; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/ILanguage.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/8/17 15:15:33 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using System; 7 | using System.Windows; 8 | 9 | namespace AutumnBox.GUI.Services 10 | { 11 | interface ILanguage : IEquatable 12 | { 13 | string Code { get; } 14 | string Name { get; } 15 | ResourceDictionary Resource { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/ILanguageManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | 5 | namespace AutumnBox.GUI.Services 6 | { 7 | /// 8 | /// 语言资源管理器接口 9 | /// 10 | internal interface ILanguageManager 11 | { 12 | /// 13 | /// 当语言变更时触发 14 | /// 15 | event EventHandler LanguageChanged; 16 | 17 | /// 18 | /// 获取或设置当前语言 19 | /// 20 | ILanguage Current { get; set; } 21 | 22 | /// 23 | /// 获取已加载的语言 24 | /// 25 | IList Languages { get; } 26 | 27 | /// 28 | /// 默认语言 29 | /// 30 | ILanguage DefaultLanguage { get; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/ILeafCardManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | 3 | namespace AutumnBox.GUI.Services 4 | { 5 | /// 6 | /// 如果不套一层包装器,WPF会将其直接显示,无用使用模板 7 | /// 8 | class ViewWrapper 9 | { 10 | public ViewWrapper(object view) 11 | { 12 | if (view is null) 13 | { 14 | throw new System.ArgumentNullException(nameof(view)); 15 | } 16 | View = view; 17 | } 18 | 19 | public object View { get; } 20 | } 21 | interface ILeafCardManager 22 | { 23 | ObservableCollection Views { get; } 24 | 25 | void Add(object view, int level); 26 | void Remove(object view); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/ILoggingManager.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.Logging.Management; 2 | using System.IO; 3 | 4 | namespace AutumnBox.GUI.Services 5 | { 6 | interface ILoggingManager 7 | { 8 | ILogsCollection Logs { get; } 9 | DirectoryInfo LogsDirectory { get; } 10 | void Initialize(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/IMessageBus.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AutumnBox.GUI.Services 8 | { 9 | public class MessageReceivedEventArgs : EventArgs 10 | { 11 | public MessageReceivedEventArgs(string type,object value) 12 | { 13 | Value = value; 14 | MessageType = type; 15 | } 16 | 17 | public object Value { get; } 18 | public string MessageType { get; } 19 | } 20 | interface IMessageBus 21 | { 22 | event EventHandler MessageReceived; 23 | void SendMessage(string msg_type, object value = null); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/INotificationManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AutumnBox.GUI.Services 8 | { 9 | interface INotificationManager 10 | { 11 | string Token { get; set; } 12 | Task Ask(string msg); 13 | void Warn(string msg); 14 | void Info(string msg); 15 | void Success(string msg); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/IOpenFxManager.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.OpenFramework.Management.ExtInfo; 2 | using System; 3 | using System.Threading.Tasks; 4 | 5 | namespace AutumnBox.GUI.Services 6 | { 7 | interface IOpenFxManager 8 | { 9 | void RunExtension(string extensionClassName); 10 | void LoadOpenFx(); 11 | void WakeIfLoaded(Action callback); 12 | Task[] RunningTasks { get; } 13 | IExtensionInfo[] Extensions { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/ISentenceService.cs: -------------------------------------------------------------------------------- 1 | namespace AutumnBox.GUI.Services 2 | { 3 | interface ISentenceService 4 | { 5 | string Next(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/ISettings.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | /* 3 | 4 | * ============================================================================== 5 | * 6 | * Filename: ISettings 7 | * Description:  8 | * 9 | * Version: 1.0 10 | * Created: 2020/5/20 21:51:23 11 | * Compiler: Visual Studio 2019 12 | * 13 | * Author: zsh2401 14 | * 15 | * ============================================================================== 16 | */ 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ComponentModel; 20 | using System.Text; 21 | 22 | namespace AutumnBox.GUI.Services 23 | { 24 | interface ISettings : INotifyPropertyChanged 25 | { 26 | string LanguageCode { get; set; } 27 | ThemeMode Theme { get; set; } 28 | bool DeveloperMode { get; set; } 29 | bool ShowDebugWindowNextLaunch { get; set; } 30 | bool StartCmdAtDesktop { get; set; } 31 | bool EnvVarCmdWindow { get; set; } 32 | bool GuidePassed { get; set; } 33 | bool SoundEffect { get; set; } 34 | void Save(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/ISoundService.cs: -------------------------------------------------------------------------------- 1 | namespace AutumnBox.GUI.Services 2 | { 3 | interface ISoundService 4 | { 5 | void PlayOK(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/IStorageManager.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | * ============================================================================== 4 | * 5 | * Filename: IStorageManager 6 | * Description:  7 | * 8 | * Version: 1.0 9 | * Created: 2020/5/19 19:56:32 10 | * Compiler: Visual Studio 2019 11 | * 12 | * Author: zsh2401 13 | * 14 | * ============================================================================== 15 | */ 16 | using System; 17 | using System.Collections.Generic; 18 | using System.IO; 19 | using System.Text; 20 | 21 | namespace AutumnBox.GUI.Services 22 | { 23 | interface IStorageManager 24 | { 25 | DirectoryInfo CacheDirectory { get; } 26 | DirectoryInfo StorageDirectory { get; } 27 | DirectoryInfo LogsDirectory { get; } 28 | bool IsFirstLaunch { get; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/ISubWindowDialog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AutumnBox.GUI.Services 4 | { 5 | public sealed class SubWindowFinishedEventArgs : EventArgs 6 | { 7 | public SubWindowFinishedEventArgs(object value = null) 8 | { 9 | Value = value; 10 | } 11 | 12 | public object Value { get; } 13 | } 14 | interface ISubWindowDialog 15 | { 16 | event EventHandler Finished; 17 | object View { get; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/ISubWindowDialogManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AutumnBox.GUI.Services 8 | { 9 | interface ISubWindowDialogManager 10 | { 11 | Task ShowDialog(string token, ISubWindowDialog dialog); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/ITabsManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace AutumnBox.GUI.Services 9 | { 10 | public interface ITabController 11 | { 12 | object View { get; } 13 | bool OnClosing(); 14 | void OnClosed(); 15 | string Header { get; } 16 | } 17 | interface ITabsManager 18 | { 19 | ObservableCollection Tabs { get; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/IThemeManager.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | * ============================================================================== 4 | * 5 | * Filename: IThemeManager 6 | * Description:  7 | * 8 | * Version: 1.0 9 | * Created: 2020/3/14 15:37:53 10 | * Compiler: Visual Studio 2019 11 | * 12 | * Author: zsh2401 13 | * 14 | * ============================================================================== 15 | */ 16 | 17 | namespace AutumnBox.GUI.Services 18 | { 19 | interface IThemeManager 20 | { 21 | ThemeMode ThemeMode { get; set; } 22 | void Initialize(); 23 | void Reload(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/IWallpaperManager.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | * ============================================================================== 4 | * 5 | * Filename: IWallpaperManager 6 | * Description:  7 | * 8 | * Version: 1.0 9 | * Created: 2020/5/16 23:43:21 10 | * Compiler: Visual Studio 2019 11 | * 12 | * Author: zsh2401 13 | * 14 | * ============================================================================== 15 | */ 16 | using System.Windows.Media; 17 | 18 | namespace AutumnBox.GUI.Services 19 | { 20 | interface IWallpaperManager 21 | { 22 | void SetBrush(Brush brush); 23 | void Reset(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/IWindowManager.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace AutumnBox.GUI.Services 4 | { 5 | interface IWindowManager 6 | { 7 | Window MainWindow { get; } 8 | Window CreateWindow(string windowName, params object[] args); 9 | void Show(string windowName); 10 | void ShowDialog(string windowName); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/Impl/Acrylic/README.md: -------------------------------------------------------------------------------- 1 | CODE IN THERE IS COME FROM [sourcechord/FluentWPF](https://github.com/sourcechord/FluentWPF) 2 | !!THANKS!! -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/Impl/AppLifecycleManager.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.GUI.Util.Loader; 2 | using AutumnBox.Leafx.Container.Support; 3 | using System; 4 | 5 | namespace AutumnBox.GUI.Services.Impl 6 | { 7 | [Component(Type = typeof(IAppLifecycleManager))] 8 | class AppLifecycleManager : IAppLifecycleManager 9 | { 10 | public bool IsAppLoaded => throw new NotImplementedException(); 11 | 12 | public event EventHandler AppLoaded 13 | { 14 | add 15 | { 16 | if (IsAppLoaded) 17 | { 18 | value(this, new EventArgs()); 19 | } 20 | else 21 | { 22 | appLoadedSource += value; 23 | } 24 | } 25 | remove 26 | { 27 | appLoadedSource -= value; 28 | } 29 | } 30 | private event EventHandler appLoadedSource; 31 | 32 | public void LoadApplication() 33 | { 34 | //TODO 35 | } 36 | 37 | public void UnloadApplication() 38 | { 39 | //TODO 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/Impl/LoggingManager.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.GUI.Util; 2 | using AutumnBox.Leafx.Container.Support; 3 | using AutumnBox.Logging.Management; 4 | using System; 5 | using System.IO; 6 | 7 | namespace AutumnBox.GUI.Services.Impl 8 | { 9 | [Component(Type = typeof(ILoggingManager))] 10 | sealed class LoggingManager : ILoggingManager 11 | { 12 | public ILogsCollection Logs => Logging.Management.LoggingManager.Logs; 13 | public DirectoryInfo LogsDirectory { get; } 14 | public LoggingManager(IStorageManager storageManager) 15 | { 16 | LogsDirectory = storageManager.LogsDirectory; 17 | } 18 | public void Initialize() 19 | { 20 | var logger = new TraceLogger() + new AsyncFileLogger(OpenLogFileStream()); 21 | Logging.Management.LoggingManager.CoreLogger = logger; 22 | } 23 | private FileStream OpenLogFileStream() 24 | { 25 | //Open file 26 | var logFileName = $"{DateTime.Now:yyyy-MM-dd_HH-mm-ss}.log"; 27 | var logFile = new FileInfo(Path.Combine(LogsDirectory.FullName, logFileName)); 28 | 29 | return logFile.Open(FileMode.OpenOrCreate, FileAccess.Write); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/Impl/LoggingObject.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.Logging; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace AutumnBox.GUI.Services.Impl 9 | { 10 | public abstract class LoggingObject 11 | { 12 | protected ILogger Logger { get; } 13 | public LoggingObject() 14 | { 15 | Logger = LoggerFactory.Auto(this.GetType().Name); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/Impl/MessageBusImpl.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.Leafx.Container.Support; 2 | using AutumnBox.Logging; 3 | using System; 4 | 5 | namespace AutumnBox.GUI.Services.Impl 6 | { 7 | [Component(Type = typeof(IMessageBus))] 8 | sealed class MessageBusImpl : IMessageBus 9 | { 10 | public event EventHandler MessageReceived; 11 | 12 | public void SendMessage(string msg_type, object value) 13 | { 14 | try 15 | { 16 | MessageReceived?.Invoke(this, 17 | new MessageReceivedEventArgs(msg_type, value)); 18 | } 19 | catch (Exception e) 20 | { 21 | SLogger.Warn($"An error occured when handling message : {msg_type}/{value}", e); 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/Impl/OS/NativeMethods.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsh2401/AutumnBox/7fca636ca966e944e786c5efa273bd4bf2717f36/src/AutumnBox.GUI/Services/Impl/OS/NativeMethods.cs -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/Impl/OS/TaskKill.cs: -------------------------------------------------------------------------------- 1 |  2 | using AutumnBox.Basic.ManagedAdb.CommandDriven; 3 | using AutumnBox.Basic.Util; 4 | 5 | namespace AutumnBox.GUI.Services.Impl.OS 6 | { 7 | static class TaskKill 8 | { 9 | public static void Kill(string exeName) 10 | { 11 | using var cmd = new CommandProcedure() 12 | { 13 | FileName = "taskkill", 14 | Arguments = $"/F /IM {exeName} /T" 15 | }; 16 | cmd.Execute(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/Impl/TabManager.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.Leafx.Container.Support; 2 | using AutumnBox.Logging; 3 | using System; 4 | using System.Collections.ObjectModel; 5 | 6 | namespace AutumnBox.GUI.Services.Impl 7 | { 8 | [Component(Type = typeof(ITabsManager))] 9 | class TabManager : ITabsManager 10 | { 11 | public ObservableCollection Tabs { get; } = 12 | new ObservableCollection(); 13 | 14 | public TabManager() 15 | { 16 | Tabs.Add(new MyTab()); 17 | Tabs.Add(new MyTab()); 18 | } 19 | 20 | private class MyTab : ITabController 21 | { 22 | public object View => "View"; 23 | 24 | public string Header => "Test tab"; 25 | 26 | public void OnClosed() 27 | { 28 | SLogger.Warn("Closed"); 29 | } 30 | 31 | public bool OnClosing() 32 | { 33 | return false; 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/Messages.cs: -------------------------------------------------------------------------------- 1 | namespace AutumnBox.GUI.Services 2 | { 3 | public static class Messages 4 | { 5 | public const string REFRESH_EXTENSIONS_VIEW = "___REFRESH_EXTENSIONS_VIEW"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Services/ThemeMode.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | * ============================================================================== 4 | * 5 | * Filename: ThemeMode 6 | * Description:  7 | * 8 | * Version: 1.0 9 | * Created: 2020/3/14 15:39:39 10 | * Compiler: Visual Studio 2019 11 | * 12 | * Author: zsh2401 13 | * 14 | * ============================================================================== 15 | */ 16 | 17 | namespace AutumnBox.GUI.Services 18 | { 19 | enum ThemeMode 20 | { 21 | Light = 1 << 0, 22 | Dark = 1 << 1, 23 | Auto = 1 << 2 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Util/AppUnloader.cs: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | ** auth: zsh2401@163.com 3 | ** date: 2018/10/30 22:46:43 (UTC +8:00) 4 | ** desc: ... 5 | *************************************************/ 6 | using AutumnBox.Basic; 7 | using AutumnBox.GUI.Services; 8 | using AutumnBox.Logging.Management; 9 | using AutumnBox.OpenFramework.Management; 10 | using Microsoft.AppCenter.Analytics; 11 | using System; 12 | using System.Collections.Generic; 13 | using System.Diagnostics; 14 | 15 | namespace AutumnBox.GUI.Util 16 | { 17 | internal static class AppUnloader 18 | { 19 | public static void Unload() 20 | { 21 | var mins = Convert.ToInt32((DateTime.Now - Process.GetCurrentProcess().StartTime).TotalMinutes); 22 | Analytics.TrackEvent("App Shutdown", new Dictionary() 23 | { 24 | { "Run Time (mins)", mins.ToString()}, 25 | }); 26 | 27 | try { App.Current.Lake.GetComponent().Save(); } catch { } 28 | try { OpenFx.Unload(); } catch { } 29 | try { BasicBooter.Free(); } catch { } 30 | try { LoggingManager.Free(); } catch { } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Util/AutumnObjectExtension.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.Leafx.Container; 2 | using AutumnBox.Logging; 3 | 4 | namespace AutumnBox.GUI.Util 5 | { 6 | public static class AutumnObjectExtension 7 | { 8 | public static T GetComponent(this object _) 9 | { 10 | return App.Current.Lake.Get(); 11 | } 12 | public static ILogger NCLogger(this object obj, string categoryName = null) 13 | { 14 | return LoggerFactory.Auto(categoryName ?? obj?.GetType()?.Name ?? "Unknown Object"); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Util/DesignHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | 8 | namespace AutumnBox.GUI.Util 9 | { 10 | public static class DesignHelper 11 | { 12 | private static bool? _isDesignModeCache = null; 13 | public static bool IsDesignMode 14 | { 15 | get 16 | { 17 | if (_isDesignModeCache == null) 18 | { 19 | _isDesignModeCache = System.ComponentModel.DesignerProperties.GetIsInDesignMode(new DependencyObject()); 20 | } 21 | return _isDesignModeCache == true; 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Util/Loader/AppLoaderExtension.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | * ============================================================================== 4 | * 5 | * Filename: AppLoaderExtension 6 | * Description:  7 | * 8 | * Version: 1.0 9 | * Created: 2020/5/28 20:09:15 10 | * Compiler: Visual Studio 2019 11 | * 12 | * Author: zsh2401 13 | * 14 | * ============================================================================== 15 | */ 16 | using AutumnBox.Leafx.Container.Support; 17 | 18 | namespace AutumnBox.GUI.Util.Loader 19 | { 20 | //public static class AppLoaderExtension 21 | //{ 22 | // public static App UseGlobalLake(this App app) 23 | // { 24 | // app.Lake = new SunsetLake(); 25 | // return app; 26 | // } 27 | // public static App UseServicesLoader(this App app) 28 | // { 29 | // app.Startup += (s, e) => { }; 30 | // } 31 | // public static App UseLibEnvLoader(this App app) 32 | // { 33 | // app.Startup += (s, e) => { }; 34 | // } 35 | // public static App UseMainWindowV3(this App app) 36 | // { 37 | // app.Startup += (s, e) => { }; 38 | // } 39 | //} 40 | } 41 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Util/Loader/AppLoaderFailedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AutumnBox.GUI.Util.Loader 8 | { 9 | class AppLoaderFailedEventArgs : EventArgs 10 | { 11 | public AppLoaderFailedEventArgs(AppLoadingException e) 12 | { 13 | Exception = e; 14 | } 15 | public AppLoadingException Exception { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Util/Loader/AppLoadingException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AutumnBox.GUI.Util.Loader 4 | { 5 | class AppLoadingException : Exception 6 | { 7 | public AppLoadingException(string stepName, Exception innerException) 8 | 9 | : base($"can not execute load step: {stepName}", innerException) { 10 | StepName = stepName; 11 | } 12 | 13 | public string StepName { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Util/Loader/StepAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AutumnBox.GUI.Util.Loader 4 | { 5 | [AttributeUsage(AttributeTargets.Method)] 6 | internal class StepAttribute : Attribute 7 | { 8 | public StepAttribute(uint step) 9 | { 10 | Step = step; 11 | } 12 | 13 | public uint Step { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Util/Loader/StepFinishedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AutumnBox.GUI.Util.Loader 8 | { 9 | class StepFinishedEventArgs : EventArgs 10 | { 11 | public StepFinishedEventArgs(uint finishedStep, uint totalStepCount) { 12 | FinishedStep = finishedStep; 13 | TotalStepCount = totalStepCount; 14 | } 15 | 16 | public uint FinishedStep { get; } 17 | public uint TotalStepCount { get; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Util/UI/Converters/BoolToVisibilityConverterParameter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AutumnBox.GUI.Util.UI.Converters 8 | { 9 | enum BoolToVisibilityConverterParameter 10 | { 11 | VisibleIf_IsTrue, 12 | VisibleIf_IsFalse 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Util/UI/Converters/EndPointConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Net; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows.Data; 9 | 10 | namespace AutumnBox.GUI.Util.UI.Converters 11 | { 12 | class EndPointConverter : IMultiValueConverter 13 | { 14 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 15 | { 16 | try 17 | { 18 | var ipStr = values[0] as string; 19 | var portStr = values[1] as string; 20 | if (ipStr == "iloveyou") return ipStr; 21 | var ip = IPAddress.Parse(ipStr); 22 | var port = ushort.Parse(portStr); 23 | return new IPEndPoint(ip, port); 24 | } 25 | catch 26 | { 27 | return false; 28 | } 29 | } 30 | 31 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) 32 | { 33 | throw new NotImplementedException(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Util/UI/Converters/NonBoolConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Data; 8 | 9 | namespace AutumnBox.GUI.Util.UI.Converters 10 | { 11 | [ValueConversion(typeof(bool), typeof(bool))] 12 | class NonBoolConverter : IValueConverter 13 | { 14 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 15 | { 16 | return !(bool)value; 17 | } 18 | 19 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 20 | { 21 | return !(bool)value; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Util/UI/Converters/NullToVisibilityConverterParameter.cs: -------------------------------------------------------------------------------- 1 | namespace AutumnBox.GUI.Util.UI.Converters 2 | { 3 | enum NullToVisibilityConverterParameter 4 | { 5 | VisibleIf_IsNull, 6 | VisibleIf_IsNotNull 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Util/UI/Converters/ObjectEqualsToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace AutumnBox.GUI.Util.UI.Converters 7 | { 8 | [ValueConversion(typeof(object), typeof(Visibility), ParameterType = typeof(object))] 9 | class ObjectEqualsToVisibilityConverter : IValueConverter 10 | { 11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | return value.Equals(parameter) ? Visibility.Visible : Visibility.Collapsed; 14 | } 15 | 16 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 17 | { 18 | throw new NotImplementedException(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Util/UI/Converters/VisibleIfNot.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace AutumnBox.GUI.Util.UI.Converters 7 | { 8 | class VisibleIfNot : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | var isTrue = parameter as bool? == true; 13 | var isNotNull = parameter != null; 14 | if (isNotNull || isTrue) 15 | { 16 | return Visibility.Collapsed; 17 | } 18 | else 19 | { 20 | return Visibility.Collapsed; 21 | } 22 | } 23 | 24 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 25 | { 26 | throw new NotImplementedException(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/ViewModels/VMLeafCards.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | * ============================================================================== 4 | * 5 | * Filename: VMPanelList 6 | * Description:  7 | * 8 | * Version: 1.0 9 | * Created: 2020/3/14 1:11:30 10 | * Compiler: Visual Studio 2019 11 | * 12 | * Author: zsh2401 13 | * 14 | * ============================================================================== 15 | */ 16 | using AutumnBox.GUI.MVVM; 17 | using AutumnBox.GUI.Services; 18 | 19 | using AutumnBox.Leafx.ObjectManagement; 20 | using System.Collections.ObjectModel; 21 | namespace AutumnBox.GUI.ViewModels 22 | { 23 | class VMLeafCards : ViewModelBase 24 | { 25 | [AutoInject] ILeafCardManager LeafCardManager { get; set; } 26 | 27 | public ObservableCollection Views => LeafCardManager.Views; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/ViewModels/VMLog.cs: -------------------------------------------------------------------------------- 1 | using AutumnBox.GUI.MVVM; 2 | using AutumnBox.GUI.Services; 3 | using AutumnBox.Leafx.ObjectManagement; 4 | using AutumnBox.Logging.Management; 5 | 6 | namespace AutumnBox.GUI.ViewModels 7 | { 8 | class VMLog : ViewModelBase 9 | { 10 | public ILogsCollection Logs => loggingManager.Logs; 11 | 12 | public string Title 13 | { 14 | get => _title; set 15 | { 16 | _title = value; 17 | RaisePropertyChanged(); 18 | } 19 | } 20 | private string _title; 21 | 22 | [AutoInject] 23 | private ILoggingManager loggingManager; 24 | 25 | public VMLog() 26 | { 27 | RaisePropertyChangedOnUIThread = true; 28 | Title = "AutumnBox Debug Window-Select and Ctrl+C to copy"; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/ViewModels/VMMainWindowV3.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | * ============================================================================== 4 | * 5 | * Filename: VMMainWindowV3 6 | * Description:  7 | * 8 | * Version: 1.0 9 | * Created: 2020/5/16 23:46:49 10 | * Compiler: Visual Studio 2019 11 | * 12 | * Author: zsh2401 13 | * 14 | * ============================================================================== 15 | */ 16 | using AutumnBox.GUI.MVVM; 17 | using AutumnBox.GUI.Services; 18 | using AutumnBox.Leafx.ObjectManagement; 19 | using System.Windows.Media; 20 | 21 | namespace AutumnBox.GUI.ViewModels 22 | { 23 | class VMMainWindowV3 : ViewModelBase 24 | { 25 | public Brush WallpaperBrush 26 | { 27 | get => _wallpaperBrush; set 28 | { 29 | _wallpaperBrush = value; 30 | RaisePropertyChanged(); 31 | } 32 | } 33 | private Brush _wallpaperBrush = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)); 34 | 35 | [AutoInject] 36 | IWallpaperManager wallpaperManager; 37 | public VMMainWindowV3() 38 | { 39 | RaisePropertyChangedOnUIThread = true; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Views/Controls/DeviceDash.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace AutumnBox.GUI.Views.Controls 4 | { 5 | /// 6 | /// DeviceDash.xaml 的交互逻辑 7 | /// 8 | public partial class DeviceDash : UserControl 9 | { 10 | public DeviceDash() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Views/Controls/DeviceSelector.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Views/Controls/DeviceSelector.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace AutumnBox.GUI.Views.Controls 4 | { 5 | /// 6 | /// DeviceSelector.xaml 的交互逻辑 7 | /// 8 | public partial class DeviceSelector : UserControl 9 | { 10 | public DeviceSelector() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Views/Controls/ExtensionsFinder.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace AutumnBox.GUI.Views.Controls 4 | { 5 | /// 6 | /// AllExtensionsPanel.xaml 的交互逻辑 7 | /// 8 | public partial class ExtensionsFinder : UserControl 9 | { 10 | public ExtensionsFinder() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Views/Controls/MainMenu.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace AutumnBox.GUI.Views.Controls 4 | { 5 | /// 6 | /// MainMenu.xaml 的交互逻辑 7 | /// 8 | public partial class MainMenu : UserControl 9 | { 10 | public MainMenu() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Views/Controls/PanelAbout.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace AutumnBox.GUI.Views.Controls 4 | { 5 | /// 6 | /// PanelAbout.xaml 的交互逻辑 7 | /// 8 | public partial class PanelAbout : UserControl 9 | { 10 | public PanelAbout() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Views/Controls/PanelUpdateLogs.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace AutumnBox.GUI.Views.Controls 4 | { 5 | /// 6 | /// PanelUpdateLogs.xaml 的交互逻辑 7 | /// 8 | public partial class PanelUpdateLogs : UserControl 9 | { 10 | public PanelUpdateLogs() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Views/Controls/StatusBar.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace AutumnBox.GUI.Views.Controls 4 | { 5 | /// 6 | /// StatutsBar.xaml 的交互逻辑 7 | /// 8 | public partial class StatusBar : UserControl 9 | { 10 | public StatusBar() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Views/Controls/TabsViewer.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace AutumnBox.GUI.Views.Controls 4 | { 5 | /// 6 | /// TabsViewer.xaml 的交互逻辑 7 | /// 8 | public partial class TabsViewer : UserControl 9 | { 10 | public TabsViewer() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Views/Controls/XCardsViewer.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace AutumnBox.GUI.Views.Controls 4 | { 5 | /// 6 | /// PanelListView.xaml 的交互逻辑 7 | /// 8 | public partial class XCardsViewer 9 | { 10 | public XCardsViewer() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Views/Custom/NiceWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Media.Imaging; 3 | 4 | namespace AutumnBox.GUI.Views.Custom 5 | { 6 | public class NiceWindow : HandyControl.Controls.Window 7 | { 8 | protected override void OnActivated(EventArgs e) 9 | { 10 | this.Icon = new BitmapImage(new Uri("pack://application:,,,/Resources/Icons/icon.ico")); 11 | base.OnActivated(e); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Views/SubWindowViews/Guide.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | using System.Windows.Controls; 4 | using AutumnBox.GUI.Services; 5 | 6 | 7 | namespace AutumnBox.GUI.Views.SubWindowViews 8 | { 9 | /// 10 | /// ContentGuide.xaml 的交互逻辑 11 | /// 12 | public partial class Guide : UserControl, ISubWindowDialog 13 | { 14 | public Guide() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | public object View => this; 20 | 21 | public event EventHandler Finished; 22 | 23 | private void Button_Click(object sender, RoutedEventArgs e) 24 | { 25 | Finished?.Invoke(this, new SubWindowFinishedEventArgs(false)); 26 | } 27 | 28 | private void Button_Click_1(object sender, RoutedEventArgs e) 29 | { 30 | Finished?.Invoke(this, new SubWindowFinishedEventArgs(true)); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/AutumnBox.GUI/Views/SubWindowViews/LeafUIInputView.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 |