├── .github └── FUNDING.yml ├── .gitignore ├── .idea └── .idea.Xamlade │ └── .idea │ └── workspace.xml ├── .vscode └── launch.json ├── App.axaml ├── App.axaml.cs ├── Avalonia.AXAML.LanguageServer.Log20231031.txt ├── Avalonia.GIF ├── Avalonia.Gif.deps.json ├── Avalonia.Gif.dll ├── Avalonia.Gif.pdb └── publish │ ├── Avalonia.Base.dll │ ├── Avalonia.Controls.dll │ ├── Avalonia.DesignerSupport.dll │ ├── Avalonia.Dialogs.dll │ ├── Avalonia.Gif.deps.json │ ├── Avalonia.Gif.dll │ ├── Avalonia.Gif.pdb │ ├── Avalonia.Markup.Xaml.dll │ ├── Avalonia.Markup.dll │ ├── Avalonia.Metal.dll │ ├── Avalonia.MicroCom.dll │ ├── Avalonia.OpenGL.dll │ ├── Avalonia.Remote.Protocol.dll │ ├── Avalonia.dll │ └── MicroCom.Runtime.dll ├── ComboboxStyle.axaml ├── Extensions ├── Attributes │ └── ReflectionCall.cs ├── Color │ ├── MyColorButton.cs │ └── MyColorPickerWindow.cs ├── Constants.cs ├── GlobalKeyListener.cs ├── History.cs ├── Statistics.cs ├── Types │ ├── State.cs │ ├── jCoordinates.cs │ └── jSize.cs └── Utils.cs ├── FunctionalAreas ├── ElementGenerator.cs ├── HierarchyControl.cs ├── PropertiesControl.cs ├── Workspace.cs └── WorkspaceManager.cs ├── IgnTypeConverter.cs ├── IgnoredTypeConverter.cs ├── LICENSE ├── LinkWorkers ├── Beholder.cs └── BeholderTimeAnalisys.cs ├── Notes.txt ├── ProgramWindow ├── MainWindow.axaml ├── MainWindow.axaml.cs ├── Names.cs └── Program.cs ├── README.md ├── RES └── loading.gif ├── Reflection ├── JTypeInfo.cs ├── Reflector.cs └── TypeCast.cs ├── SettingsWorkers ├── FilesystemService │ └── JSONBus.cs ├── SettingsModule.cs └── SettingsTypes │ ├── JControlDefaults.cs │ └── Settings.cs ├── TestWindow.axaml ├── TestWindow.axaml.cs ├── XAMLWorkers ├── Broadcast.cs ├── ImportXAML.cs ├── TestWindow.cs └── XAMLGenerator.cs ├── Xamlade.csproj ├── Xamlade.png ├── Xamlade.sln ├── Xamlade.sln.DotSettings.user ├── Xamlade2.png ├── Xamlade2.png~ ├── app.manifest ├── assets ├── Icon.png ├── Icon.png.kra ├── Icon.png1.kra ├── Icon.png~ ├── Icon1.png ├── Icon1.png~ ├── Xamlade.png ├── Xamlade_logo.png ├── Xamlade_logo1.png ├── Xamlade_logo_2.png ├── Xamlade_logo_2.png.kra ├── Xamlade_logo_2.png1.kra ├── Xamlade_logo_2.png~ ├── Xamlade_logo_21.png ├── Xamlade_logo_21.png~ ├── debug.png ├── debug.png.kra ├── debug.png1.kra ├── debug.png~ ├── debug1.png ├── debug1.png~ ├── dexamlize.png ├── dexamlize.png.kra ├── dexamlize.png1.kra ├── dexamlize.png~ ├── dexamlize1.png ├── dexamlize1.png~ ├── import-export.png ├── import-export1.png ├── redo.png ├── redo.png~ ├── redo1.png ├── redo1.png~ ├── remove.png ├── remove.png.kra ├── remove.png1.kra ├── remove.png~ ├── remove1.png ├── remove1.png~ ├── run.png ├── run.png.kra ├── run.png1.kra ├── run.png~ ├── run1.png ├── run1.png~ ├── settings.png ├── settings.png.kra ├── settings.png1.kra ├── settings.png~ ├── settings1.png ├── settings1.png~ ├── shelved.patch ├── undo.png ├── undo.png~ ├── undo1.png ├── undo1.png~ ├── xamlize.png ├── xamlize.png.kra ├── xamlize.png1.kra ├── xamlize.png~ ├── xamlize1.png └── xamlize1.png~ ├── bin └── Debug │ └── net9.0 │ ├── XamladeDemo │ ├── .idea │ │ └── .idea.XamladeDemo │ │ │ └── .idea │ │ │ ├── .gitignore │ │ │ ├── avalonia.xml │ │ │ ├── indexLayout.xml │ │ │ └── vcs.xml │ ├── App.axaml │ ├── App.axaml.cs │ ├── App.axaml1 │ ├── Avalonia.AXAML.LanguageServer.Log20240721.txt │ ├── Avalonia.AXAML.LanguageServer.Log20240731.txt │ ├── Avalonia.AXAML.LanguageServer.Log20240907.txt │ ├── BUILD.sh │ ├── MainWindow.axaml │ ├── MainWindow.axaml.cs │ ├── MainWindow.axaml1 │ ├── Program.cs │ ├── README.md │ ├── RUN.sh │ ├── XamladeDemo.csproj │ ├── XamladeDemo.sln │ ├── app.manifest │ ├── assets │ │ ├── -4sG5ytVcL4.jpg │ │ ├── Icon.png │ │ ├── Icon.png.kra │ │ ├── Icon.png1.kra │ │ ├── Icon.png~ │ │ ├── Icon1.png │ │ ├── Icon1.png~ │ │ ├── Xamlade.png │ │ ├── Xamlade_logo.png │ │ ├── Xamlade_logo1.png │ │ ├── Xamlade_logo_2.png │ │ ├── Xamlade_logo_2.png.kra │ │ ├── Xamlade_logo_2.png1.kra │ │ ├── Xamlade_logo_2.png~ │ │ ├── Xamlade_logo_21.png │ │ ├── Xamlade_logo_21.png~ │ │ ├── debug.png │ │ ├── debug.png.kra │ │ ├── debug.png1.kra │ │ ├── debug.png~ │ │ ├── debug1.png │ │ ├── debug1.png~ │ │ ├── dexamlize.png │ │ ├── dexamlize.png.kra │ │ ├── dexamlize.png1.kra │ │ ├── dexamlize.png~ │ │ ├── dexamlize1.png │ │ ├── dexamlize1.png~ │ │ ├── fuck.jpg │ │ ├── import-export.png │ │ ├── import-export1.png │ │ ├── photo_2021-12-13_00-44-53.jpg │ │ ├── redo.png │ │ ├── redo.png~ │ │ ├── redo1.png │ │ ├── redo1.png~ │ │ ├── remove.png │ │ ├── remove.png.kra │ │ ├── remove.png1.kra │ │ ├── remove.png~ │ │ ├── remove1.png │ │ ├── remove1.png~ │ │ ├── run.png │ │ ├── run.png.kra │ │ ├── run.png1.kra │ │ ├── run.png~ │ │ ├── run1.png │ │ ├── run1.png~ │ │ ├── settings.png │ │ ├── settings.png.kra │ │ ├── settings.png1.kra │ │ ├── settings.png~ │ │ ├── settings1.png │ │ ├── settings1.png~ │ │ ├── shelved.patch │ │ ├── undo.png │ │ ├── undo.png~ │ │ ├── undo1.png │ │ ├── undo1.png~ │ │ ├── xamlize.png │ │ ├── xamlize.png.kra │ │ ├── xamlize.png1.kra │ │ ├── xamlize.png~ │ │ ├── xamlize1.png │ │ ├── xamlize1.png~ │ │ ├── Снимок экрана_2023-11-11_04-09-11.png │ │ └── Снимок экрана_2024-04-17_00-51-19.png │ └── global.json │ └── assets │ ├── -4sG5ytVcL4.jpg │ ├── Icon.png │ ├── Icon.png.kra │ ├── Icon.png1.kra │ ├── Icon.png~ │ ├── Icon1.png │ ├── Icon1.png~ │ ├── Xamlade.png │ ├── Xamlade_logo.png │ ├── Xamlade_logo1.png │ ├── Xamlade_logo_2.png │ ├── Xamlade_logo_2.png.kra │ ├── Xamlade_logo_2.png1.kra │ ├── Xamlade_logo_2.png~ │ ├── Xamlade_logo_21.png │ ├── Xamlade_logo_21.png~ │ ├── debug.png │ ├── debug.png.kra │ ├── debug.png1.kra │ ├── debug.png~ │ ├── debug1.png │ ├── debug1.png~ │ ├── dexamlize.png │ ├── dexamlize.png.kra │ ├── dexamlize.png1.kra │ ├── dexamlize.png~ │ ├── dexamlize1.png │ ├── dexamlize1.png~ │ ├── import-export.png │ ├── import-export1.png │ ├── redo.png │ ├── redo.png~ │ ├── redo1.png │ ├── redo1.png~ │ ├── remove.png │ ├── remove.png.kra │ ├── remove.png1.kra │ ├── remove.png~ │ ├── remove1.png │ ├── remove1.png~ │ ├── run.png │ ├── run.png.kra │ ├── run.png1.kra │ ├── run.png~ │ ├── run1.png │ ├── run1.png~ │ ├── settings.png │ ├── settings.png.kra │ ├── settings.png1.kra │ ├── settings.png~ │ ├── settings1.png │ ├── settings1.png~ │ ├── shelved.patch │ ├── undo.png │ ├── undo.png~ │ ├── undo1.png │ ├── undo1.png~ │ ├── xamlize.png │ ├── xamlize.png.kra │ ├── xamlize.png1.kra │ ├── xamlize.png~ │ ├── xamlize1.png │ ├── xamlize1.png~ │ └── Снимок экрана_2024-04-17_00-51-19.png ├── global.json ├── googleca45d2d676594602.html ├── jClasses ├── Containers │ ├── jBorder.cs │ ├── jCanvas.cs │ ├── jComboBox.cs │ ├── jComboBoxItem.cs │ ├── jDockPanel.cs │ ├── jGrid.cs │ ├── jMenu.cs │ ├── jMenuItem.cs │ └── jStackPanel.cs ├── Elements │ ├── jButton.cs │ ├── jCheckBox.cs │ ├── jImage.cs │ ├── jProgressBar.cs │ ├── jRadioButton.cs │ ├── jSlider.cs │ ├── jTextBlock.cs │ ├── jTextBox.cs │ └── jToggleButton.cs ├── Enums │ └── jElementType.cs ├── Interfaces │ ├── JBroadcastHandler.cs │ ├── JChildContainer.cs │ ├── JControl.cs │ ├── JProperties.cs │ └── JSelectable.cs ├── JBaseStatic.cs ├── Managers │ └── JCopy.cs └── ScottPlot │ └── jAvaplot.cs ├── mClasses ├── Interfaces │ └── MControl.cs ├── mBorder.cs ├── mColumnDefinition.cs ├── mGenButton.cs ├── mRowDefinition.cs └── mTreeViewItem.cs └── qodana.yaml /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | btc: '1D8a6raKEGb7koaszYNys3bzecfWVHc4tT' 4 | ton: 'UQDhp6tiqGEFjN4lwWxkjIMYtpsBdrN-76ijICsWdK44pHoy' 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | obj/ 2 | /packages/ 3 | riderModule.iml 4 | /_ReSharper.Caches/ -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Используйте IntelliSense, чтобы узнать о возможных атрибутах. 3 | // Наведите указатель мыши, чтобы просмотреть описания существующих атрибутов. 4 | // Для получения дополнительной информации посетите: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [] 7 | } -------------------------------------------------------------------------------- /App.axaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /App.axaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using Avalonia; 4 | using Avalonia.Controls.ApplicationLifetimes; 5 | using Avalonia.Markup.Xaml; 6 | 7 | namespace Xamlade; 8 | 9 | public class App : Application 10 | { 11 | 12 | public override void Initialize() 13 | { 14 | AvaloniaXamlLoader.Load(this); 15 | } 16 | 17 | 18 | public override void OnFrameworkInitializationCompleted() 19 | { 20 | if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) 21 | { 22 | desktop.MainWindow = new ProgramWindow.MainWindow(); 23 | } 24 | 25 | base.OnFrameworkInitializationCompleted(); 26 | } 27 | } -------------------------------------------------------------------------------- /Avalonia.GIF/Avalonia.Gif.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETCoreApp,Version=v8.0", 4 | "signature": "" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETCoreApp,Version=v8.0": { 9 | "Avalonia.Gif/1.0.0": { 10 | "dependencies": { 11 | "Avalonia": "11.0.5" 12 | }, 13 | "runtime": { 14 | "Avalonia.Gif.dll": {} 15 | } 16 | }, 17 | "Avalonia/11.0.5": { 18 | "dependencies": { 19 | "Avalonia.BuildServices": "0.0.29", 20 | "Avalonia.Remote.Protocol": "11.0.5", 21 | "MicroCom.Runtime": "0.11.0", 22 | "System.ComponentModel.Annotations": "4.5.0" 23 | }, 24 | "runtime": { 25 | "lib/net6.0/Avalonia.Base.dll": { 26 | "assemblyVersion": "11.0.5.0", 27 | "fileVersion": "11.0.5.0" 28 | }, 29 | "lib/net6.0/Avalonia.Controls.dll": { 30 | "assemblyVersion": "11.0.5.0", 31 | "fileVersion": "11.0.5.0" 32 | }, 33 | "lib/net6.0/Avalonia.DesignerSupport.dll": { 34 | "assemblyVersion": "0.7.0.0", 35 | "fileVersion": "0.7.0.0" 36 | }, 37 | "lib/net6.0/Avalonia.Dialogs.dll": { 38 | "assemblyVersion": "11.0.5.0", 39 | "fileVersion": "11.0.5.0" 40 | }, 41 | "lib/net6.0/Avalonia.Markup.Xaml.dll": { 42 | "assemblyVersion": "11.0.5.0", 43 | "fileVersion": "11.0.5.0" 44 | }, 45 | "lib/net6.0/Avalonia.Markup.dll": { 46 | "assemblyVersion": "11.0.5.0", 47 | "fileVersion": "11.0.5.0" 48 | }, 49 | "lib/net6.0/Avalonia.Metal.dll": { 50 | "assemblyVersion": "11.0.5.0", 51 | "fileVersion": "11.0.5.0" 52 | }, 53 | "lib/net6.0/Avalonia.MicroCom.dll": { 54 | "assemblyVersion": "11.0.5.0", 55 | "fileVersion": "11.0.5.0" 56 | }, 57 | "lib/net6.0/Avalonia.OpenGL.dll": { 58 | "assemblyVersion": "11.0.5.0", 59 | "fileVersion": "11.0.5.0" 60 | }, 61 | "lib/net6.0/Avalonia.dll": { 62 | "assemblyVersion": "11.0.5.0", 63 | "fileVersion": "11.0.5.0" 64 | } 65 | } 66 | }, 67 | "Avalonia.BuildServices/0.0.29": {}, 68 | "Avalonia.Remote.Protocol/11.0.5": { 69 | "runtime": { 70 | "lib/net6.0/Avalonia.Remote.Protocol.dll": { 71 | "assemblyVersion": "11.0.5.0", 72 | "fileVersion": "11.0.5.0" 73 | } 74 | } 75 | }, 76 | "MicroCom.Runtime/0.11.0": { 77 | "runtime": { 78 | "lib/net5.0/MicroCom.Runtime.dll": { 79 | "assemblyVersion": "0.11.0.0", 80 | "fileVersion": "0.11.0.0" 81 | } 82 | } 83 | }, 84 | "System.ComponentModel.Annotations/4.5.0": {} 85 | } 86 | }, 87 | "libraries": { 88 | "Avalonia.Gif/1.0.0": { 89 | "type": "project", 90 | "serviceable": false, 91 | "sha512": "" 92 | }, 93 | "Avalonia/11.0.5": { 94 | "type": "package", 95 | "serviceable": true, 96 | "sha512": "sha512-twUjGl6gxQeyxO7wG6v+ntvAN2IeNXDr2oS6a7h5LRXy83ITbcuA0gYUqm/aeLVe0cviGSVWE9x5BVkDjZfXpQ==", 97 | "path": "avalonia/11.0.5", 98 | "hashPath": "avalonia.11.0.5.nupkg.sha512" 99 | }, 100 | "Avalonia.BuildServices/0.0.29": { 101 | "type": "package", 102 | "serviceable": true, 103 | "sha512": "sha512-U4eJLQdoDNHXtEba7MZUCwrBErBTxFp6sUewXBOdAhU0Kwzwaa/EKFcYm8kpcysjzKtfB4S0S9n0uxKZFz/ikw==", 104 | "path": "avalonia.buildservices/0.0.29", 105 | "hashPath": "avalonia.buildservices.0.0.29.nupkg.sha512" 106 | }, 107 | "Avalonia.Remote.Protocol/11.0.5": { 108 | "type": "package", 109 | "serviceable": true, 110 | "sha512": "sha512-UDK2jNGWaMHOP4lENIeUp7WsNAv65PuR5Yjo6EksDgN+BfS99+O9QDskrroyCnaMredOYvyposyj5Bgur8vO1w==", 111 | "path": "avalonia.remote.protocol/11.0.5", 112 | "hashPath": "avalonia.remote.protocol.11.0.5.nupkg.sha512" 113 | }, 114 | "MicroCom.Runtime/0.11.0": { 115 | "type": "package", 116 | "serviceable": true, 117 | "sha512": "sha512-MEnrZ3UIiH40hjzMDsxrTyi8dtqB5ziv3iBeeU4bXsL/7NLSal9F1lZKpK+tfBRnUoDSdtcW3KufE4yhATOMCA==", 118 | "path": "microcom.runtime/0.11.0", 119 | "hashPath": "microcom.runtime.0.11.0.nupkg.sha512" 120 | }, 121 | "System.ComponentModel.Annotations/4.5.0": { 122 | "type": "package", 123 | "serviceable": true, 124 | "sha512": "sha512-UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg==", 125 | "path": "system.componentmodel.annotations/4.5.0", 126 | "hashPath": "system.componentmodel.annotations.4.5.0.nupkg.sha512" 127 | } 128 | } 129 | } -------------------------------------------------------------------------------- /Avalonia.GIF/Avalonia.Gif.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/Avalonia.Gif.dll -------------------------------------------------------------------------------- /Avalonia.GIF/Avalonia.Gif.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/Avalonia.Gif.pdb -------------------------------------------------------------------------------- /Avalonia.GIF/publish/Avalonia.Base.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/publish/Avalonia.Base.dll -------------------------------------------------------------------------------- /Avalonia.GIF/publish/Avalonia.Controls.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/publish/Avalonia.Controls.dll -------------------------------------------------------------------------------- /Avalonia.GIF/publish/Avalonia.DesignerSupport.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/publish/Avalonia.DesignerSupport.dll -------------------------------------------------------------------------------- /Avalonia.GIF/publish/Avalonia.Dialogs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/publish/Avalonia.Dialogs.dll -------------------------------------------------------------------------------- /Avalonia.GIF/publish/Avalonia.Gif.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETCoreApp,Version=v8.0", 4 | "signature": "" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETCoreApp,Version=v8.0": { 9 | "Avalonia.Gif/1.0.0": { 10 | "dependencies": { 11 | "Avalonia": "11.0.5" 12 | }, 13 | "runtime": { 14 | "Avalonia.Gif.dll": {} 15 | } 16 | }, 17 | "Avalonia/11.0.5": { 18 | "dependencies": { 19 | "Avalonia.BuildServices": "0.0.29", 20 | "Avalonia.Remote.Protocol": "11.0.5", 21 | "MicroCom.Runtime": "0.11.0", 22 | "System.ComponentModel.Annotations": "4.5.0" 23 | }, 24 | "runtime": { 25 | "lib/net6.0/Avalonia.Base.dll": { 26 | "assemblyVersion": "11.0.5.0", 27 | "fileVersion": "11.0.5.0" 28 | }, 29 | "lib/net6.0/Avalonia.Controls.dll": { 30 | "assemblyVersion": "11.0.5.0", 31 | "fileVersion": "11.0.5.0" 32 | }, 33 | "lib/net6.0/Avalonia.DesignerSupport.dll": { 34 | "assemblyVersion": "0.7.0.0", 35 | "fileVersion": "0.7.0.0" 36 | }, 37 | "lib/net6.0/Avalonia.Dialogs.dll": { 38 | "assemblyVersion": "11.0.5.0", 39 | "fileVersion": "11.0.5.0" 40 | }, 41 | "lib/net6.0/Avalonia.Markup.Xaml.dll": { 42 | "assemblyVersion": "11.0.5.0", 43 | "fileVersion": "11.0.5.0" 44 | }, 45 | "lib/net6.0/Avalonia.Markup.dll": { 46 | "assemblyVersion": "11.0.5.0", 47 | "fileVersion": "11.0.5.0" 48 | }, 49 | "lib/net6.0/Avalonia.Metal.dll": { 50 | "assemblyVersion": "11.0.5.0", 51 | "fileVersion": "11.0.5.0" 52 | }, 53 | "lib/net6.0/Avalonia.MicroCom.dll": { 54 | "assemblyVersion": "11.0.5.0", 55 | "fileVersion": "11.0.5.0" 56 | }, 57 | "lib/net6.0/Avalonia.OpenGL.dll": { 58 | "assemblyVersion": "11.0.5.0", 59 | "fileVersion": "11.0.5.0" 60 | }, 61 | "lib/net6.0/Avalonia.dll": { 62 | "assemblyVersion": "11.0.5.0", 63 | "fileVersion": "11.0.5.0" 64 | } 65 | } 66 | }, 67 | "Avalonia.BuildServices/0.0.29": {}, 68 | "Avalonia.Remote.Protocol/11.0.5": { 69 | "runtime": { 70 | "lib/net6.0/Avalonia.Remote.Protocol.dll": { 71 | "assemblyVersion": "11.0.5.0", 72 | "fileVersion": "11.0.5.0" 73 | } 74 | } 75 | }, 76 | "MicroCom.Runtime/0.11.0": { 77 | "runtime": { 78 | "lib/net5.0/MicroCom.Runtime.dll": { 79 | "assemblyVersion": "0.11.0.0", 80 | "fileVersion": "0.11.0.0" 81 | } 82 | } 83 | }, 84 | "System.ComponentModel.Annotations/4.5.0": {} 85 | } 86 | }, 87 | "libraries": { 88 | "Avalonia.Gif/1.0.0": { 89 | "type": "project", 90 | "serviceable": false, 91 | "sha512": "" 92 | }, 93 | "Avalonia/11.0.5": { 94 | "type": "package", 95 | "serviceable": true, 96 | "sha512": "sha512-twUjGl6gxQeyxO7wG6v+ntvAN2IeNXDr2oS6a7h5LRXy83ITbcuA0gYUqm/aeLVe0cviGSVWE9x5BVkDjZfXpQ==", 97 | "path": "avalonia/11.0.5", 98 | "hashPath": "avalonia.11.0.5.nupkg.sha512" 99 | }, 100 | "Avalonia.BuildServices/0.0.29": { 101 | "type": "package", 102 | "serviceable": true, 103 | "sha512": "sha512-U4eJLQdoDNHXtEba7MZUCwrBErBTxFp6sUewXBOdAhU0Kwzwaa/EKFcYm8kpcysjzKtfB4S0S9n0uxKZFz/ikw==", 104 | "path": "avalonia.buildservices/0.0.29", 105 | "hashPath": "avalonia.buildservices.0.0.29.nupkg.sha512" 106 | }, 107 | "Avalonia.Remote.Protocol/11.0.5": { 108 | "type": "package", 109 | "serviceable": true, 110 | "sha512": "sha512-UDK2jNGWaMHOP4lENIeUp7WsNAv65PuR5Yjo6EksDgN+BfS99+O9QDskrroyCnaMredOYvyposyj5Bgur8vO1w==", 111 | "path": "avalonia.remote.protocol/11.0.5", 112 | "hashPath": "avalonia.remote.protocol.11.0.5.nupkg.sha512" 113 | }, 114 | "MicroCom.Runtime/0.11.0": { 115 | "type": "package", 116 | "serviceable": true, 117 | "sha512": "sha512-MEnrZ3UIiH40hjzMDsxrTyi8dtqB5ziv3iBeeU4bXsL/7NLSal9F1lZKpK+tfBRnUoDSdtcW3KufE4yhATOMCA==", 118 | "path": "microcom.runtime/0.11.0", 119 | "hashPath": "microcom.runtime.0.11.0.nupkg.sha512" 120 | }, 121 | "System.ComponentModel.Annotations/4.5.0": { 122 | "type": "package", 123 | "serviceable": true, 124 | "sha512": "sha512-UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg==", 125 | "path": "system.componentmodel.annotations/4.5.0", 126 | "hashPath": "system.componentmodel.annotations.4.5.0.nupkg.sha512" 127 | } 128 | } 129 | } -------------------------------------------------------------------------------- /Avalonia.GIF/publish/Avalonia.Gif.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/publish/Avalonia.Gif.dll -------------------------------------------------------------------------------- /Avalonia.GIF/publish/Avalonia.Gif.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/publish/Avalonia.Gif.pdb -------------------------------------------------------------------------------- /Avalonia.GIF/publish/Avalonia.Markup.Xaml.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/publish/Avalonia.Markup.Xaml.dll -------------------------------------------------------------------------------- /Avalonia.GIF/publish/Avalonia.Markup.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/publish/Avalonia.Markup.dll -------------------------------------------------------------------------------- /Avalonia.GIF/publish/Avalonia.Metal.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/publish/Avalonia.Metal.dll -------------------------------------------------------------------------------- /Avalonia.GIF/publish/Avalonia.MicroCom.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/publish/Avalonia.MicroCom.dll -------------------------------------------------------------------------------- /Avalonia.GIF/publish/Avalonia.OpenGL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/publish/Avalonia.OpenGL.dll -------------------------------------------------------------------------------- /Avalonia.GIF/publish/Avalonia.Remote.Protocol.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/publish/Avalonia.Remote.Protocol.dll -------------------------------------------------------------------------------- /Avalonia.GIF/publish/Avalonia.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/publish/Avalonia.dll -------------------------------------------------------------------------------- /Avalonia.GIF/publish/MicroCom.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Avalonia.GIF/publish/MicroCom.Runtime.dll -------------------------------------------------------------------------------- /Extensions/Attributes/ReflectionCall.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Xamlade.Extensions.Atributes; 4 | 5 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Method | AttributeTargets.Property)] 6 | public class ReflectionCallAttribute : Attribute 7 | { 8 | 9 | } -------------------------------------------------------------------------------- /Extensions/Color/MyColorButton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Threading.Tasks; 4 | using Avalonia; 5 | using Avalonia.Controls; 6 | using Avalonia.Controls.Primitives; 7 | using Avalonia.LogicalTree; 8 | using Avalonia.Media; 9 | using AvaloniaColorPicker; 10 | using Xamlade.FunctionalAreas; 11 | using Xamlade.ProgramWindow; 12 | 13 | namespace Xamlade.ColorPicker; 14 | 15 | public class CustomColorButton : ColorButton where T : Window, IColorPickerWindow 16 | { 17 | Type baseType = typeof(ColorButton); 18 | 19 | public CustomColorButton() : base() 20 | { 21 | /* 22 | * Суть в том, чтобы отписать от события смены цвета богомерзкий обработчик с палеткой, 23 | * из-за которого Xamlade падает по непонятным внутренним NullRefferenceException. 24 | */ 25 | 26 | 27 | PropertyInfo contentButtonProperty = 28 | baseType.GetProperty("ContentButton", BindingFlags.NonPublic | BindingFlags.Instance); 29 | 30 | var contentButton = contentButtonProperty?.GetValue(this); 31 | 32 | if (contentButton != null) 33 | { 34 | //событие PropertyChanged 35 | EventInfo propertyChangedEvent = contentButton.GetType().GetEvent("PropertyChanged"); 36 | 37 | 38 | if (propertyChangedEvent != null) 39 | { 40 | FieldInfo eventField = null; 41 | Type currentType = contentButton.GetType(); 42 | 43 | //Target type = AvaloniaColorPicker.ColorButton[Xamlade.ColorPicker.MyColorPickerWindow] 44 | //Глубина рефлексии ебануца со стула 45 | //Ищем поле у базовых классов 46 | while (currentType != null) 47 | { 48 | eventField = currentType.GetField("_propertyChanged", 49 | BindingFlags.NonPublic | BindingFlags.Instance); 50 | //Закатный отряд 51 | if (eventField != null) 52 | break; 53 | currentType = currentType.BaseType; 54 | } 55 | 56 | if (eventField != null) 57 | { 58 | // Получаем делегат 59 | Delegate currentDelegate = (Delegate)eventField.GetValue(contentButton); 60 | // Привет атписчекам!!! 61 | if (currentDelegate != null) 62 | foreach (Delegate del in currentDelegate.GetInvocationList()) 63 | propertyChangedEvent.RemoveEventHandler(contentButton, del); 64 | } 65 | 66 | // Подписываем православный обработчик 67 | MethodInfo eventHandler = typeof(CustomColorButton).GetMethod("CustomContentButton_PropertyChanged", 68 | BindingFlags.NonPublic | BindingFlags.Instance); 69 | Delegate handler = Delegate.CreateDelegate(propertyChangedEvent.EventHandlerType, this, eventHandler); 70 | propertyChangedEvent.AddEventHandler(contentButton, handler); 71 | } 72 | } 73 | } 74 | 75 | private async void CustomContentButton_PropertyChanged(object sender, AvaloniaPropertyChangedEventArgs e) 76 | { 77 | if (e.Property == ToggleButton.IsCheckedProperty) 78 | if ((e.NewValue as bool?).Value) 79 | // Нахуй палетку!! 80 | ShowColorPickerDialog(); 81 | } 82 | 83 | private async Task ShowColorPickerDialog() 84 | { 85 | // Ищем приватный метод CreateColourPickerWindow 86 | MethodInfo createColourPickerWindowMethod = 87 | baseType.GetMethod("CreateColourPickerWindow", BindingFlags.NonPublic | BindingFlags.Static); 88 | object[] parameters = { new Color?(this.Color) }; 89 | T colourPickerWindow = (T)createColourPickerWindowMethod?.Invoke(this, parameters); 90 | 91 | await colourPickerWindow.ShowDialog(MainWindow._MainWindow); 92 | this.Color = colourPickerWindow.Color; 93 | } 94 | } 95 | 96 | /// 97 | /// A control that can be used to select a . 98 | /// 99 | public class MyColorButton : CustomColorButton 100 | { 101 | } -------------------------------------------------------------------------------- /Extensions/Color/MyColorPickerWindow.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Media; 2 | using AvaloniaColorPicker; 3 | using Xamlade.Extensions; 4 | 5 | namespace Xamlade.ColorPicker; 6 | 7 | public class MyColorPickerWindow : ColorPickerWindow 8 | { 9 | public MyColorPickerWindow() : base() 10 | { 11 | IsPaletteVisible = false; 12 | 13 | } 14 | 15 | public MyColorPickerWindow(Color? previousColor) : base(previousColor) 16 | { 17 | IsPaletteVisible = false; 18 | } 19 | } -------------------------------------------------------------------------------- /Extensions/Constants.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Xamlade.Extensions; 4 | 5 | public static class Constants 6 | { 7 | public static readonly List ExcludedWords = new() 8 | { 9 | "jParent", "mTreeItem", "Presenter", "Template", "IsLoaded", 10 | "DesiredSize", "IsMeasureValid", "IsArrangeValid", "RenderTransform", 11 | "DataContext", "IsInitialized", "Parent", "ActualThemeVariant", 12 | "Transitions", "Item", "Type", "IsPressed", "ClickMode", "IsDefault", "IsCancel", 13 | "DataTemplates", "Focusable", "IsEnabled", "IsKeyboardFocusWithin", 14 | "IsFocused", "IsHitTestVisible", "IsPointerOver", "IsTabStop", 15 | "IsEffectivelyEnabled", "TabIndex", "KeyBindings", "GestureRecognizers", 16 | "UseLayoutRounding", "ClipToBounds", "IsEffectivelyVisible", 17 | "HasMirrorTransform", "RenderTransformOrigin", "ZIndex", "Classes", 18 | "Styles", "StyleKey", "Resources", "Command", "HotKey", 19 | "CommandParameter", "Flyout", "Theme", "Clip", "TemplatedParent", "Effect", 20 | "OpacityMask", "Bounds", "Cursor", "Tag", "ContextFlyout", "ContextMenu", "FocusAdorner", "IsItemsHost", 21 | "Children", "jChildren", "FontFamily", "TextDecoration", "ContentTemplate", "FlowDirection", "Inlines", 22 | "TextLayout", 23 | "XAMLRating", "XAMLPiece", "CanPaste", "CanUndo", "jImageSource", "selectionBorder", "Child", "ItemsView", 24 | "ItemsPanelRoot", "Items", 25 | "ItemsPanel", "ItemContainerGenerator", "SelectedValue", "SelectionBoxItem", "SelectedItem", "ItemCount", 26 | "Beholder", 27 | "ContainerProperties", "Properties", "SpecialSetDelegates", "_jParent", "xPropertiesGroup", 28 | "ContainerSetProperties", 29 | "DataContext", "Parent", "VisualParent", "ActualThemeVariant", "Iterator", "TemplateSettings", 30 | "Percentage", "CaretBlinkInterval", "ItemContainerTheme", "IsTopLevel", "HeaderPresenter","HasSubMenu" 31 | }; 32 | } -------------------------------------------------------------------------------- /Extensions/GlobalKeyListener.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Avalonia.Controls; 3 | using Avalonia.Input; 4 | using Avalonia.Interactivity; 5 | using Xamlade.FunctionalAreas; 6 | using Xamlade.jClasses; 7 | 8 | namespace Xamlade.Extensions; 9 | 10 | public class GlobalKeyListener 11 | { 12 | public event Action KeyPressed = null!; 13 | public event Action KeyReleased = null!; 14 | 15 | public GlobalKeyListener(Window window) 16 | { 17 | window.AddHandler(InputElement.KeyDownEvent, KeyDownHandler!, RoutingStrategies.Tunnel); 18 | window.AddHandler(InputElement.KeyUpEvent, KeyUpHandler!, RoutingStrategies.Tunnel); 19 | window.AddHandler(InputElement.PointerPressedEvent, PointerPressedHandler, RoutingStrategies.Tunnel); 20 | window.AddHandler(InputElement.PointerReleasedEvent, PointerReleasedHandler, RoutingStrategies.Tunnel); 21 | } 22 | 23 | private void PointerReleasedHandler(object? sender, PointerReleasedEventArgs e) 24 | { 25 | if (Workspace.movable is jComboBox comboBox) 26 | comboBox.IsPressed = false; 27 | } 28 | 29 | private void PointerPressedHandler(object? sender, PointerPressedEventArgs e) 30 | { 31 | Workspace.InitPremovable(); 32 | } 33 | 34 | private void KeyDownHandler(object sender, KeyEventArgs e) 35 | { 36 | if (e.Key == Key.LeftCtrl) 37 | { 38 | KeyPressed.Invoke(e); 39 | State.ResizeFlag = true; 40 | } 41 | else if (e.Key == Key.LeftShift) 42 | { 43 | KeyPressed.Invoke(e); 44 | State.LShiftPressed = true; 45 | } 46 | } 47 | private void KeyUpHandler(object sender, KeyEventArgs e) 48 | { 49 | if (e.Key == Key.LeftCtrl || e.Key == Key.Delete || e.Key == Key.LeftShift) 50 | { 51 | KeyReleased.Invoke(e); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Extensions/Statistics.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Xamlade.Extensions; 4 | 5 | public static class Statistics 6 | { 7 | /// 8 | /// Количество элементов по классам 9 | /// 10 | private static Dictionary ElementCount { get; set; } 11 | 12 | static Statistics() 13 | { 14 | ElementCount = new Dictionary(); 15 | } 16 | 17 | /// 18 | /// Получить индекс нового элемента 19 | /// 20 | /// 21 | /// 22 | public static int GetNewElementIndex(string Type) 23 | { 24 | ElementCount.TryAdd(Type, 0); 25 | return ElementCount[Type]++; 26 | } 27 | /// 28 | /// Статистика по элементам 29 | /// 30 | /// 31 | /// 32 | public static int GetElementCount(string Type) 33 | { 34 | ElementCount.TryAdd(Type, 0); 35 | return ElementCount[Type]; 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /Extensions/Types/State.cs: -------------------------------------------------------------------------------- 1 | namespace Xamlade.Extensions; 2 | 3 | public static class State 4 | { 5 | public static bool RectangleFlag = true; 6 | public static bool LCtrlPressed = false; 7 | public static bool LShiftPressed = false; 8 | public static bool ResizeFlag = false; 9 | 10 | public static bool StrictModeEnabled = false; 11 | public static int StrictModeValue { get; set; } 12 | public static bool NewResizeFlag = true; 13 | } -------------------------------------------------------------------------------- /Extensions/Types/jCoordinates.cs: -------------------------------------------------------------------------------- 1 | namespace Xamlade.Extensions; 2 | 3 | public record jCoordinates(int X, int Y) 4 | { 5 | public int X { get; set; } = X; 6 | public int Y { get; set; } = Y; 7 | 8 | } -------------------------------------------------------------------------------- /Extensions/Types/jSize.cs: -------------------------------------------------------------------------------- 1 | namespace Xamlade.Extensions; 2 | 3 | public record jSize(double Width, double Height) 4 | { 5 | public double Width { get; set; } = Width; 6 | public double Height { get; set; } = Height; 7 | 8 | } -------------------------------------------------------------------------------- /Extensions/Utils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using System.Runtime.Serialization; 5 | using System.Timers; 6 | using Avalonia; 7 | using Avalonia.Controls; 8 | using Avalonia.Interactivity; 9 | using Avalonia.Media; 10 | using Xamlade.FunctionalAreas; 11 | using Xamlade.jClasses; 12 | using Xamlade.LinkWorkers; 13 | using Xamlade.ProgramWindow; 14 | using Xamlade.SettingsWorkers.SettingsTypes; 15 | 16 | namespace Xamlade.Extensions; 17 | 18 | public static class Utils 19 | { 20 | private static Panel DebugPanel { get; set; } 21 | public static Timer DebugTimer { get; set; } 22 | 23 | private static Timer MainTimer; 24 | 25 | 26 | public static bool isDebugPanelActive 27 | { 28 | get => DebugPanel.IsVisible; 29 | set { DebugPanel.IsVisible = value; } 30 | } 31 | 32 | //Отладочный итератор 33 | public static int NextgenIterator = 0; 34 | 35 | //Случайное число 36 | public static Random random; 37 | 38 | public static void Init(Panel debugPanel) 39 | { 40 | random = new Random(); 41 | DebugPanel = debugPanel; 42 | DebugTimer = new Timer(100); 43 | DebugTimer.AutoReset = true; 44 | DebugTimer.Enabled = true; 45 | MainTimer = new Timer(4000); 46 | MainTimer.AutoReset = true; 47 | MainTimer.Elapsed += (sender, args) => Tick(); 48 | MainTimer.Start(); 49 | } 50 | 51 | public static void DEBUG(object? sender, RoutedEventArgs e) 52 | { 53 | isDebugPanelActive = !isDebugPanelActive; 54 | // (Workspace.movable as JChildContainer).RemoveChild((Workspace.movable as JChildContainer).jChildren[0]); 55 | 56 | #region CopyExperimental 57 | 58 | /* 59 | JControl newObj = JCopy.Copy(Workspace.movable, Workspace.movable.jParent); 60 | 61 | jCanvas.SetLeft((JControl)newObj, jCanvas.GetLeft((JControl)newObj) + (int)(newObj.Bounds.Width)); 62 | jCanvas.SetTop((JControl)newObj, jCanvas.GetTop((JControl)newObj) + (int)(newObj.Bounds.Height)); 63 | */ 64 | 65 | #endregion 66 | 67 | var test = (jGrid)Activator.CreateInstance(Type.GetType("Xamlade.jClasses.jGrid")); 68 | JControlDefaults.InitDefaults(test); 69 | 70 | } 71 | 72 | public static void PrintDebugMessage(string message) 73 | { 74 | Avalonia.Threading.Dispatcher.UIThread.InvokeAsync(() => 75 | { 76 | ((DebugPanel.Children[0] as TextBlock)!).Text = message; 77 | }); 78 | } 79 | 80 | //Конвертеры делегатов 81 | public static JChildContainer.ContainerSetPropertyDelegate ConvertSetter(Action setter) => 82 | (element, prop) => 83 | { 84 | T value = (T)(prop.Value ?? default(T)); 85 | setter(element, value); 86 | }; 87 | 88 | public static JChildContainer.ContainerPropertyDelegate ConvertGetter(Func getter) => 89 | (element) => 90 | { 91 | T value = getter(element); // Получаем значение типа T 92 | return new Property(value); // Заворачиваем в Property 93 | }; 94 | 95 | private static void Tick() 96 | { 97 | Avalonia.Threading.Dispatcher.UIThread.InvokeAsync(() => 98 | { 99 | // PropertiesControl.ShowProperties(); 100 | }); 101 | } 102 | } -------------------------------------------------------------------------------- /FunctionalAreas/HierarchyControl.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Controls.Primitives; 4 | using Avalonia.Layout; 5 | using Avalonia.Media; 6 | using Avalonia.Styling; 7 | using Xamlade.jClasses; 8 | 9 | namespace Xamlade.FunctionalAreas; 10 | 11 | public static class HierarchyControl 12 | { 13 | private static TreeView HierarchyTree { get; set; } 14 | /// 15 | /// Выбранный в дереве элемент 16 | /// 17 | public static mTreeViewItem? Selected 18 | { 19 | get => (mTreeViewItem?)HierarchyTree.SelectedItem; 20 | set => HierarchyTree.SelectedItem = value; 21 | } 22 | public static void Init(TreeView Tree) 23 | { 24 | HierarchyTree = Tree; 25 | 26 | // Создание стиля для TreeViewItem 27 | 28 | 29 | 30 | var treeViewItemStyleCorrected = new Style(x => x.OfType()) 31 | { 32 | Setters = 33 | { 34 | new Setter(TemplatedControl.PaddingProperty, new Thickness(0, 0, 0, 0)), 35 | new Setter(Layoutable.MarginProperty, new Thickness(-12, 0, 0, 0)), // Без отрицательного отступа 36 | new Setter(TemplatedControl.FontSizeProperty, 15.0), 37 | } 38 | }; 39 | 40 | 41 | HierarchyTree.Styles.Add(treeViewItemStyleCorrected); 42 | 43 | HierarchyTree.SelectionChanged += MainHierarchyTree_OnSelectionChanged; 44 | 45 | HierarchyTree.Items.Add(new mTreeViewItem(Workspace.MainCanvas)); 46 | Selected = Workspace.MainCanvas.Beholder.mTreeItem; 47 | } 48 | 49 | private static void MainHierarchyTree_OnSelectionChanged(object? sender, SelectionChangedEventArgs e) 50 | { 51 | if (((TreeView)sender).SelectedItem is mTreeViewItem item) 52 | Workspace.SelectjElement(item.Beholder.element); 53 | else 54 | Workspace.SelectjElement(Workspace.MainCanvas); 55 | e.Handled = true; 56 | } 57 | } -------------------------------------------------------------------------------- /FunctionalAreas/WorkspaceManager.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Threading; 4 | using Xamlade.jClasses; 5 | 6 | namespace Xamlade.FunctionalAreas; 7 | 8 | public static class WorkspaceManager 9 | { 10 | public static void CorrectProperties(JControl element) 11 | { 12 | Dispatcher.UIThread.InvokeAsync(() => 13 | { 14 | JBaseStatic.CorrectProperties(element); 15 | }); 16 | } 17 | 18 | public static void CorrectDraw(Control element) 19 | { 20 | Dispatcher.UIThread.InvokeAsync(() => 21 | { 22 | element.InvalidateMeasure(); 23 | element.InvalidateArrange(); 24 | element.InvalidateVisual(); 25 | }, DispatcherPriority.Render); 26 | } 27 | } -------------------------------------------------------------------------------- /IgnTypeConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.Json; 4 | using System.Text.Json.Serialization; 5 | 6 | namespace Xamlade; 7 | 8 | 9 | public class IgnoredTypesConverter : JsonConverter 10 | { 11 | private readonly HashSet ignoredTypes; 12 | 13 | public IgnoredTypesConverter(HashSet ignoredTypes) 14 | { 15 | this.ignoredTypes = ignoredTypes; 16 | } 17 | 18 | public override bool CanConvert(Type typeToConvert) 19 | { 20 | return !ignoredTypes.Contains(typeToConvert); 21 | } 22 | 23 | public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 24 | { 25 | return JsonSerializer.Deserialize(ref reader, options); 26 | } 27 | 28 | public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) 29 | { 30 | JsonSerializer.Serialize(writer, value, options); 31 | } 32 | } -------------------------------------------------------------------------------- /IgnoredTypeConverter.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/IgnoredTypeConverter.cs -------------------------------------------------------------------------------- /LinkWorkers/Beholder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Reflection.Metadata; 6 | using Avalonia; 7 | using Avalonia.Controls; 8 | using Xamlade.Extensions; 9 | using Xamlade.FunctionalAreas; 10 | using Xamlade.jClasses; 11 | 12 | namespace Xamlade.LinkWorkers; 13 | 14 | /// 15 | /// Наблюдатель хранит ссылки на служебные объекты, необходимые для управления jObject 16 | /// 17 | public class Beholder 18 | { 19 | public JControl? element { get; set; } 20 | public mTreeViewItem? mTreeItem { get; set; } 21 | public ItemCollection? PropListItems { get; set; } 22 | 23 | public mBorder selectionBorder { get; set; } 24 | 25 | 26 | private ulong UID { get; } 27 | 28 | private bool isEXIST = true; 29 | public Beholder(){} 30 | public Beholder(JControl obj) 31 | { 32 | if(obj.Beholder is not null) return; 33 | element = obj; 34 | obj.Beholder = this; 35 | //Заменить на глобальный генератор 36 | UID = (ulong)Utils.NextgenIterator++; 37 | 38 | //ОТЛАДКА DEXAMLIZE 39 | BeholderTimeAnalisys.Beholders.Add(this); 40 | 41 | element.JControlInit(); 42 | 43 | element.PointerEntered += Workspace.OnjControlPointerEntered; 44 | element.PointerExited += Workspace.OnjControlPointerExited; 45 | element.PointerPressed += Workspace.OnjControlPressed; 46 | element.PointerReleased += Workspace.OnjControlReleased; 47 | element.Name ??= (element.Type + Statistics.GetNewElementIndex(element.Type)); 48 | mTreeItem = new mTreeViewItem(obj); 49 | ElementGenerator.InitSelectionBorder(element); 50 | } 51 | 52 | public static Beholder NewBeholder(JControl obj) => new(obj); 53 | 54 | 55 | //Вызывать после присоединения объекта на контейнер 56 | public void PropListItemsInit() 57 | { 58 | // Использование рефлексии для создания экземпляра ItemCollection 59 | var constructor = typeof(ItemCollection).GetConstructor( 60 | BindingFlags.Instance | BindingFlags.NonPublic, 61 | null, 62 | Type.EmptyTypes, 63 | null); 64 | 65 | PropListItems = (ItemCollection)constructor.Invoke(new object[] { }); 66 | 67 | 68 | //Добавляем все свойства со словаря свойств 69 | foreach (var KVP in element.xPropertiesGroup) 70 | { 71 | var title = PropertiesControl.CreatePropItem(KVP.Key, new Property()); 72 | PropListItems.Add(title); 73 | var enumerator = KVP.Value.GetEnumerator(); 74 | while (enumerator.MoveNext()) 75 | { 76 | var kv = enumerator.Current; 77 | var item = PropertiesControl.CreatePropItem(kv.Key, kv.Value); 78 | PropListItems.Add(item); 79 | } 80 | } 81 | } 82 | 83 | public static void OnPropertyChanged(object? sender, AvaloniaPropertyChangedEventArgs e) 84 | { 85 | if (sender is null || e.Property is null) return; 86 | 87 | if (sender is JControl control) 88 | { 89 | // Проверяем наличие свойства через рефлексию 90 | var propertyExists = sender.GetType() 91 | .GetProperties() 92 | .Any(prop => prop.Name == e.Property.Name); 93 | var specialPropertyExists = control.xPropertiesGroup["container"].ContainsKey(e.Property.Name); 94 | if (propertyExists) 95 | control.Beholder.HandlePropertyChange(e); 96 | else if(specialPropertyExists) 97 | control.Beholder.HandlePropertyChange(e, "container"); 98 | 99 | } 100 | } 101 | 102 | private void HandlePropertyChange(AvaloniaPropertyChangedEventArgs e,string category = "main") 103 | { 104 | element.UpdateProperty(e.Property.Name, e.NewValue, category); 105 | UpdatePropList(e.Property.Name); 106 | } 107 | 108 | //Всё оно чужое - у тебя лишь Имя Твоё! 109 | public static void HandleNameUpdate(JControl element) 110 | { 111 | element.UpdateProperty("Name", element.Name); 112 | element.Beholder.UpdatePropList("Name"); 113 | } 114 | 115 | public void UpdatePropList(string propname) 116 | { 117 | if (PropListItems is null) return; 118 | // Найти индекс элемента с нужным именем. 119 | int index = -1; 120 | for (int i = 0; i < PropListItems.Count; i++) 121 | { 122 | if (PropListItems[i] is ListBoxItem item && item.Name == propname) 123 | { 124 | index = i; 125 | break; 126 | } 127 | } 128 | 129 | // Если элемент найден, заменить его. 130 | if (index != -1) 131 | { 132 | var tmp = PropertiesControl.CreatePropItem(propname, 133 | element.GetProperty(propname)); //element.xPropertiesGroup["main"][propname]); 134 | PropListItems[index] = tmp; 135 | } 136 | } 137 | } -------------------------------------------------------------------------------- /LinkWorkers/BeholderTimeAnalisys.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Xamlade.LinkWorkers; 4 | 5 | 6 | //ТОЛЬКО ДЛЯ ОТЛАДКИ НЕПРЕДСКАЗУЕМОГО ПОВЕДЕНИЯ DEXAMLIZE 7 | public static class BeholderTimeAnalisys 8 | { 9 | public static List Beholders { get; set; } 10 | 11 | static BeholderTimeAnalisys() 12 | { 13 | Beholders = new List(); 14 | } 15 | 16 | public static void DebugBeholder() 17 | { 18 | var beh = Beholders; 19 | } 20 | } -------------------------------------------------------------------------------- /Notes.txt: -------------------------------------------------------------------------------- 1 | #0ab076 зелёный 2 | 3 | -------------------------------------------------------------------------------- /ProgramWindow/MainWindow.axaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Avalonia; 3 | using Avalonia.Controls; 4 | using Avalonia.Input; 5 | using Xamlade.Extensions; 6 | using Xamlade.Extensions.Atributes; 7 | using Xamlade.FunctionalAreas; 8 | using Xamlade.jClasses; 9 | using Xamlade.SettingsWorkers; 10 | using Xamlade.XAMLWorkers; 11 | 12 | namespace Xamlade.ProgramWindow; 13 | 14 | 15 | 16 | public partial class MainWindow : Window 17 | { 18 | public static MainWindow _MainWindow = null!; 19 | 20 | public MainWindow() 21 | { 22 | _MainWindow = this; 23 | DataContext = this; 24 | InitializeComponent(); 25 | WindowInit(); 26 | 27 | 28 | Utils.Init(DebugPanel); 29 | Utils.isDebugPanelActive = true; 30 | Workspace.Init(MainCanvas); 31 | HierarchyControl.Init(MainHierarchyTree); 32 | PropertiesControl.Init(PropListBox); 33 | TestWindow.Init(LoadingGif); 34 | SettingsModule.Init(); 35 | 36 | ButtonEventsInit(); 37 | 38 | var listener = new GlobalKeyListener(this); 39 | listener.KeyPressed += GlobalKeyPressed; 40 | listener.KeyReleased += GlobalKeyReleased; 41 | } 42 | 43 | 44 | 45 | 46 | private void WindowInit() 47 | { 48 | this.Icon = new WindowIcon(@"assets/Icon.png"); 49 | var screen = Screens.All[0].WorkingArea; 50 | this.WindowState = WindowState.Maximized; 51 | // Установить размеры окна равными размерам экрана 52 | this.Width = screen.Width; 53 | this.Height = screen.Height; 54 | 55 | // Установить минимальные и максимальные размеры окна 56 | this.MinWidth = screen.Width; 57 | this.MinHeight = screen.Height; 58 | this.MaxWidth = screen.Width; 59 | this.MaxHeight = screen.Height; 60 | 61 | // Запретить изменение размеров окна 62 | this.CanResize = false; 63 | //Привязать окно к начальному положению 64 | this.WindowStartupLocation = WindowStartupLocation.Manual; 65 | var _initialPosition = new PixelPoint(screen.X, screen.Y); 66 | this.Position = _initialPosition; 67 | // Вернуть положение окна 68 | // this.PositionChanged += (_, _) => this.Position = _initialPosition; 69 | } 70 | 71 | 72 | //Инициализация событий кнопок управления 73 | private void ButtonEventsInit() 74 | { 75 | RemoveButton.Click+= Workspace.RemoveSelectedjElementHandler; 76 | XamlizeButton.Click += XAMLGenerator.XAMLIZE; 77 | RedoButton.Click += History.REDO; 78 | UndoButton.Click += History.UNDO; 79 | DeXamLizeButton.Click += ImportXAML.DEXAMLIZE; 80 | RunWindowButton.Click += TestWindow.RUN_WINDOW; 81 | DebugButton.Click += Utils.DEBUG; 82 | MainCanvas.PointerPressed += Workspace.OnjControlPressed; 83 | foreach (var child in GeneratorPanel.Children) 84 | ((mGenButton)child).Click += ElementGenerator.GenerateElementButton; 85 | 86 | } 87 | 88 | 89 | private void GlobalKeyPressed(KeyEventArgs e) 90 | { 91 | if (e.Key == Key.LeftCtrl) 92 | State.LCtrlPressed = true; 93 | else if (e.Key == Key.LeftShift) 94 | State.LShiftPressed = true; 95 | 96 | } 97 | private void GlobalKeyReleased(KeyEventArgs e) 98 | { 99 | if (e.Key == Key.LeftCtrl) 100 | { 101 | State.LCtrlPressed = false; 102 | State.NewResizeFlag = true; 103 | } 104 | else if(e.Key == Key.Delete) 105 | Workspace.RemoveSelectedjElement(); 106 | else if (e.Key == Key.LeftShift) 107 | { 108 | State.LShiftPressed = false; 109 | State.RectangleFlag = true; 110 | } 111 | } 112 | 113 | 114 | 115 | } -------------------------------------------------------------------------------- /ProgramWindow/Names.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace Xamlade.ProgramWindow 6 | { 7 | partial class MainWindow 8 | { 9 | internal global::Avalonia.Controls.StackPanel Toolbar; 10 | internal global::Avalonia.Controls.Button XamlizeButton; 11 | internal global::Avalonia.Controls.Button RunWindowButton; 12 | internal global::Avalonia.Controls.Button DeXamLizeButton; 13 | internal global::Avalonia.Controls.Button UndoButton; 14 | internal global::Avalonia.Controls.Button RedoButton; 15 | internal global::Avalonia.Controls.Button RemoveButton; 16 | internal global::Avalonia.Controls.Button SettingsButton; 17 | internal global::Avalonia.Controls.Button DebugButton; 18 | internal global::Avalonia.Gif.GifImage LoadingGif; 19 | internal global::Avalonia.Controls.Panel DebugPanel; 20 | internal global::Avalonia.Controls.TextBlock DebugTextBlock; 21 | internal global::Avalonia.Controls.StackPanel HierarchyPanel; 22 | internal global::Avalonia.Controls.TreeView MainHierarchyTree; 23 | internal global::Avalonia.Controls.TabControl MainTabControl; 24 | internal global::Avalonia.Controls.StackPanel GeneratorPanel; 25 | internal global::Avalonia.Controls.TabItem PropertiesPanel; 26 | internal global::Avalonia.Controls.StackPanel PropertyPanel; 27 | internal global::Avalonia.Controls.ListBox PropListBox; 28 | internal global::Xamlade.jClasses.jCanvas MainCanvas; 29 | 30 | public void InitializeComponent(bool loadXaml = true, bool attachDevTools = true) 31 | { 32 | if (loadXaml) 33 | { 34 | AvaloniaXamlLoader.Load(this); 35 | } 36 | #if DEBUG 37 | if (attachDevTools) 38 | { 39 | this.AttachDevTools(); 40 | } 41 | #endif 42 | var __thisNameScope__ = this.FindNameScope(); 43 | Toolbar = __thisNameScope__?.Find("Toolbar"); 44 | XamlizeButton = __thisNameScope__?.Find("XamlizeButton"); 45 | RunWindowButton = __thisNameScope__?.Find("RunWindowButton"); 46 | DeXamLizeButton = __thisNameScope__?.Find("DeXamLizeButton"); 47 | UndoButton = __thisNameScope__?.Find("UndoButton"); 48 | RedoButton = __thisNameScope__?.Find("RedoButton"); 49 | RemoveButton = __thisNameScope__?.Find("RemoveButton"); 50 | SettingsButton = __thisNameScope__?.Find("SettingsButton"); 51 | DebugButton = __thisNameScope__?.Find("DebugButton"); 52 | LoadingGif = __thisNameScope__?.Find("LoadingGif"); 53 | DebugPanel = __thisNameScope__?.Find("DebugPanel"); 54 | DebugTextBlock = __thisNameScope__?.Find("DebugTextBlock"); 55 | HierarchyPanel = __thisNameScope__?.Find("HierarchyPanel"); 56 | MainHierarchyTree = __thisNameScope__?.Find("MainHierarchyTree"); 57 | MainTabControl = __thisNameScope__?.Find("MainTabControl"); 58 | GeneratorPanel = __thisNameScope__?.Find("GeneratorPanel"); 59 | PropertiesPanel = __thisNameScope__?.Find("PropertiesPanel"); 60 | PropertyPanel = __thisNameScope__?.Find("PropertyPanel"); 61 | PropListBox = __thisNameScope__?.Find("PropListBox"); 62 | MainCanvas = __thisNameScope__?.Find("MainCanvas"); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /ProgramWindow/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Avalonia; 3 | 4 | namespace Xamlade.ProgramWindow; 5 | 6 | class Program 7 | { 8 | // Initialization code. Don't use any Avalonia, third-party APIs or any 9 | // SynchronizationContext-reliant code before AppMain is called: things aren't initialized 10 | // yet and stuff might break. 11 | [STAThread] 12 | public static void Main(string[] args) 13 | { 14 | 15 | BuildAvaloniaApp().StartWithClassicDesktopLifetime(args); 16 | } 17 | 18 | // Avalonia configuration, don't remove; also used by visual designer. 19 | public static AppBuilder BuildAvaloniaApp() 20 | => AppBuilder.Configure() 21 | .UsePlatformDetect() 22 | .WithInterFont() 23 | .LogToTrace(); 24 | 25 | 26 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Xamlade 2 | 3 | 4 | ![](Xamlade.png) 5 | #### version 0.1.0 PreRelease 6 | 7 | ### Простота создания собственных программ с удобным и современным интерфейсом 8 | ### Основан на AvaloniaUI 9 | ### Вдохновлён GTK+ Glade 10 | ### Рождён бросить вызов проприетарным генераторам разметки 11 | 12 | --------------------------------- 13 | #### Simplicity in creating your own applications with a user-friendly and modern interface 14 | #### Based on AvaloniaUI 15 | #### Inspired by GTK+ Glade 16 | #### Created to challenge proprietary markup generators 17 | 18 | 19 | # PLEASE CONTRIBUTE TO XAMLADE!!! (W_W)' 20 | ak25800852@gmail.com 21 | #### The project is being developed by a single person who is very eager to help the community in creating a visual XAML editor. 22 | 23 | ### You can support the project by donating to the following wallets: 24 | ### BTC: 1LN9Cyk5BGZqvCnJ1sjQrZUsQYgZwfmEFH 25 | ### TON: UQAT4y-Y7cQutoMDsBcBvcS3H9S5vytslIdGLMZPhuS72y8R 26 | 27 | ## Визуальный редактор для XAML Avalonia UI 28 | ### В разработке. Ориентировочный релиз зимой 2025. 29 | 30 | ## RELEASE XX.XX.2025 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | ## Амбиции стать свободным конкурентом Microsoft Blend 39 | ![](https://i.imgur.com/89dWn6S.png) 40 | ## Вдохновлённый GTK+ Glade 41 | ![](https://imgur.com/0WziXCD.png) 42 | ## Демонтрация выделения (selection) 43 | ![](https://imgur.com/yd472hJ.png) 44 | ## Поддержка изображений 45 | ![](https://imgur.com/xLveMN0.png) 46 | 28.11.2024 проект не брошен. 47 | Разработка идёт с затруднениями. 48 | Неравнодушным предлагаю присоединиться или помочь материально. 49 | 50 | #### На данный момент работает генерация XAML для некоторых базовых элементов, таких как кнопки, канвасы и прочее... 51 | ### XAML генерируется кнопкой XAMLize, выходной XAML лежит в XamladeDemo/MainWindow.axaml 52 | Кнопкой Run Window можно скомпилировать выходной AXAML и проверить точность генерации 53 | 54 | #### Частично работает deXAMLize (точно работает для XAML, сгенерированных этой программой) 55 | 56 | Выделение многих объектов с зажатым Shift 57 | Изменение масштаба элемента с зажатым Ctrl 58 | 59 | # Старые скриншоты 60 | ![](https://i.postimg.cc/sftL05Fn/photo-2023-11-07-03-11-56.jpg) 61 | ![](https://i.postimg.cc/sfB8cwLQ/photo-2023-11-07-03-11-58.jpg) 62 | ![](https://i.postimg.cc/yYcGqWs7/2023-11-07-03-11-38.png) 63 | ![](https://i.postimg.cc/Tw35LQFh/2023-11-13-14-18-12.png) 64 | -------------------------------------------------------------------------------- /RES/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/RES/loading.gif -------------------------------------------------------------------------------- /Reflection/JTypeInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace Xamlade.Extensions; 6 | 7 | public static class JTypeInfo 8 | { 9 | public static IEnumerable GetImplementingClasses(Type interfaceType) 10 | { 11 | if (!interfaceType.IsInterface) 12 | throw new ArgumentException($"{interfaceType.FullName} is not an interface."); 13 | 14 | // Получаем все типы из загруженных сборок 15 | var allTypes = AppDomain.CurrentDomain.GetAssemblies() 16 | .SelectMany(assembly => assembly.GetTypes()); 17 | 18 | // Фильтруем только классы, которые реализуют заданный интерфейс 19 | var implementingTypes = allTypes 20 | .Where(type => type.IsClass && !type.IsAbstract && interfaceType.IsAssignableFrom(type)) 21 | .Select(type => type.FullName); 22 | 23 | return implementingTypes; 24 | } 25 | } -------------------------------------------------------------------------------- /Reflection/TypeCast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Runtime.CompilerServices; 4 | using Avalonia.Media; 5 | 6 | namespace Xamlade.Extensions; 7 | 8 | public static class TypeCast 9 | { 10 | 11 | public static IBrush ConvertToBrush(string colorName) 12 | { 13 | if (string.IsNullOrWhiteSpace(colorName)) 14 | throw new ArgumentNullException(nameof(colorName)); 15 | if (colorName == "RandomColor") 16 | colorName = $"#{Utils.random.Next(0x1000000):X6}"; 17 | // Попробуем получить цвет из Brushes (предопределенные цвета) 18 | var property = typeof(Brushes).GetProperty(colorName); 19 | if (property != null && property.GetValue(null) is IBrush brush) 20 | return brush; 21 | 22 | // Пробуем распарсить строку в Color 23 | if (Color.TryParse(colorName, out var color)) 24 | return new SolidColorBrush(color); 25 | 26 | throw new ArgumentException($"Не удалось преобразовать '{colorName}' в IBrush."); 27 | } 28 | 29 | public static T CastValue(string value) 30 | { 31 | if (value == null) 32 | throw new ArgumentNullException(nameof(value)); 33 | 34 | var targetType = typeof(T); 35 | 36 | if (targetType == typeof(int)) 37 | return (T)(object)int.Parse(value); 38 | if (targetType == typeof(double)) 39 | return (T)(object)double.Parse(value, CultureInfo.InvariantCulture); 40 | if (targetType == typeof(float)) 41 | return (T)(object)float.Parse(value, CultureInfo.InvariantCulture); 42 | if (targetType == typeof(bool)) 43 | return (T)(object)bool.Parse(value); 44 | if (targetType == typeof(byte)) 45 | return (T)(object)byte.Parse(value); 46 | if (targetType == typeof(short)) 47 | return (T)(object)short.Parse(value); 48 | if (targetType == typeof(long)) 49 | return (T)(object)long.Parse(value); 50 | if (targetType == typeof(decimal)) 51 | return (T)(object)decimal.Parse(value, CultureInfo.InvariantCulture); 52 | if (targetType == typeof(Guid)) 53 | return (T)(object)Guid.Parse(value); 54 | if (targetType == typeof(DateTime)) 55 | return (T)(object)DateTime.Parse(value, CultureInfo.InvariantCulture); 56 | if (targetType == typeof(TimeSpan)) 57 | return (T)(object)TimeSpan.Parse(value, CultureInfo.InvariantCulture); 58 | if (targetType == typeof(char) && value.Length == 1) 59 | return (T)(object)value[0]; 60 | if (targetType == typeof(string)) 61 | return (T)(object)value; 62 | if (targetType == typeof(IBrush)) 63 | return (T)(object)ConvertToBrush(value); 64 | if(targetType == typeof(Color)) 65 | return (T)(object)Color.Parse(value); 66 | if (targetType == typeof(object)) 67 | return (T)(object)value; 68 | if (targetType.IsEnum) 69 | if (Enum.TryParse(targetType, value, ignoreCase: true, out object result)) 70 | return (T)result; 71 | throw new NotSupportedException($"Приведение к типу {targetType} не поддерживается"); 72 | } 73 | } -------------------------------------------------------------------------------- /SettingsWorkers/FilesystemService/JSONBus.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using Newtonsoft.Json; 5 | using Xamlade.SettingsWorkers.SettingsTypes; 6 | 7 | namespace Xamlade.SettingsWorkers.FilesystemService; 8 | 9 | public class JSONBus 10 | { 11 | static string JSON_PATH = "./Settings"; 12 | public static Settings SettingsFromFile(string fileName) 13 | { 14 | var settings = new Settings(); 15 | try 16 | { 17 | // Формируем полный путь к JSON-файлу 18 | var filePath = Path.Combine(JSON_PATH, $"{fileName}.json"); 19 | 20 | // Проверяем, существует ли файл 21 | if (!File.Exists(filePath)) 22 | { 23 | Console.WriteLine($"Файл {filePath} не найден."); 24 | return settings; 25 | } 26 | 27 | // Считываем содержимое файла 28 | var jsonContent = File.ReadAllText(filePath); 29 | 30 | // Десериализуем JSON в словарь и заполняем SettingsDictionary 31 | var jsonDictionary = JsonConvert.DeserializeObject>(jsonContent); 32 | 33 | if (jsonDictionary != null) 34 | { 35 | settings.SetDictionary(jsonDictionary); 36 | } 37 | } 38 | catch (Exception ex) 39 | { 40 | Console.WriteLine($"Ошибка при чтении JSON файла: {ex.Message}"); 41 | } 42 | 43 | return settings; 44 | } 45 | } -------------------------------------------------------------------------------- /SettingsWorkers/SettingsModule.cs: -------------------------------------------------------------------------------- 1 | using Xamlade.SettingsWorkers.SettingsTypes; 2 | 3 | namespace Xamlade.SettingsWorkers; 4 | 5 | public static class SettingsModule 6 | { 7 | public static void Init() 8 | { 9 | _ = JControlDefaults.JDefaultSettings; 10 | } 11 | } -------------------------------------------------------------------------------- /SettingsWorkers/SettingsTypes/JControlDefaults.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Avalonia.Controls; 5 | using Xamlade.Extensions; 6 | using Xamlade.Extensions.Atributes; 7 | using Xamlade.jClasses; 8 | using Xamlade.SettingsWorkers.FilesystemService; 9 | 10 | namespace Xamlade.SettingsWorkers.SettingsTypes; 11 | 12 | public class JControlDefaults 13 | { 14 | public static Dictionary JDefaultSettings { get; set; } = new Dictionary(); 15 | private static IEnumerable CurrentTypes; 16 | 17 | 18 | //Получаем имена классов, для которых нужно задать начальные параметры генерации 19 | private static IEnumerable Type2Classname(IEnumerable types) 20 | { 21 | return types.Select(type => 22 | { 23 | var className = type[(type.LastIndexOf('.') + 1)..]; // Извлекаем имя класса 24 | return className.StartsWith("j") ? className[1..] : className; // Убираем "j", если есть 25 | }); 26 | } 27 | //Готовим словарь для хранения настроек генерации 28 | static JControlDefaults() 29 | { 30 | var knownTypesList = Type2Classname(JTypeInfo.GetImplementingClasses(typeof(jClasses.JControl))); 31 | //Объявление словаря свойств под каждый тип 32 | foreach (var type in knownTypesList) 33 | JDefaultSettings.Add(type, new Settings()); 34 | //Инициализация словарей свойств из JSON 35 | foreach (var classSettings in JDefaultSettings) 36 | JDefaultSettings[classSettings.Key] = JSONBus.SettingsFromFile(classSettings.Key); 37 | } 38 | [ReflectionCall] 39 | public static void InitDefaults(JControl element) 40 | { 41 | //Словарь оставшихся свойств 42 | var unhandledProperties = new Settings(); 43 | //Фаза нативной рефлексии 44 | var typeName = element.Type; 45 | var properties = JDefaultSettings[typeName]; 46 | foreach (var prop in properties) 47 | { 48 | var targetType = Reflector.VerifyExistance(element, prop.Key); 49 | if (targetType != null) 50 | { 51 | var method = typeof(TypeCast).GetMethod(nameof(TypeCast.CastValue)) 52 | ?.MakeGenericMethod(targetType); // Создаём CastValue 53 | var convertedValue = method?.Invoke(null, new object[] { prop.Value }); // Вызываем CastValue() 54 | 55 | Reflector.ForceSet(element, prop.Key, convertedValue); 56 | } 57 | else 58 | { 59 | unhandledProperties.Add(prop.Key, prop.Value); 60 | } 61 | } 62 | Console.WriteLine(); 63 | //Фаза задания особенных свойств десериализации 64 | //Фаза вызова специальных делегатов 65 | } 66 | 67 | 68 | } -------------------------------------------------------------------------------- /SettingsWorkers/SettingsTypes/Settings.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | 4 | namespace Xamlade.SettingsWorkers.SettingsTypes; 5 | 6 | public class Settings : IEnumerable> 7 | { 8 | private Dictionary _settings = new Dictionary(); 9 | 10 | public string this[string key] 11 | { 12 | get => _settings.TryGetValue(key, out var value) ? value : throw new KeyNotFoundException(); 13 | set => _settings[key] = value; 14 | } 15 | 16 | public void SetDictionary(Dictionary dictionary) => _settings = dictionary; 17 | public void Add(string key, string value) => _settings[key] = value; 18 | public bool Remove(string key) => _settings.Remove(key); 19 | public bool TryGetValue(string key, out string value) => _settings.TryGetValue(key, out value); 20 | public void Clear() => _settings.Clear(); 21 | 22 | public IEnumerator> GetEnumerator() => _settings.GetEnumerator(); 23 | IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); 24 | } -------------------------------------------------------------------------------- /TestWindow.axaml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 24 | 25 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /TestWindow.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace Xamlade; 6 | 7 | public partial class TestWindow : Window 8 | { 9 | public TestWindow() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /XAMLWorkers/Broadcast.cs: -------------------------------------------------------------------------------- 1 | using Xamlade.jClasses; 2 | 3 | namespace Xamlade.XAMLWorkers; 4 | 5 | public static class Broadcast 6 | { 7 | public delegate void EventHandler(int mode); 8 | 9 | public static event EventHandler? OnBroadcast; 10 | 11 | public static void InitXAML()=> OnBroadcast?.Invoke(0); 12 | public static void XAMLize()=> OnBroadcast?.Invoke(1); 13 | 14 | //Восстановить поведение jElement после выгрузки из XAML 15 | public static void RestoreBehavior()=> OnBroadcast?.Invoke(2); 16 | //Убить все объекты 17 | public static void KillAll()=> OnBroadcast?.Invoke(3); 18 | //Восстановить дерево объектов 19 | public static void RestoreTree()=> OnBroadcast?.Invoke(4); 20 | //Снять выделение 21 | // public static void RemoveSelection()=> OnBroadcast?.Invoke(5); 22 | 23 | 24 | 25 | public static void DisposeElement(JControl element) => element.Dispose(); 26 | } -------------------------------------------------------------------------------- /XAMLWorkers/TestWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.IO; 4 | using System.Threading.Tasks; 5 | using Avalonia.Gif; 6 | using Avalonia.Interactivity; 7 | 8 | namespace Xamlade.XAMLWorkers; 9 | 10 | public static class TestWindow 11 | { 12 | public static GifImage LoadingGif { get; set; } 13 | 14 | public static void Init(GifImage gifImage) => LoadingGif = gifImage; 15 | public static async void RUN_WINDOW(object? sender, RoutedEventArgs e) 16 | { 17 | CopyAssetsToProject(); 18 | LoadingGif.IsVisible = true; 19 | 20 | await ExecuteLinuxCommandAsync(@"XamladeDemo/BUILD.sh"); 21 | LoadingGif.IsVisible = false; 22 | await ExecuteLinuxCommandAsync(@"XamladeDemo/RUN.sh"); 23 | } 24 | 25 | 26 | public static void CopyAssetsToProject() 27 | { 28 | string[] files = Directory.GetFiles(@"assets"); 29 | string targetDirectory = @"XamladeDemo/assets"; 30 | if (!Directory.Exists(targetDirectory)) 31 | { 32 | Directory.CreateDirectory(targetDirectory); 33 | } 34 | foreach (string file in files) 35 | { 36 | string fileName = Path.GetFileName(file); 37 | string destFile = Path.Combine(targetDirectory, fileName); 38 | File.Copy(file, destFile, true); 39 | } 40 | } 41 | public static async Task ExecuteLinuxCommandAsync(string command) 42 | { 43 | using (Process process = new Process()) 44 | { 45 | process.StartInfo.FileName = "/bin/bash"; 46 | process.StartInfo.Arguments = $"-c \"{command}\""; 47 | process.StartInfo.RedirectStandardOutput = true; 48 | process.StartInfo.RedirectStandardError = true; 49 | process.StartInfo.UseShellExecute = false; 50 | process.StartInfo.CreateNoWindow = true; 51 | 52 | process.Start(); 53 | 54 | string result = await process.StandardOutput.ReadToEndAsync(); 55 | string error = await process.StandardError.ReadToEndAsync(); 56 | 57 | if (!string.IsNullOrEmpty(error)) 58 | { 59 | throw new Exception($"Error: {error}"); 60 | } 61 | 62 | return result; 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /XAMLWorkers/XAMLGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Reflection; 5 | using Avalonia.Controls; 6 | using Avalonia.Interactivity; 7 | using Xamlade.Extensions; 8 | using Xamlade.FunctionalAreas; 9 | using Xamlade.jClasses; 10 | using Xamlade.mClasses; 11 | 12 | namespace Xamlade.XAMLWorkers; 13 | 14 | public static class XAMLGenerator 15 | { 16 | public static string GetProperties(JControl element) 17 | { 18 | if (element.jParent is null && element.Name != "MainCanvas") return ""; 19 | if (element is MControl) return ""; 20 | string getProperties = ""; 21 | var type = element.GetType(); 22 | var props = type.GetProperties(); 23 | var constructor = type.GetConstructor(new Type[] { }); 24 | var DefaultObject = constructor!.Invoke(new object[] { }); 25 | 26 | foreach (var prop in props) 27 | { 28 | if ((element.Name == "MainCanvas") && prop.Name is "Width" or "Height") continue; 29 | if ((element.Type == "ComboBoxItem") && (element as jComboBoxItem).jChildren.Count != 0 && 30 | prop.Name is "Content") continue; 31 | if (element.Type == "Border") continue; 32 | 33 | 34 | if (!Constants.ExcludedWords.Contains(prop.Name)) 35 | { 36 | if (prop.Name == "Source") 37 | getProperties += ($"{prop.Name}=\"{((jImage)element).jImageSource}\" "); 38 | else if (prop.GetValue(element)?.ToString() != prop.GetValue(DefaultObject)?.ToString() 39 | && prop.GetValue(element) != null) 40 | getProperties += ($"{prop.Name}=\"{prop.GetValue(element)}\" "); 41 | } 42 | } 43 | 44 | if (element.Name == "MainCanvas") 45 | { 46 | getProperties += " HorizontalAlignment=\"Stretch\"\n VerticalAlignment=\"Stretch\""; 47 | return getProperties; 48 | } 49 | 50 | if (Equals(element, Workspace.SelectionCanvas)) return ""; 51 | if ((element.jParent as JControl).Type == jElementType.Canvas.ToString()) 52 | { 53 | getProperties += $"Canvas.Left=\"{Convert.ToInt32(jCanvas.GetLeft(element))}\" "; 54 | getProperties += $"Canvas.Top=\"{Convert.ToInt32(jCanvas.GetTop(element))}\" "; 55 | } 56 | else if ((element.jParent as JControl).Type == jElementType.Grid.ToString()) 57 | { 58 | int row = jGrid.GetRow(element); 59 | int column = jGrid.GetColumn(element); 60 | int rowSpan = jGrid.GetRowSpan(element); 61 | int columnSpan = jGrid.GetColumnSpan(element); 62 | 63 | getProperties += $"Grid.Row=\"{row}\" "; 64 | getProperties += $"Grid.Column=\"{column}\" "; 65 | 66 | if (rowSpan > 1) 67 | { 68 | getProperties += $"Grid.RowSpan=\"{rowSpan}\" "; 69 | } 70 | 71 | if (columnSpan > 1) 72 | { 73 | getProperties += $"Grid.ColumnSpan=\"{columnSpan}\" "; 74 | } 75 | } 76 | else if ((element.jParent as JControl).Type == jElementType.DockPanel.ToString()) 77 | { 78 | Dock dock = jDockPanel.GetDock(element); 79 | getProperties += $"DockPanel.Dock=\"{dock}\" "; 80 | } 81 | 82 | return getProperties; 83 | } 84 | 85 | public static void XAMLRatingInit(JControl element) 86 | { 87 | element.XAMLPiece.Clear(); 88 | element.XAMLRating = element is JChildContainer container ? container.jChildren.Count : 0; 89 | if(element.Type == "AvaPlot") 90 | element.XAMLPiece.Add($""); 91 | else element.XAMLPiece.Add($"<{element.Type} {GetProperties(element)}>"); 92 | } 93 | 94 | public static void XAMLizeElement(JControl element) 95 | { 96 | if (element.Name == null) return; 97 | if (element.XAMLRating == 0) 98 | { 99 | if(element.Type == "AvaPlot") 100 | element.XAMLPiece.Add($""); 101 | else 102 | element.XAMLPiece.Add($""); 103 | 104 | element.XAMLRating--; 105 | if (element.jParent is not JControl parent) return; 106 | parent.XAMLPiece.AddRange(element.XAMLPiece); 107 | parent.XAMLRating--; 108 | } 109 | } 110 | 111 | public static void XAMLIZE(object? sender, RoutedEventArgs? e) 112 | { 113 | Workspace.RestoreSelectionCanvas(); 114 | // selectedTreeItem.element.Background = selectedOriginalBackground; 115 | Broadcast.InitXAML(); 116 | while (Workspace.MainCanvas.XAMLRating > -1) 117 | { 118 | Broadcast.XAMLize(); 119 | } 120 | 121 | var wWidth = (int)Workspace.MainCanvas.Bounds.Width; 122 | var wHeight = (int)Workspace.MainCanvas.Bounds.Height; 123 | 124 | string filePath = @"./XamladeDemo/MainWindow.axaml"; 125 | var outputXAML = new List(); 126 | outputXAML.Add(@""); 134 | outputXAML.AddRange(Workspace.MainCanvas.XAMLPiece); 135 | outputXAML.Add(@""); 136 | File.WriteAllLines(filePath, outputXAML); 137 | } 138 | } -------------------------------------------------------------------------------- /Xamlade.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | WinExe 4 | net9.0 5 | enable 6 | true 7 | true 8 | app.manifest 9 | false 10 | false 11 | full 12 | true 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | MainWindow.axaml 69 | Code 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | Avalonia.GIF\Avalonia.Gif.dll 98 | 99 | 100 | 101 | 102 | 103 | 104 | PreserveNewest 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /Xamlade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Xamlade.png -------------------------------------------------------------------------------- /Xamlade.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamlade", "Xamlade.csproj", "{0FD57BAF-5278-4A57-89A4-86EB88DE8FC2}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Any CPU = Debug|Any CPU 8 | Release|Any CPU = Release|Any CPU 9 | EndGlobalSection 10 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 11 | {0FD57BAF-5278-4A57-89A4-86EB88DE8FC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 12 | {0FD57BAF-5278-4A57-89A4-86EB88DE8FC2}.Debug|Any CPU.Build.0 = Debug|Any CPU 13 | {0FD57BAF-5278-4A57-89A4-86EB88DE8FC2}.Release|Any CPU.ActiveCfg = Release|Any CPU 14 | {0FD57BAF-5278-4A57-89A4-86EB88DE8FC2}.Release|Any CPU.Build.0 = Release|Any CPU 15 | EndGlobalSection 16 | EndGlobal 17 | -------------------------------------------------------------------------------- /Xamlade2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Xamlade2.png -------------------------------------------------------------------------------- /Xamlade2.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/Xamlade2.png~ -------------------------------------------------------------------------------- /app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /assets/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Icon.png -------------------------------------------------------------------------------- /assets/Icon.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Icon.png.kra -------------------------------------------------------------------------------- /assets/Icon.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Icon.png1.kra -------------------------------------------------------------------------------- /assets/Icon.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Icon.png~ -------------------------------------------------------------------------------- /assets/Icon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Icon1.png -------------------------------------------------------------------------------- /assets/Icon1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Icon1.png~ -------------------------------------------------------------------------------- /assets/Xamlade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Xamlade.png -------------------------------------------------------------------------------- /assets/Xamlade_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Xamlade_logo.png -------------------------------------------------------------------------------- /assets/Xamlade_logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Xamlade_logo1.png -------------------------------------------------------------------------------- /assets/Xamlade_logo_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Xamlade_logo_2.png -------------------------------------------------------------------------------- /assets/Xamlade_logo_2.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Xamlade_logo_2.png.kra -------------------------------------------------------------------------------- /assets/Xamlade_logo_2.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Xamlade_logo_2.png1.kra -------------------------------------------------------------------------------- /assets/Xamlade_logo_2.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Xamlade_logo_2.png~ -------------------------------------------------------------------------------- /assets/Xamlade_logo_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Xamlade_logo_21.png -------------------------------------------------------------------------------- /assets/Xamlade_logo_21.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/Xamlade_logo_21.png~ -------------------------------------------------------------------------------- /assets/debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/debug.png -------------------------------------------------------------------------------- /assets/debug.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/debug.png.kra -------------------------------------------------------------------------------- /assets/debug.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/debug.png1.kra -------------------------------------------------------------------------------- /assets/debug.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/debug.png~ -------------------------------------------------------------------------------- /assets/debug1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/debug1.png -------------------------------------------------------------------------------- /assets/debug1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/debug1.png~ -------------------------------------------------------------------------------- /assets/dexamlize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/dexamlize.png -------------------------------------------------------------------------------- /assets/dexamlize.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/dexamlize.png.kra -------------------------------------------------------------------------------- /assets/dexamlize.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/dexamlize.png1.kra -------------------------------------------------------------------------------- /assets/dexamlize.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/dexamlize.png~ -------------------------------------------------------------------------------- /assets/dexamlize1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/dexamlize1.png -------------------------------------------------------------------------------- /assets/dexamlize1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/dexamlize1.png~ -------------------------------------------------------------------------------- /assets/import-export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/import-export.png -------------------------------------------------------------------------------- /assets/import-export1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/import-export1.png -------------------------------------------------------------------------------- /assets/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/redo.png -------------------------------------------------------------------------------- /assets/redo.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/redo.png~ -------------------------------------------------------------------------------- /assets/redo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/redo1.png -------------------------------------------------------------------------------- /assets/redo1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/redo1.png~ -------------------------------------------------------------------------------- /assets/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/remove.png -------------------------------------------------------------------------------- /assets/remove.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/remove.png.kra -------------------------------------------------------------------------------- /assets/remove.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/remove.png1.kra -------------------------------------------------------------------------------- /assets/remove.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/remove.png~ -------------------------------------------------------------------------------- /assets/remove1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/remove1.png -------------------------------------------------------------------------------- /assets/remove1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/remove1.png~ -------------------------------------------------------------------------------- /assets/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/run.png -------------------------------------------------------------------------------- /assets/run.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/run.png.kra -------------------------------------------------------------------------------- /assets/run.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/run.png1.kra -------------------------------------------------------------------------------- /assets/run.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/run.png~ -------------------------------------------------------------------------------- /assets/run1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/run1.png -------------------------------------------------------------------------------- /assets/run1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/run1.png~ -------------------------------------------------------------------------------- /assets/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/settings.png -------------------------------------------------------------------------------- /assets/settings.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/settings.png.kra -------------------------------------------------------------------------------- /assets/settings.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/settings.png1.kra -------------------------------------------------------------------------------- /assets/settings.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/settings.png~ -------------------------------------------------------------------------------- /assets/settings1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/settings1.png -------------------------------------------------------------------------------- /assets/settings1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/settings1.png~ -------------------------------------------------------------------------------- /assets/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/undo.png -------------------------------------------------------------------------------- /assets/undo.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/undo.png~ -------------------------------------------------------------------------------- /assets/undo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/undo1.png -------------------------------------------------------------------------------- /assets/undo1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/undo1.png~ -------------------------------------------------------------------------------- /assets/xamlize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/xamlize.png -------------------------------------------------------------------------------- /assets/xamlize.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/xamlize.png.kra -------------------------------------------------------------------------------- /assets/xamlize.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/xamlize.png1.kra -------------------------------------------------------------------------------- /assets/xamlize.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/xamlize.png~ -------------------------------------------------------------------------------- /assets/xamlize1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/xamlize1.png -------------------------------------------------------------------------------- /assets/xamlize1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/assets/xamlize1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/.idea/.idea.XamladeDemo/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Rider ignored files 5 | /contentModel.xml 6 | /modules.xml 7 | /projectSettingsUpdater.xml 8 | /.idea.XamladeDemo.iml 9 | # Editor-based HTTP Client requests 10 | /httpRequests/ 11 | # Datasource local storage ignored files 12 | /dataSources/ 13 | /dataSources.local.xml 14 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/.idea/.idea.XamladeDemo/.idea/avalonia.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/.idea/.idea.XamladeDemo/.idea/indexLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/.idea/.idea.XamladeDemo/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/App.axaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/App.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls.ApplicationLifetimes; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace XamladeDemo; 6 | 7 | public partial class App : Application 8 | { 9 | public override void Initialize() 10 | { 11 | AvaloniaXamlLoader.Load(this); 12 | } 13 | 14 | public override void OnFrameworkInitializationCompleted() 15 | { 16 | if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) 17 | { 18 | desktop.MainWindow = new MainWindow(); 19 | } 20 | 21 | base.OnFrameworkInitializationCompleted(); 22 | } 23 | } -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/App.axaml1: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/Avalonia.AXAML.LanguageServer.Log20240907.txt: -------------------------------------------------------------------------------- 1 | 2024-09-07 00:04:45.198 +03:00 [INF] Starting log... 2 | 2024-09-07 00:04:48.709 +03:00 [DBG] Finding descriptors for initialize 3 | 2024-09-07 00:04:49.539 +03:00 [DBG] Queueing "Serial":initialize:0 request for processing 4 | 2024-09-07 00:04:49.651 +03:00 [DBG] Starting: Processing request initialize 0 5 | 2024-09-07 00:04:49.686 +03:00 [DBG] Starting: Routing Request (0) initialize 6 | 2024-09-07 00:04:49.734 +03:00 [VRB] Converting params for Request (0) initialize to OmniSharp.Extensions.LanguageServer.Protocol.Models.InternalInitializeParams 7 | 2024-09-07 00:04:49.738 +03:00 [VRB] Converting params for Notification initialize to OmniSharp.Extensions.LanguageServer.Protocol.Models.InternalInitializeParams 8 | 2024-09-07 00:04:50.707 +03:00 [INF] GetRegistrationOptions method 9 | 2024-09-07 00:04:50.952 +03:00 [VRB] Response value was OmniSharp.Extensions.LanguageServer.Protocol.Models.InitializeResult 10 | 2024-09-07 00:04:50.961 +03:00 [DBG] Finished: Routing Request (0) initialize in 1274ms 11 | 2024-09-07 00:04:50.962 +03:00 [DBG] Finished: Processing request initialize 0 in 1299ms 12 | 2024-09-07 00:04:51.148 +03:00 [DBG] Finding descriptors for initialized 13 | 2024-09-07 00:04:51.150 +03:00 [DBG] Queueing "Serial":initialized request for processing 14 | 2024-09-07 00:04:51.176 +03:00 [DBG] Starting: Processing notification initialized 15 | 2024-09-07 00:04:51.183 +03:00 [DBG] Starting: Routing Notification initialized 16 | 2024-09-07 00:04:51.183 +03:00 [VRB] Converting params for Notification initialized to OmniSharp.Extensions.LanguageServer.Protocol.Models.InitializedParams 17 | 2024-09-07 00:04:51.347 +03:00 [WRN] No ConfigurationItems have been defined, configuration won't surface any configuration from the client! 18 | 2024-09-07 00:04:51.447 +03:00 [DBG] Finding descriptors for textDocument/didOpen 19 | 2024-09-07 00:04:51.449 +03:00 [DBG] Finished: Routing Notification initialized in 265ms 20 | 2024-09-07 00:04:51.449 +03:00 [DBG] Finished: Processing notification initialized in 272ms 21 | 2024-09-07 00:04:51.471 +03:00 [VRB] Created attribute xml::file:///home/akei/Projects/Xamlade/Xamlade/bin/Debug/net9.0/XamladeDemo/MainWindow.axaml 22 | 2024-09-07 00:04:51.474 +03:00 [VRB] Looking for handler for descriptors textDocument/didOpen 23 | 2024-09-07 00:04:51.474 +03:00 [VRB] Checking handler textDocument/didOpen:Avalonia.AXAML.LanguageServer.Handlers.TextDocumentHandler 24 | 2024-09-07 00:04:51.475 +03:00 [VRB] Registration options OmniSharp.Extensions.LanguageServer.Protocol.Models.TextDocumentOpenRegistrationOptions 25 | 2024-09-07 00:04:51.475 +03:00 [VRB] Document Selector [**/*.xaml], [**/*.axaml] 26 | 2024-09-07 00:04:51.484 +03:00 [VRB] Handler Selected: Avalonia.AXAML.LanguageServer.Handlers.TextDocumentHandler via [**/*.xaml], [**/*.axaml] (targeting OmniSharp.Extensions.JsonRpc.IJsonRpcNotificationHandler`1[[OmniSharp.Extensions.LanguageServer.Protocol.Models.DidOpenTextDocumentParams, OmniSharp.Extensions.LanguageProtocol, Version=0.19.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022]]) 27 | 2024-09-07 00:04:51.484 +03:00 [DBG] Queueing "Serial":textDocument/didOpen request for processing 28 | 2024-09-07 00:04:51.484 +03:00 [DBG] Starting: Processing notification textDocument/didOpen 29 | 2024-09-07 00:04:51.485 +03:00 [DBG] Starting: Routing Notification textDocument/didOpen 30 | 2024-09-07 00:04:51.485 +03:00 [VRB] Converting params for Notification textDocument/didOpen to OmniSharp.Extensions.LanguageServer.Protocol.Models.DidOpenTextDocumentParams 31 | 2024-09-07 00:04:51.488 +03:00 [DBG] Finished: Routing Notification textDocument/didOpen in 3ms 32 | 2024-09-07 00:04:51.488 +03:00 [DBG] Finished: Processing notification textDocument/didOpen in 3ms 33 | 2024-09-07 00:05:20.166 +03:00 [DBG] Finding descriptors for shutdown 34 | 2024-09-07 00:05:20.167 +03:00 [DBG] Queueing "Serial":shutdown:1 request for processing 35 | 2024-09-07 00:05:20.167 +03:00 [DBG] Starting: Processing request shutdown 1 36 | 2024-09-07 00:05:20.167 +03:00 [DBG] Starting: Routing Request (1) shutdown 37 | 2024-09-07 00:05:20.167 +03:00 [VRB] Converting params for Request (1) shutdown to OmniSharp.Extensions.LanguageServer.Protocol.Models.ShutdownParams 38 | 2024-09-07 00:05:20.168 +03:00 [VRB] Converting params for Notification shutdown to OmniSharp.Extensions.LanguageServer.Protocol.Models.ShutdownParams 39 | 2024-09-07 00:05:20.190 +03:00 [VRB] Response value was null 40 | 2024-09-07 00:05:20.193 +03:00 [DBG] Finished: Routing Request (1) shutdown in 25ms 41 | 2024-09-07 00:05:20.193 +03:00 [DBG] Finished: Processing request shutdown 1 in 25ms 42 | 2024-09-07 00:05:20.212 +03:00 [VRB] Could not write to output handler, perhaps serialization failed? 43 | System.Threading.Channels.ChannelClosedException: The channel has been closed. 44 | at System.Threading.Channels.AsyncOperation`1.GetResult(Int16 token) 45 | at OmniSharp.Extensions.JsonRpc.OutputHandler.ProcessOutputStream(CancellationToken cancellationToken) 46 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/BUILD.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd $(dirname $0) 3 | dotnet build 4 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/MainWindow.axaml: -------------------------------------------------------------------------------- 1 | 9 | 11 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/MainWindow.axaml.cs: -------------------------------------------------------------------------------- 1 | 2 | using Avalonia.Controls; 3 | 4 | namespace XamladeDemo; 5 | 6 | public partial class MainWindow : Window 7 | { 8 | public MainWindow() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/MainWindow.axaml1: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/Program.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using System; 3 | 4 | namespace XamladeDemo; 5 | 6 | class Program 7 | { 8 | // Initialization code. Don't use any Avalonia, third-party APIs or any 9 | // SynchronizationContext-reliant code before AppMain is called: things aren't initialized 10 | // yet and stuff might break. 11 | [STAThread] 12 | public static void Main(string[] args) 13 | { 14 | BuildAvaloniaApp().StartWithClassicDesktopLifetime(args); 15 | 16 | // Глобальный обработчик необработанных исключений 17 | AppDomain.CurrentDomain.UnhandledException += (sender, e) => 18 | { 19 | var ex = e.ExceptionObject as Exception; 20 | if (ex != null) 21 | { 22 | LogError(ex); 23 | } 24 | }; 25 | 26 | // Обработчик ошибок в асинхронных задачах 27 | TaskScheduler.UnobservedTaskException += (sender, e) => 28 | { 29 | LogError(e.Exception); 30 | e.SetObserved(); // Предотвращает завершение приложения 31 | }; 32 | 33 | BuildAvaloniaApp().StartWithClassicDesktopLifetime(args); 34 | } 35 | 36 | // Метод конфигурации Avalonia 37 | public static AppBuilder BuildAvaloniaApp() 38 | => AppBuilder.Configure() 39 | .UsePlatformDetect() 40 | .LogToTrace(); 41 | 42 | // Метод для записи ошибок в лог 43 | private static void LogError(Exception ex) 44 | { 45 | string logPath = "errors.log"; 46 | string message = $"{DateTime.Now}: {ex.Message}\n{ex.StackTrace}\n"; 47 | 48 | // Запись в файл 49 | File.AppendAllText(logPath, message); 50 | 51 | // Опционально: показать сообщение в консоли 52 | Console.WriteLine($"Ошибка: {ex.Message}\nЛог сохранён в {logPath}"); 53 | } 54 | 55 | 56 | // Avalonia configuration, don't remove; also used by visual designer. 57 | public static AppBuilder BuildAvaloniaApp() 58 | => AppBuilder.Configure() 59 | .UsePlatformDetect() 60 | .WithInterFont() 61 | .LogToTrace(); 62 | } -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/README.md: -------------------------------------------------------------------------------- 1 | # Xamlade 2 | 3 | ![](https://i.postimg.cc/CxntPGB6/Xamlade2.png) 4 | 5 | ## Визуальный редактор для XAML Avalonia UI 6 | ### В разработке 7 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/RUN.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd $(dirname $0) 3 | exec ./bin/Debug/net9.0/XamladeDemo 4 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/XamladeDemo.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | WinExe 4 | net9.0 5 | enable 6 | true 7 | app.manifest 8 | true 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | PreserveNewest 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/XamladeDemo.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamladeDemo", "XamladeDemo.csproj", "{AA33726A-A174-4A8A-BF5A-A10B63448EF8}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Any CPU = Debug|Any CPU 8 | Release|Any CPU = Release|Any CPU 9 | EndGlobalSection 10 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 11 | {AA33726A-A174-4A8A-BF5A-A10B63448EF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 12 | {AA33726A-A174-4A8A-BF5A-A10B63448EF8}.Debug|Any CPU.Build.0 = Debug|Any CPU 13 | {AA33726A-A174-4A8A-BF5A-A10B63448EF8}.Release|Any CPU.ActiveCfg = Release|Any CPU 14 | {AA33726A-A174-4A8A-BF5A-A10B63448EF8}.Release|Any CPU.Build.0 = Release|Any CPU 15 | EndGlobalSection 16 | EndGlobal 17 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/-4sG5ytVcL4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/-4sG5ytVcL4.jpg -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Icon.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Icon.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Icon.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Icon.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Icon.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Icon.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Icon.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Icon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Icon1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Icon1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Icon1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Xamlade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Xamlade.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo_2.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo_2.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo_2.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo_2.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo_2.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo_2.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo_2.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo_21.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo_21.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Xamlade_logo_21.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/debug.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/debug.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/debug.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/debug.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/debug.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/debug.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/debug.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/debug1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/debug1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/debug1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/debug1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/dexamlize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/dexamlize.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/dexamlize.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/dexamlize.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/dexamlize.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/dexamlize.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/dexamlize.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/dexamlize.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/dexamlize1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/dexamlize1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/dexamlize1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/dexamlize1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/fuck.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/fuck.jpg -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/import-export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/import-export.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/import-export1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/import-export1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/photo_2021-12-13_00-44-53.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/photo_2021-12-13_00-44-53.jpg -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/redo.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/redo.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/redo.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/redo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/redo1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/redo1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/redo1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/remove.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/remove.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/remove.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/remove.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/remove.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/remove.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/remove.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/remove1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/remove1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/remove1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/remove1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/run.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/run.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/run.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/run.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/run.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/run.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/run.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/run1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/run1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/run1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/run1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/settings.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/settings.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/settings.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/settings.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/settings.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/settings.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/settings.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/settings1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/settings1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/settings1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/settings1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/undo.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/undo.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/undo.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/undo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/undo1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/undo1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/undo1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/xamlize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/xamlize.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/xamlize.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/xamlize.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/xamlize.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/xamlize.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/xamlize.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/xamlize.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/xamlize1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/xamlize1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/xamlize1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/xamlize1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Снимок экрана_2023-11-11_04-09-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Снимок экрана_2023-11-11_04-09-11.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/assets/Снимок экрана_2024-04-17_00-51-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/XamladeDemo/assets/Снимок экрана_2024-04-17_00-51-19.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/XamladeDemo/global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "8.0.0", 4 | "rollForward": "latestMajor", 5 | "allowPrerelease": true 6 | } 7 | } -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/-4sG5ytVcL4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/-4sG5ytVcL4.jpg -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Icon.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Icon.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Icon.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Icon.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Icon.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Icon.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Icon.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Icon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Icon1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Icon1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Icon1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Xamlade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Xamlade.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Xamlade_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Xamlade_logo.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Xamlade_logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Xamlade_logo1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Xamlade_logo_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Xamlade_logo_2.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Xamlade_logo_2.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Xamlade_logo_2.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Xamlade_logo_2.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Xamlade_logo_2.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Xamlade_logo_2.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Xamlade_logo_2.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Xamlade_logo_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Xamlade_logo_21.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Xamlade_logo_21.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Xamlade_logo_21.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/debug.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/debug.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/debug.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/debug.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/debug.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/debug.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/debug.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/debug1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/debug1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/debug1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/debug1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/dexamlize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/dexamlize.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/dexamlize.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/dexamlize.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/dexamlize.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/dexamlize.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/dexamlize.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/dexamlize.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/dexamlize1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/dexamlize1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/dexamlize1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/dexamlize1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/import-export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/import-export.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/import-export1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/import-export1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/redo.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/redo.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/redo.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/redo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/redo1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/redo1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/redo1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/remove.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/remove.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/remove.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/remove.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/remove.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/remove.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/remove.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/remove1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/remove1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/remove1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/remove1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/run.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/run.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/run.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/run.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/run.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/run.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/run.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/run1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/run1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/run1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/run1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/settings.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/settings.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/settings.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/settings.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/settings.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/settings.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/settings.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/settings1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/settings1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/settings1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/settings1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/undo.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/undo.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/undo.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/undo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/undo1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/undo1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/undo1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/xamlize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/xamlize.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/xamlize.png.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/xamlize.png.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/xamlize.png1.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/xamlize.png1.kra -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/xamlize.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/xamlize.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/xamlize1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/xamlize1.png -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/xamlize1.png~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/xamlize1.png~ -------------------------------------------------------------------------------- /bin/Debug/net9.0/assets/Снимок экрана_2024-04-17_00-51-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComradeAkei/Xamlade/72c7efa87116e0d57245a2616b7b0fcff7f5672e/bin/Debug/net9.0/assets/Снимок экрана_2024-04-17_00-51-19.png -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "9.0.0", 4 | "rollForward": "latestMajor", 5 | "allowPrerelease": true 6 | } 7 | } -------------------------------------------------------------------------------- /googleca45d2d676594602.html: -------------------------------------------------------------------------------- 1 | google-site-verification: googleca45d2d676594602.html -------------------------------------------------------------------------------- /jClasses/Containers/jBorder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Avalonia.Controls; 5 | using Avalonia.Interactivity; 6 | using Xamlade.LinkWorkers; 7 | using Xamlade.XAMLWorkers; 8 | 9 | namespace Xamlade.jClasses; 10 | 11 | public class jBorder : Border, JChildContainer, JControl, JBroadcastHandler, JSelectable 12 | { 13 | 14 | protected override Type StyleKeyOverride => typeof(Border); 15 | 16 | public Beholder Beholder { get; set; } 17 | public Dictionary SpecialSetDelegates { get; set; } 18 | 19 | 20 | private string controlType => jElementType.Border.ToString(); 21 | 22 | 23 | 24 | public JChildContainer? _jParent { get; set; } 25 | public string Type => controlType; 26 | public int XAMLRating { get; set; } 27 | public List XAMLPiece { get; set; } 28 | public bool IsPressed { get; set; } 29 | public event EventHandler? Click; 30 | 31 | public List<(string, JChildContainer.ContainerPropertyDelegate)> ContainerProperties { get; set; } 32 | public static Dictionary ContainerSetProperties { get; set; } 33 | public List jChildren { get; set; } 34 | 35 | 36 | 37 | public void AddChild(JControl child) 38 | { 39 | 40 | 41 | 42 | var jParent = child.jParent; 43 | var mTreeItem1 = child.Beholder.mTreeItem; 44 | if (jChildren.Any()) 45 | return; 46 | jParent.AddChild(this); 47 | if (child.jParent is jCanvas) 48 | { 49 | Canvas.SetTop(this,Canvas.GetTop(child as Control)); 50 | Canvas.SetLeft(this,Canvas.GetLeft(child as Control)); 51 | } 52 | jParent.RemoveChild(child); 53 | jChildren.Add(child); 54 | child.jParent = this; 55 | Child = (Control)child; 56 | 57 | (jParent as JControl).Beholder.mTreeItem.Items.Remove(mTreeItem1); 58 | this.Beholder.mTreeItem = new mTreeViewItem(this); 59 | this.Beholder.mTreeItem.IsExpanded = true; 60 | this.Beholder.mTreeItem.Header = $"{child.Name} border"; 61 | (jParent as JControl).Beholder.mTreeItem.Items.Add(this.Beholder.mTreeItem); 62 | this.Beholder.mTreeItem.Items.Add(mTreeItem1); 63 | Child.IsHitTestVisible = false; 64 | 65 | 66 | 67 | 68 | } 69 | 70 | public void Remove() 71 | { 72 | double top = 0, left = 0; 73 | var jParent = (this as JControl).jParent; 74 | var child = this.jChildren[0]; 75 | var mTreeItem1 = child.Beholder.mTreeItem; 76 | (child as Control).IsHitTestVisible = true; 77 | if (jParent is jCanvas) 78 | { 79 | top = Canvas.GetTop(this as Control); 80 | left = Canvas.GetLeft(this as Control); 81 | } 82 | 83 | jParent.RemoveChild(this); 84 | RemoveChild(child); 85 | 86 | jParent.AddChild(child); 87 | if (jParent is jCanvas) 88 | { 89 | Canvas.SetTop(child as Control, top); 90 | Canvas.SetLeft(child as Control, left); 91 | } 92 | this.Beholder.mTreeItem.Items.Remove(mTreeItem1); 93 | (jParent as JControl).Beholder.mTreeItem.Items.Add(mTreeItem1); 94 | (jParent as JControl).Beholder.mTreeItem.Items.Remove(Beholder.mTreeItem); 95 | 96 | } 97 | public void RemoveChild(JControl? child = null) 98 | { 99 | jChildren.Clear(); 100 | 101 | (this as JControl).jParent.RemoveChild(this); 102 | Child = null; 103 | } 104 | 105 | public void InitContainerProperties() 106 | { 107 | 108 | } 109 | 110 | 111 | public Dictionary> xPropertiesGroup { get; set; } 112 | 113 | public void AddSpecialProperties() 114 | { 115 | return; 116 | } 117 | } -------------------------------------------------------------------------------- /jClasses/Containers/jCanvas.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Avalonia.Controls; 4 | using Avalonia.Interactivity; 5 | using Xamlade.Extensions; 6 | using Xamlade.LinkWorkers; 7 | using Xamlade.XAMLWorkers; 8 | 9 | namespace Xamlade.jClasses; 10 | 11 | public class jCanvas : Canvas, JChildContainer, JControl, JBroadcastHandler, JSelectable 12 | { 13 | protected override Type StyleKeyOverride => typeof(Canvas); 14 | 15 | 16 | 17 | public bool IsPressed { get; set; } 18 | public event EventHandler? Click; 19 | private string controlType => jElementType.Canvas.ToString(); 20 | public string Type => controlType; 21 | 22 | 23 | public List XAMLPiece { get; set; } 24 | 25 | public Beholder Beholder { get; set; } 26 | public Dictionary SpecialSetDelegates { get; set; } 27 | public JChildContainer? _jParent { get; set; } 28 | // public JChildContainer? jParent { get; set; } 29 | public List<(string, JChildContainer.ContainerPropertyDelegate)> ContainerProperties { get; set; } 30 | public static Dictionary ContainerSetProperties { get; set; } 31 | public List jChildren { get; set; } 32 | 33 | static jCanvas() 34 | { 35 | ContainerSetProperties = new Dictionary 36 | { 37 | { "Top", Utils.ConvertSetter(SetTop) }, 38 | { "Left", Utils.ConvertSetter(SetLeft) }, 39 | }; 40 | } 41 | public void InitContainerProperties() 42 | { 43 | ContainerProperties = new List<(string, JChildContainer.ContainerPropertyDelegate)> 44 | { 45 | ("Top", Utils.ConvertGetter(GetTop)), 46 | ("Left", Utils.ConvertGetter(GetLeft)), 47 | }; 48 | } 49 | 50 | public static void SetTop(JControl element, int value) 51 | { 52 | if (element == null) throw new ArgumentNullException(nameof(element)); 53 | Canvas.SetTop(element as Control, value); 54 | } 55 | 56 | public static void SetLeft(JControl element, int value) 57 | { 58 | if (element == null) throw new ArgumentNullException(nameof(element)); 59 | Canvas.SetLeft(element as Control, value); 60 | } 61 | 62 | public static void SetRight(JControl element, double value) 63 | { 64 | if (element == null) throw new ArgumentNullException(nameof(element)); 65 | Canvas.SetRight(element as Control, value); 66 | } 67 | 68 | public static void SetBottom(JControl element, double value) 69 | { 70 | if (element == null) throw new ArgumentNullException(nameof(element)); 71 | Canvas.SetBottom(element as Control, value); 72 | } 73 | 74 | 75 | public static int GetLeft(JControl element) => 76 | double.IsNaN((int)Canvas.GetLeft(element as Control)) ? 0 : (int)Canvas.GetLeft(element as Control); 77 | 78 | public static double GetRight(JControl element) 79 | { 80 | if (element == null) throw new ArgumentNullException(nameof(element)); 81 | return Canvas.GetRight(element as Control); 82 | } 83 | 84 | public static int GetTop(JControl element) 85 | { 86 | if (element == null) throw new ArgumentNullException(nameof(element)); 87 | return double.IsNaN((int)Canvas.GetTop(element as Control)) ? 0 : (int)Canvas.GetTop(element as Control);; 88 | } 89 | 90 | public static double GetBottom(JControl element) 91 | { 92 | if (element == null) throw new ArgumentNullException(nameof(element)); 93 | return Canvas.GetBottom(element as Control); 94 | } 95 | 96 | public void AddChild(JControl child) 97 | { 98 | jChildren.Add(child); 99 | child.jParent = this; 100 | // child.AddContainerProperties(); 101 | 102 | //Навесить делегаты свойств контейнера в словарь специальных свойств объекта 103 | // foreach (var kvp in ContainerSetProperties) 104 | // child.SpecialSetDelegates.TryAdd(kvp.Key, kvp.Value); 105 | 106 | // Console.WriteLine(child.GetType().ToString()); 107 | Children.Add((Control)child); 108 | } 109 | 110 | public void AddChild(JControl child, int top = 0, int left = 0) 111 | { 112 | jChildren.Add(child); 113 | child.jParent = this; 114 | SetTop(child, top); 115 | SetLeft(child, left); 116 | // Console.WriteLine(child.GetType().ToString()); 117 | Children.Add((Control)child); 118 | } 119 | 120 | public void RemoveChild(JControl child) 121 | { 122 | jChildren.Remove(child); 123 | Children.Remove((Control)child); 124 | child.jParent = null; 125 | } 126 | 127 | public int XAMLRating { get; set; } 128 | 129 | public Dictionary> xPropertiesGroup { get; set; } 130 | 131 | public void AddSpecialProperties() 132 | { 133 | return; 134 | } 135 | } -------------------------------------------------------------------------------- /jClasses/Containers/jComboBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.Json.Serialization; 4 | using Avalonia.Controls; 5 | using Avalonia.Input; 6 | using Avalonia.Interactivity; 7 | using Xamlade.LinkWorkers; 8 | using Xamlade.XAMLWorkers; 9 | 10 | namespace Xamlade.jClasses; 11 | 12 | public class jComboBox : ComboBox, JControl, JBroadcastHandler, JSelectable, JChildContainer 13 | { 14 | public int ID = 0; 15 | protected override Type StyleKeyOverride => typeof(ComboBox); 16 | 17 | 18 | 19 | 20 | 21 | public Beholder Beholder { get; set; } 22 | public Dictionary SpecialSetDelegates { get; set; } 23 | public JChildContainer? _jParent { get; set; } 24 | private string controlType => jElementType.ComboBox.ToString(); 25 | public string Type => controlType; 26 | public int XAMLRating { get; set; } 27 | [field: NonSerialized] public List XAMLPiece { get; set; } 28 | 29 | public new bool IsDropDownOpen 30 | { 31 | get => base.IsDropDownOpen; 32 | set => SetValue(IsDropDownOpenProperty, value); 33 | } 34 | 35 | public new string? Name 36 | { 37 | get => base.Name; 38 | set => SetValue(NameProperty, value); 39 | } 40 | 41 | public bool IsPressed { get; set; } 42 | public event EventHandler? Click; 43 | 44 | 45 | 46 | 47 | public List<(string, JChildContainer.ContainerPropertyDelegate)> ContainerProperties { get; set; } 48 | public static Dictionary ContainerSetProperties { get; set; } 49 | 50 | public List jChildren { get; set; } 51 | public void AddChild(JControl child) 52 | { 53 | jChildren.Add(child); 54 | child.jParent = this; 55 | Items.Add(child); 56 | } 57 | 58 | public void RemoveChild(JControl child) 59 | { 60 | Broadcast.OnBroadcast -= (child as JBroadcastHandler).HandleBroadcast; 61 | jChildren.Remove(child); 62 | Items.Remove(child); 63 | 64 | } 65 | 66 | static jComboBox() 67 | { 68 | ContainerSetProperties = new(); 69 | } 70 | public void InitContainerProperties() 71 | { 72 | ContainerProperties = new(); 73 | } 74 | 75 | 76 | public Dictionary> xPropertiesGroup { get; set; } 77 | 78 | public void AddSpecialProperties() 79 | { 80 | return; 81 | } 82 | } -------------------------------------------------------------------------------- /jClasses/Containers/jComboBoxItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Avalonia.Controls; 5 | using Avalonia.Controls.Primitives; 6 | using Avalonia.Input; 7 | using Avalonia.Interactivity; 8 | using Xamlade.Extensions; 9 | using Xamlade.LinkWorkers; 10 | using Xamlade.XAMLWorkers; 11 | 12 | namespace Xamlade.jClasses; 13 | 14 | public class jComboBoxItem : ComboBoxItem, JControl, JSelectable, JChildContainer, JBroadcastHandler 15 | { 16 | private string controlType => jElementType.ComboBoxItem.ToString(); 17 | 18 | 19 | protected override Type StyleKeyOverride => typeof(ComboBoxItem); 20 | 21 | 22 | public Beholder Beholder { get; set; } 23 | public Dictionary SpecialSetDelegates { get; set; } 24 | public JChildContainer? _jParent { get; set; } 25 | // public JChildContainer? jParent { get; set; } 26 | public string Type => controlType; 27 | public int XAMLRating { get; set; } 28 | public List XAMLPiece { get; set; } 29 | public bool IsPressed { get; set; } 30 | public event EventHandler? Click; 31 | 32 | public List<(string, JChildContainer.ContainerPropertyDelegate)> ContainerProperties { get; set; } 33 | public static Dictionary ContainerSetProperties 34 | { 35 | get; 36 | set; 37 | } 38 | 39 | public List jChildren { get; set; } 40 | 41 | public jComboBoxItem() 42 | { 43 | SpecialSetDelegates = new(); 44 | Name = $"jComboboxItem + {Utils.NextgenIterator}"; 45 | jChildren = new List(); 46 | Broadcast.OnBroadcast += (this as JBroadcastHandler).HandleBroadcast; 47 | XAMLPiece = new List(); 48 | this.AddHandler(PointerPressedEvent, OnPointerPressed, handledEventsToo: true); 49 | } 50 | // public jComboBoxItem(string name):this() 51 | // { 52 | // Name = name; 53 | // Beholder.mTreeItem.Header = name; 54 | // } 55 | 56 | private void OnPointerPressed(object sender, PointerPressedEventArgs e) 57 | { 58 | IsPressed = true; 59 | Click?.Invoke(this, new RoutedEventArgs()); 60 | } 61 | 62 | public void AddChild(JControl child) 63 | { 64 | RemoveChild(); 65 | jChildren.Add(child); 66 | this.Content = child; 67 | child.jParent = this; 68 | (child as Control).IsHitTestVisible = false; 69 | IsHitTestVisible = true; 70 | } 71 | 72 | public void RemoveChild(JControl? child = null) 73 | { 74 | if(Beholder.mTreeItem.Items.Any()) 75 | this.Beholder.mTreeItem.Items.Remove(this.jChildren[0].Beholder.mTreeItem); 76 | jChildren.Clear(); 77 | this.Content = null; 78 | } 79 | 80 | static jComboBoxItem() 81 | { 82 | ContainerSetProperties = new(); 83 | } 84 | public void InitContainerProperties() 85 | { 86 | ContainerProperties = new(); 87 | } 88 | 89 | 90 | 91 | public Dictionary> xPropertiesGroup { get; set; } 92 | 93 | public void AddSpecialProperties() 94 | { 95 | return; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /jClasses/Containers/jDockPanel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Avalonia.Controls; 4 | using Avalonia.Interactivity; 5 | using Xamlade.LinkWorkers; 6 | using Xamlade.XAMLWorkers; 7 | 8 | namespace Xamlade.jClasses; 9 | 10 | public class jDockPanel: DockPanel, JControl, JChildContainer, JBroadcastHandler, JSelectable, JProperties 11 | { 12 | protected override Type StyleKeyOverride => typeof(DockPanel); 13 | 14 | public Beholder Beholder { get; set; } 15 | public Dictionary SpecialSetDelegates { get; set; } 16 | public JChildContainer? _jParent { get; set; } 17 | // public JChildContainer? jParent { get; set; } 18 | private string controlType => jElementType.DockPanel.ToString(); 19 | public string Type => controlType; 20 | public int XAMLRating { get; set; } 21 | public List XAMLPiece { get; set; } 22 | public bool IsPressed { get; set; } 23 | public event EventHandler? Click; 24 | public List<(string, JChildContainer.ContainerPropertyDelegate)> ContainerProperties { get; set; } 25 | public static Dictionary ContainerSetProperties { get; set; } 26 | 27 | public List jChildren { get; set; } 28 | 29 | public jDockPanel() 30 | { 31 | SpecialSetDelegates = new(); 32 | jChildren = new List(); 33 | Broadcast.OnBroadcast += (this as JBroadcastHandler).HandleBroadcast; 34 | XAMLPiece = new List(); 35 | 36 | } 37 | public void AddChild(JControl child) 38 | { 39 | jChildren.Add(child); 40 | child.jParent = this; 41 | Children.Add((Control)child); 42 | } 43 | 44 | public void RemoveChild(JControl child) 45 | { 46 | jChildren.Remove(child); 47 | Children.Remove((Control)child); 48 | } 49 | 50 | public void InitContainerProperties() 51 | { 52 | 53 | ContainerProperties = new List<(string, JChildContainer.ContainerPropertyDelegate)> 54 | { 55 | ("Dock", (JControl element) => new Property(GetDock(element),typeof(Dock))) 56 | }; 57 | } 58 | 59 | static jDockPanel() 60 | { 61 | 62 | ContainerSetProperties = new() 63 | { 64 | { "Dock", (jControl, value) => SetDock(jControl, (Dock)Enum.Parse(typeof(Dock), (string)value.Value)) } 65 | }; 66 | } 67 | 68 | public static void SetDock(JControl element, Dock value) 69 | { 70 | if (element == null) throw new ArgumentNullException(nameof(element)); 71 | DockPanel.SetDock(element as Control, value); 72 | } 73 | 74 | public static Dock GetDock(JControl element) 75 | { 76 | if (element == null) throw new ArgumentNullException(nameof(element)); 77 | return DockPanel.GetDock(element as Control); 78 | } 79 | 80 | 81 | 82 | 83 | public Dictionary> xPropertiesGroup { get; set; } 84 | 85 | public void AddSpecialProperties() 86 | { 87 | return; 88 | } 89 | } -------------------------------------------------------------------------------- /jClasses/Containers/jMenu.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.Json.Serialization; 4 | using Avalonia.Controls; 5 | using Avalonia.Input; 6 | using Avalonia.Interactivity; 7 | using Xamlade.LinkWorkers; 8 | using Xamlade.XAMLWorkers; 9 | 10 | namespace Xamlade.jClasses; 11 | 12 | public class jMenu : Menu, JControl, JBroadcastHandler, JSelectable, JChildContainer 13 | { 14 | public int ID = 0; 15 | protected override Type StyleKeyOverride => typeof(Menu); 16 | 17 | 18 | 19 | 20 | 21 | public Beholder Beholder { get; set; } 22 | public Dictionary SpecialSetDelegates { get; set; } 23 | public JChildContainer? _jParent { get; set; } 24 | private string controlType => jElementType.Menu.ToString(); 25 | public string Type => controlType; 26 | public int XAMLRating { get; set; } 27 | [field: NonSerialized] public List XAMLPiece { get; set; } 28 | 29 | 30 | public new string? Name 31 | { 32 | get => base.Name; 33 | set => SetValue(NameProperty, value); 34 | } 35 | 36 | public bool IsPressed { get; set; } 37 | public event EventHandler? Click; 38 | 39 | 40 | 41 | 42 | public List<(string, JChildContainer.ContainerPropertyDelegate)> ContainerProperties { get; set; } 43 | public static Dictionary ContainerSetProperties { get; set; } 44 | 45 | public List jChildren { get; set; } 46 | public void AddChild(JControl child) 47 | { 48 | jChildren.Add(child); 49 | child.jParent = this; 50 | Items.Add(child); 51 | } 52 | 53 | public void RemoveChild(JControl child) 54 | { 55 | Broadcast.OnBroadcast -= (child as JBroadcastHandler).HandleBroadcast; 56 | jChildren.Remove(child); 57 | Items.Remove(child); 58 | 59 | } 60 | 61 | static jMenu() 62 | { 63 | ContainerSetProperties = new(); 64 | } 65 | public void InitContainerProperties() 66 | { 67 | ContainerProperties = new(); 68 | } 69 | 70 | 71 | public Dictionary> xPropertiesGroup { get; set; } 72 | 73 | public void AddSpecialProperties() 74 | { 75 | return; 76 | } 77 | } -------------------------------------------------------------------------------- /jClasses/Containers/jMenuItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Avalonia.Controls; 5 | using Avalonia.Controls.Primitives; 6 | using Avalonia.Input; 7 | using Avalonia.Interactivity; 8 | using Xamlade.Extensions; 9 | using Xamlade.LinkWorkers; 10 | using Xamlade.XAMLWorkers; 11 | 12 | namespace Xamlade.jClasses; 13 | 14 | public class jMenuItem : MenuItem, JControl, JSelectable, JChildContainer, JBroadcastHandler 15 | { 16 | private string controlType => jElementType.MenuItem.ToString(); 17 | 18 | 19 | protected override Type StyleKeyOverride => typeof(MenuItem); 20 | 21 | 22 | public Beholder Beholder { get; set; } 23 | public Dictionary SpecialSetDelegates { get; set; } 24 | public JChildContainer? _jParent { get; set; } 25 | // public JChildContainer? jParent { get; set; } 26 | public string Type => controlType; 27 | public int XAMLRating { get; set; } 28 | public List XAMLPiece { get; set; } 29 | public bool IsPressed { get; set; } 30 | public event EventHandler? Click; 31 | 32 | public List<(string, JChildContainer.ContainerPropertyDelegate)> ContainerProperties { get; set; } 33 | public static Dictionary ContainerSetProperties 34 | { 35 | get; 36 | set; 37 | } 38 | 39 | public List jChildren { get; set; } 40 | 41 | public jMenuItem() 42 | { 43 | SpecialSetDelegates = new(); 44 | Name = $"jMenuItem{Utils.NextgenIterator}"; 45 | jChildren = new List(); 46 | Broadcast.OnBroadcast += (this as JBroadcastHandler).HandleBroadcast; 47 | XAMLPiece = new List(); 48 | this.AddHandler(PointerPressedEvent, OnPointerPressed, handledEventsToo: true); 49 | } 50 | // public jComboBoxItem(string name):this() 51 | // { 52 | // Name = name; 53 | // Beholder.mTreeItem.Header = name; 54 | // } 55 | 56 | private void OnPointerPressed(object sender, PointerPressedEventArgs e) 57 | { 58 | IsPressed = true; 59 | Click?.Invoke(this, new RoutedEventArgs()); 60 | } 61 | 62 | public void AddChild(JControl child) 63 | { 64 | jChildren.Add(child); 65 | this.Items.Add(child); 66 | child.jParent = this; 67 | (child as Control).IsHitTestVisible = false; 68 | IsHitTestVisible = true; 69 | } 70 | 71 | public void RemoveChild(JControl? child) 72 | { 73 | if(Beholder.mTreeItem.Items.Any()) 74 | this.Beholder.mTreeItem.Items.Remove(this.jChildren[0].Beholder.mTreeItem); 75 | jChildren.Clear(); 76 | if(this.Items.Contains(child)) 77 | this.Items.Remove(child); 78 | } 79 | 80 | static jMenuItem() 81 | { 82 | ContainerSetProperties = new(); 83 | } 84 | public void InitContainerProperties() 85 | { 86 | ContainerProperties = new(); 87 | } 88 | 89 | 90 | 91 | public Dictionary> xPropertiesGroup { get; set; } 92 | 93 | public void AddSpecialProperties() 94 | { 95 | return; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /jClasses/Containers/jStackPanel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Avalonia.Controls; 4 | using Avalonia.Interactivity; 5 | using Xamlade.LinkWorkers; 6 | using Xamlade.XAMLWorkers; 7 | 8 | namespace Xamlade.jClasses; 9 | 10 | public class jStackPanel : StackPanel, JControl, JChildContainer, JBroadcastHandler, JSelectable 11 | { 12 | protected override Type StyleKeyOverride => typeof(StackPanel); 13 | 14 | public Beholder Beholder { get; set; } 15 | public Dictionary SpecialSetDelegates { get; set; } 16 | public JChildContainer? _jParent { get; set; } 17 | // public JChildContainer? jParent { get; set; } 18 | private string controlType => jElementType.StackPanel.ToString(); 19 | public string Type => controlType; 20 | 21 | public int XAMLRating { get; set; } 22 | public List XAMLPiece { get; set; } 23 | public bool IsPressed { get; set; } 24 | public event EventHandler? Click; 25 | public List<(string, JChildContainer.ContainerPropertyDelegate)> ContainerProperties { get; set; } 26 | public static Dictionary ContainerSetProperties { get; set; } 27 | 28 | public List jChildren { get; set; } 29 | 30 | public jStackPanel() 31 | { 32 | SpecialSetDelegates = new(); 33 | jChildren = new List(); 34 | Broadcast.OnBroadcast += (this as JBroadcastHandler).HandleBroadcast; 35 | XAMLPiece = new List(); 36 | 37 | } 38 | 39 | static jStackPanel() 40 | { 41 | ContainerSetProperties = new(); 42 | } 43 | 44 | public void InitContainerProperties() 45 | { 46 | ContainerProperties = new(); 47 | } 48 | 49 | public void AddChild(JControl child) 50 | { 51 | jChildren.Add(child); 52 | child.jParent = this; 53 | Children.Add((Control)child); 54 | } 55 | 56 | public void RemoveChild(JControl child) 57 | { 58 | jChildren.Remove(child); 59 | Children.Remove((Control)child); 60 | } 61 | 62 | public Dictionary> xPropertiesGroup { get; set; } 63 | 64 | public void AddSpecialProperties() 65 | { 66 | return; 67 | } 68 | } -------------------------------------------------------------------------------- /jClasses/Elements/jButton.cs: -------------------------------------------------------------------------------- 1 | //МОИ ИНТЕРФЕЙСЫ ИМЕНУЮТСЯ С J 2 | 3 | 4 | //Повторное использование кода в классах 5 | 6 | //Рамку вынести в jSelectable 7 | 8 | //Добавить приоритеты отрисовки (задний - передний план) 9 | 10 | 11 | using System; 12 | using System.Collections.Generic; 13 | using System.Text.Json.Serialization; 14 | using Avalonia.Controls; 15 | using Xamlade.Extensions; 16 | using Xamlade.Extensions.Atributes; 17 | using Xamlade.LinkWorkers; 18 | using Xamlade.XAMLWorkers; 19 | 20 | 21 | namespace Xamlade.jClasses; 22 | 23 | // Для контейнеров 24 | 25 | //Интерфейс рамки выделения объекта 26 | 27 | //Для простых объектов 28 | 29 | //Приёмник широковещательных сообщений jObject 30 | 31 | public class jButton : Button, JControl, JBroadcastHandler, JSelectable 32 | { 33 | protected override Type StyleKeyOverride => typeof(Button); 34 | 35 | 36 | 37 | public Beholder Beholder { get; set; } 38 | public Dictionary SpecialSetDelegates { get; set; } 39 | 40 | public JChildContainer? _jParent { get; set; } 41 | 42 | private string controlType => jElementType.Button.ToString(); 43 | public string Type => controlType; 44 | public int XAMLRating { get; set; } 45 | public List XAMLPiece { get; set; } 46 | 47 | 48 | public new bool IsPressed 49 | { 50 | get => base.IsPressed; 51 | set => Reflector.ForceSet(this,"_isPressed", value); 52 | } 53 | 54 | public new string? Name 55 | { 56 | get => base.Name; 57 | set => SetValue(NameProperty, value); 58 | } 59 | 60 | 61 | public Dictionary> xPropertiesGroup { get; set; } 62 | 63 | public void AddSpecialProperties() 64 | { 65 | return; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /jClasses/Elements/jCheckBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Avalonia.Controls; 4 | using Xamlade.Extensions; 5 | using Xamlade.LinkWorkers; 6 | using Xamlade.XAMLWorkers; 7 | 8 | namespace Xamlade.jClasses; 9 | 10 | public class jCheckBox : CheckBox, JControl, JBroadcastHandler, JSelectable 11 | { 12 | public jCheckBox() 13 | { 14 | SpecialSetDelegates = new(); 15 | Broadcast.OnBroadcast += (this as JBroadcastHandler).HandleBroadcast; 16 | XAMLPiece = new List(); 17 | } 18 | 19 | 20 | protected override Type StyleKeyOverride => typeof(CheckBox); 21 | 22 | 23 | 24 | public Beholder Beholder { get; set; } 25 | public Dictionary SpecialSetDelegates { get; set; } 26 | public JChildContainer? _jParent { get; set; } 27 | // public JChildContainer? jParent { get; set; } 28 | 29 | private string controlType => jElementType.CheckBox.ToString(); 30 | public string Type => controlType; 31 | 32 | 33 | public int XAMLRating { get; set; } 34 | public List XAMLPiece { get; set; } 35 | 36 | public new bool IsPressed 37 | { 38 | get => base.IsPressed; 39 | set => Reflector.ForceSet(this,"_isPressed", value); 40 | } 41 | 42 | protected override void OnClick() {} 43 | 44 | public Dictionary> xPropertiesGroup { get; set; } 45 | 46 | public void AddSpecialProperties() 47 | { 48 | return; 49 | } 50 | } -------------------------------------------------------------------------------- /jClasses/Elements/jImage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Avalonia.Controls; 4 | using Avalonia.Interactivity; 5 | using Avalonia.Media; 6 | using Xamlade.LinkWorkers; 7 | using Xamlade.XAMLWorkers; 8 | 9 | namespace Xamlade.jClasses; 10 | 11 | public class jImage : Image, JControl, JBroadcastHandler, JSelectable 12 | { 13 | protected override Type StyleKeyOverride => typeof(Image); 14 | 15 | public jImage() 16 | { 17 | SpecialSetDelegates = new(); 18 | Broadcast.OnBroadcast += (this as JBroadcastHandler).HandleBroadcast; 19 | XAMLPiece = new List(); 20 | 21 | 22 | } 23 | 24 | 25 | public Beholder Beholder { get; set; } 26 | public Dictionary SpecialSetDelegates { get; set; } 27 | public JChildContainer? _jParent { get; set; } 28 | // public JChildContainer? jParent { get; set; } 29 | 30 | private string controlType => jElementType.Image.ToString(); 31 | public string Type => controlType; 32 | 33 | public int XAMLRating { get; set; } 34 | public List XAMLPiece { get; set; } 35 | //Понизили доступ к свойству Background, лол. Хотя интерфейс регламентирует public 36 | IBrush? JControl.Background { get; set; } 37 | public bool IsPressed { get; set; } 38 | public event EventHandler? Click; 39 | 40 | public string? jImageSource { get; set; } 41 | 42 | public Dictionary> xPropertiesGroup { get; set; } 43 | 44 | public void AddSpecialProperties() 45 | { 46 | return; 47 | } 48 | } -------------------------------------------------------------------------------- /jClasses/Elements/jProgressBar.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Avalonia.Controls; 4 | using Avalonia.Interactivity; 5 | using Xamlade.Extensions.Atributes; 6 | using Xamlade.LinkWorkers; 7 | using Xamlade.XAMLWorkers; 8 | 9 | namespace Xamlade.jClasses; 10 | 11 | 12 | public class jProgressBar : ProgressBar, JControl, JBroadcastHandler, JSelectable 13 | { 14 | #region Required 15 | 16 | protected override Type StyleKeyOverride => typeof(ProgressBar); 17 | 18 | private string controlType => jElementType.ProgressBar.ToString(); 19 | public string Type => controlType; 20 | 21 | #endregion 22 | 23 | 24 | public Dictionary> xPropertiesGroup { get; set; } 25 | 26 | public void AddSpecialProperties() 27 | { 28 | } 29 | 30 | public Beholder Beholder { get; set; } 31 | public Dictionary SpecialSetDelegates { get; set; } 32 | public JChildContainer? _jParent { get; set; } 33 | 34 | public int XAMLRating { get; set; } 35 | public List XAMLPiece { get; set; } 36 | public bool IsPressed { get; set; } 37 | public event EventHandler? Click; 38 | 39 | 40 | } -------------------------------------------------------------------------------- /jClasses/Elements/jRadioButton.cs: -------------------------------------------------------------------------------- 1 | //МОИ ИНТЕРФЕЙСЫ ИМЕНУЮТСЯ С J 2 | 3 | 4 | //Повторное использование кода в классах 5 | 6 | //Рамку вынести в jSelectable 7 | 8 | //Добавить приоритеты отрисовки (задний - передний план) 9 | 10 | 11 | using System; 12 | using System.Collections.Generic; 13 | using System.Text.Json.Serialization; 14 | using Avalonia.Controls; 15 | using Xamlade.Extensions; 16 | using Xamlade.Extensions.Atributes; 17 | using Xamlade.LinkWorkers; 18 | using Xamlade.XAMLWorkers; 19 | 20 | 21 | namespace Xamlade.jClasses; 22 | 23 | // Для контейнеров 24 | 25 | //Интерфейс рамки выделения объекта 26 | 27 | //Для простых объектов 28 | 29 | //Приёмник широковещательных сообщений jObject 30 | 31 | public class jRadioButton : RadioButton, JControl, JBroadcastHandler, JSelectable 32 | { 33 | protected override Type StyleKeyOverride => typeof(RadioButton); 34 | 35 | 36 | 37 | public Beholder Beholder { get; set; } 38 | public Dictionary SpecialSetDelegates { get; set; } 39 | 40 | public JChildContainer? _jParent { get; set; } 41 | 42 | private string controlType => jElementType.RadioButton.ToString(); 43 | public string Type => controlType; 44 | public int XAMLRating { get; set; } 45 | public List XAMLPiece { get; set; } 46 | 47 | 48 | public new bool IsPressed 49 | { 50 | get => base.IsPressed; 51 | set => Reflector.ForceSet(this,"_isPressed", value); 52 | } 53 | 54 | public new string? Name 55 | { 56 | get => base.Name; 57 | set => SetValue(NameProperty, value); 58 | } 59 | 60 | 61 | public Dictionary> xPropertiesGroup { get; set; } 62 | 63 | public void AddSpecialProperties() 64 | { 65 | return; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /jClasses/Elements/jSlider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Avalonia.Controls; 4 | using Avalonia.Interactivity; 5 | using Xamlade.Extensions.Atributes; 6 | using Xamlade.LinkWorkers; 7 | using Xamlade.XAMLWorkers; 8 | 9 | namespace Xamlade.jClasses; 10 | 11 | 12 | public class jSlider : Slider, JControl, JBroadcastHandler, JSelectable 13 | { 14 | #region Required 15 | 16 | protected override Type StyleKeyOverride => typeof(Slider); 17 | 18 | private string controlType => jElementType.Slider.ToString(); 19 | public string Type => controlType; 20 | 21 | #endregion 22 | 23 | 24 | public Dictionary> xPropertiesGroup { get; set; } 25 | 26 | public void AddSpecialProperties() 27 | { 28 | } 29 | 30 | public Beholder Beholder { get; set; } 31 | public Dictionary SpecialSetDelegates { get; set; } 32 | public JChildContainer? _jParent { get; set; } 33 | 34 | public int XAMLRating { get; set; } 35 | public List XAMLPiece { get; set; } 36 | public bool IsPressed { get; set; } 37 | public event EventHandler? Click; 38 | 39 | 40 | } -------------------------------------------------------------------------------- /jClasses/Elements/jTextBlock.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Avalonia.Controls; 4 | using Avalonia.Interactivity; 5 | using Xamlade.LinkWorkers; 6 | using Xamlade.XAMLWorkers; 7 | 8 | namespace Xamlade.jClasses; 9 | 10 | public class jTextBlock : TextBlock, JControl, JBroadcastHandler, JSelectable 11 | { 12 | protected override Type StyleKeyOverride => typeof(TextBlock); 13 | 14 | 15 | public Beholder Beholder { get; set; } 16 | public Dictionary SpecialSetDelegates { get; set; } 17 | public JChildContainer? _jParent { get; set; } 18 | //public JChildContainer? jParent { get; set; } 19 | private string controlType => jElementType.TextBlock.ToString(); 20 | public string Type => controlType; 21 | 22 | 23 | public int XAMLRating { get; set; } 24 | public List XAMLPiece { get; set; } 25 | 26 | public bool IsPressed { get; set; } 27 | public event EventHandler? Click; 28 | 29 | public Dictionary> xPropertiesGroup { get; set; } 30 | 31 | public void AddSpecialProperties() 32 | { 33 | return; 34 | } 35 | } -------------------------------------------------------------------------------- /jClasses/Elements/jTextBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Avalonia.Controls; 4 | using Avalonia.Input; 5 | using Avalonia.Interactivity; 6 | using Xamlade.Extensions.Atributes; 7 | using Xamlade.LinkWorkers; 8 | using Xamlade.XAMLWorkers; 9 | 10 | namespace Xamlade.jClasses; 11 | 12 | 13 | public class jTextBox : TextBox, JControl, JBroadcastHandler, JSelectable 14 | { 15 | 16 | 17 | protected override Type StyleKeyOverride => typeof(TextBox); 18 | 19 | 20 | public Beholder Beholder { get; set; } 21 | public Dictionary SpecialSetDelegates { get; set; } 22 | public JChildContainer? _jParent { get; set; } 23 | // public JChildContainer? jParent { get; set; } 24 | private string controlType => jElementType.TextBox.ToString(); 25 | public string Type => controlType; 26 | 27 | public int XAMLRating { get; set; } 28 | public List XAMLPiece { get; set; } 29 | 30 | protected override void OnPointerPressed(PointerPressedEventArgs e) { } 31 | protected override void OnPointerMoved(PointerEventArgs e) { } 32 | protected override void OnPointerReleased(PointerReleasedEventArgs e) { } 33 | 34 | public bool IsPressed { get; set; } 35 | public event EventHandler? Click; 36 | 37 | public Dictionary> xPropertiesGroup { get; set; } 38 | 39 | public void AddSpecialProperties() 40 | { 41 | return; 42 | } 43 | } -------------------------------------------------------------------------------- /jClasses/Elements/jToggleButton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Avalonia.Controls.Primitives; 4 | using Xamlade.LinkWorkers; 5 | using Xamlade.XAMLWorkers; 6 | 7 | namespace Xamlade.jClasses; 8 | 9 | public class jToggleButton : ToggleButton, JControl, JBroadcastHandler, JSelectable 10 | { 11 | protected override Type StyleKeyOverride => typeof(ToggleButton); 12 | 13 | private string controlType => jElementType.ToggleButton.ToString(); 14 | public string Type => controlType; 15 | 16 | public Beholder Beholder { get; set; } 17 | public Dictionary SpecialSetDelegates { get; set; } 18 | public JChildContainer? _jParent { get; set; } 19 | // public JChildContainer? jParent { get; set; } 20 | 21 | public int XAMLRating { get; set; } 22 | public List XAMLPiece { get; set; } 23 | public new bool IsPressed 24 | { 25 | get => base.IsPressed; 26 | set => SetValue(IsPressedProperty, value); 27 | } 28 | 29 | protected override void OnClick() {} 30 | 31 | public Dictionary> xPropertiesGroup { get; set; } 32 | 33 | public void AddSpecialProperties() 34 | { 35 | return; 36 | } 37 | } -------------------------------------------------------------------------------- /jClasses/Enums/jElementType.cs: -------------------------------------------------------------------------------- 1 | namespace Xamlade.jClasses; 2 | 3 | public enum jElementType 4 | { 5 | Border, 6 | Canvas, 7 | DockPanel, 8 | Grid, 9 | Panel, 10 | ScrollViewer, 11 | StackPanel, 12 | TabControl, 13 | TabItem, 14 | Button, 15 | CheckBox, 16 | ComboBox, 17 | DatePicker, 18 | ListBox, 19 | ListView, 20 | Menu, 21 | MenuItem, 22 | ProgressBar, 23 | RadioButton, 24 | Slider, 25 | TextBox, 26 | ToggleButton, 27 | TextBlock, 28 | Image, 29 | ComboBoxItem, 30 | AvaPlot 31 | } -------------------------------------------------------------------------------- /jClasses/Interfaces/JBroadcastHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamlade.XAMLWorkers; 3 | 4 | namespace Xamlade.jClasses; 5 | 6 | public interface JBroadcastHandler 7 | where T : JControl 8 | { 9 | internal void HandleBroadcast(int mode) 10 | { 11 | switch ((this as JControl).Name) 12 | { 13 | case null: 14 | case "SelectionCanvas": 15 | return; 16 | } 17 | switch (mode) 18 | { 19 | case 0: 20 | XAMLGenerator.XAMLRatingInit(this as JControl); 21 | break; 22 | case 1: 23 | XAMLGenerator.XAMLizeElement(this as JControl); 24 | break; 25 | case 2: 26 | ImportXAML.CorrectLoadedjElement(this as JControl); 27 | break; 28 | case 3 when (this as JControl).Name == "MainCanvas": 29 | return; 30 | case 3: 31 | Broadcast.OnBroadcast -= HandleBroadcast; 32 | Broadcast.DisposeElement(this as JControl); 33 | break; 34 | case 4: 35 | ImportXAML.CorrectTree(this as JControl); 36 | break; 37 | case 5: 38 | { 39 | if((this as JControl).Beholder.selectionBorder is not null ) 40 | (this as JControl).Beholder.selectionBorder.IsVisible = false; 41 | break; 42 | } 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /jClasses/Interfaces/JChildContainer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Xamlade.LinkWorkers; 4 | 5 | namespace Xamlade.jClasses; 6 | 7 | public interface JChildContainer 8 | { 9 | public delegate Property ContainerPropertyDelegate(JControl element); 10 | public delegate void ContainerSetPropertyDelegate(JControl element, Property value); 11 | public List<(string, ContainerPropertyDelegate)> ContainerProperties { get; set; } 12 | 13 | //Методы установки свойства на контейнере 14 | public static abstract Dictionary ContainerSetProperties { get; set; } 15 | 16 | public List jChildren { get; set; } 17 | 18 | 19 | //Проксирование jParent из JControl 20 | public JChildContainer? jParent 21 | { 22 | get => (this as JControl).jParent; 23 | set 24 | { 25 | (this as JControl).jParent = value; 26 | } 27 | } 28 | public void AddChild(JControl child); 29 | 30 | public Beholder Beholder { get; set; } 31 | 32 | public void RemoveChild(JControl child); 33 | 34 | public void InitContainerProperties(); 35 | } -------------------------------------------------------------------------------- /jClasses/Interfaces/JControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Runtime.CompilerServices; 6 | using Avalonia; 7 | using Avalonia.Controls; 8 | using Avalonia.Input; 9 | using Avalonia.Interactivity; 10 | using Avalonia.Layout; 11 | using Avalonia.Media; 12 | using Avalonia.Threading; 13 | using Xamlade.Extensions; 14 | using Xamlade.FunctionalAreas; 15 | using Xamlade.LinkWorkers; 16 | 17 | namespace Xamlade.jClasses; 18 | 19 | public interface JControl : JProperties 20 | { 21 | public Beholder Beholder { get; set; } 22 | 23 | 24 | 25 | public Dictionary SpecialSetDelegates { get; set; } 26 | public bool IsSelected => (this)?.Beholder.selectionBorder.IsVisible ?? false; 27 | 28 | protected JChildContainer? _jParent { get; set; } 29 | 30 | public JChildContainer? jParent 31 | { 32 | get => _jParent; 33 | set 34 | { 35 | _jParent = value; 36 | AfterParentSet(); 37 | } 38 | } 39 | 40 | 41 | public string Type { get; } 42 | 43 | public int XAMLRating { get; set; } 44 | public List XAMLPiece { get; set; } 45 | 46 | // Устанавливает фон элемента 47 | IBrush? Background { get; set; } 48 | 49 | 50 | // Указывает, активен ли элемент для взаимодействия с пользователем 51 | bool IsEnabled { get; set; } 52 | 53 | // Указывает, виден ли элемент 54 | bool IsVisible { get; set; } 55 | 56 | // Устанавливает прозрачность элемента (от 0 до 1) 57 | double Opacity { get; set; } 58 | 59 | // Устанавливает горизонтальное выравнивание элемента в его родительском контейнере 60 | HorizontalAlignment HorizontalAlignment { get; set; } 61 | 62 | // Устанавливает вертикальное выравнивание элемента в его родительском контейнере 63 | VerticalAlignment VerticalAlignment { get; set; } 64 | 65 | // Устанавливает ширину элемента 66 | double Width { get; set; } 67 | 68 | // Устанавливает высоту элемента 69 | double Height { get; set; } 70 | 71 | // Устанавливает минимально допустимые значения для ширины и высоты элемента 72 | double MinWidth { get; set; } 73 | double MinHeight { get; set; } 74 | 75 | // Устанавливает максимально допустимые значения для ширины и высоты элемента 76 | double MaxWidth { get; set; } 77 | double MaxHeight { get; set; } 78 | 79 | // Устанавливает форму указателя мыши, когда она находится над элементом 80 | Cursor? Cursor { get; set; } 81 | 82 | // Устанавливает контекст данных для элемента, который используется для привязки данных 83 | object? DataContext { get; set; } 84 | 85 | // Устанавливает уникальное имя элемента 86 | /* public string? Name 87 | { 88 | get => this.Name; 89 | set { this.Beholder.mTreeItem.Name = value; } 90 | } 91 | */ 92 | public string? Name { get; set; } 93 | public bool IsPressed { get; set; } 94 | 95 | public Rect Bounds { get; } 96 | 97 | 98 | public event EventHandler? PointerEntered; 99 | public event EventHandler? PointerExited; 100 | public event EventHandler? Click; 101 | public event EventHandler? PointerPressed; 102 | public event EventHandler? PointerReleased; 103 | public event EventHandler? KeyDown; 104 | public event EventHandler? KeyUp; 105 | public event EventHandler? PropertyChanged; 106 | 107 | 108 | private void AfterParentSet() 109 | { 110 | if(this.xPropertiesGroup is null) 111 | (this as JProperties).InitProperties(); 112 | 113 | if ((this as JControl)?.jParent is not { } parent) return; 114 | xPropertiesGroup["container"].Clear(); 115 | foreach (var kvp in ((jParent as JChildContainer).GetType() 116 | .GetProperty("ContainerSetProperties", BindingFlags.Public | BindingFlags.Static) 117 | ?.GetValue(jParent)) as Dictionary) 118 | SpecialSetDelegates.TryAdd(kvp.Key, kvp.Value); 119 | AddContainerProperties(); 120 | AddSpecialProperties(); 121 | (this as JControl).Beholder.PropListItemsInit(); 122 | 123 | 124 | 125 | } 126 | 127 | public void SetParent(JChildContainer parent) 128 | { 129 | if (parent is null) return; 130 | if (this.Name == "MainCanvas") return; 131 | this.jParent?.RemoveChild(this); 132 | parent.AddChild(this); 133 | } 134 | 135 | 136 | public bool Focus(NavigationMethod method = NavigationMethod.Unspecified, 137 | KeyModifiers keyModifiers = KeyModifiers.None); 138 | 139 | public void Dispose() 140 | { 141 | if (this.Name == "MainCanvas") return; 142 | this.Beholder.mTreeItem = null; 143 | var parent = this.jParent; 144 | if (jParent != null) 145 | jParent.RemoveChild(this); 146 | Reflector.SetName(null, this); 147 | Workspace.MainCanvas.Children.Remove(this.Beholder.selectionBorder); 148 | } 149 | 150 | public string? ToString() => 151 | $"Type: {Type}, Name: {Name}, IsSelected: {IsSelected}, IsEnabled: {IsEnabled}, " + 152 | $"IsVisible: {IsVisible}, DataContext: {DataContext}, Bounds: {Bounds}"; 153 | 154 | public void JControlInit() 155 | { 156 | this.SpecialSetDelegates = new(); 157 | this.xPropertiesGroup = new(); 158 | (this).Beholder.selectionBorder = new mBorder(this); 159 | 160 | InitProperties(); 161 | if (this is JChildContainer container) 162 | container.InitContainerProperties(); 163 | //СОБЫТИЕ ВЫЗЫВАЕТСЯ ДЛЯ БОЛЬШИНСТВА ИЗМЕНЕНИЙ ЗНАЧЕНИЙ ПОЛЕЙ AVALONIA UI! 164 | this.PropertyChanged += Beholder.OnPropertyChanged; 165 | } 166 | 167 | 168 | } -------------------------------------------------------------------------------- /jClasses/Interfaces/JProperties.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Reflection; 6 | using Avalonia.Controls; 7 | using Xamlade.Extensions; 8 | using Xamlade.FunctionalAreas; 9 | using Xamlade.LinkWorkers; 10 | 11 | namespace Xamlade.jClasses 12 | { 13 | public interface JProperties 14 | { 15 | //Свойства по категориям 16 | public Dictionary> xPropertiesGroup { get; set; } 17 | 18 | // Метод для получения свойства по имени 19 | public Property GetProperty(string name) 20 | { 21 | foreach (var KVP in xPropertiesGroup) 22 | if (KVP.Value.TryGetValue(name, out var property)) 23 | return property; 24 | throw new KeyNotFoundException($"Property '{name}' not found."); 25 | } 26 | 27 | 28 | public void SetProperty(string name, T value, string category = "main") 29 | { 30 | if(Constants.ExcludedWords.Contains(name)) return; 31 | if(value is not null) 32 | xPropertiesGroup[category][name] = new Property(value, value.GetType()); 33 | 34 | } 35 | public void SetProperty(string name, T value, byte flags, string category = "main" ) 36 | { 37 | xPropertiesGroup[category][name] = new Property(value, value.GetType(), flags); 38 | } 39 | 40 | public void InitProperties() 41 | { 42 | xPropertiesGroup = new(); 43 | xPropertiesGroup["main"] = new Dictionary(); 44 | xPropertiesGroup["container"] = new Dictionary(); 45 | var type = this.GetType(); 46 | var props = type.GetProperties() 47 | .Where(prop => !Constants.ExcludedWords.Contains(prop.Name)); 48 | 49 | foreach (var prop in props) 50 | { 51 | var propValue = prop.GetValue(this); 52 | if (propValue is null) continue; 53 | SetProperty(prop.Name, propValue); 54 | } 55 | 56 | 57 | } 58 | 59 | // Метод для добавления контейнерных свойств 60 | public void AddContainerProperties() 61 | { 62 | if ((this as JControl)?.jParent is not { } parent) return; 63 | if(parent.ContainerProperties is null) return; 64 | foreach (var prop in parent.ContainerProperties) 65 | SetProperty(prop.Item1, prop.Item2((this as JControl)!),category:"container"); 66 | } 67 | 68 | // метод для добавления специальных свойств 69 | protected abstract void AddSpecialProperties(); 70 | 71 | 72 | public void UpdateProperty(string name, object? value, string category = "main") 73 | { 74 | 75 | //ОПТИМИЗИРОВАТЬ! 76 | SetProperty(name,value,category); 77 | } 78 | } 79 | 80 | // Структура для хранения свойств 81 | public struct Property 82 | { 83 | public object? Value; 84 | public Type Type; 85 | public byte Flags; 86 | 87 | public Property( object value, Type? t = null, byte flags = 0) 88 | { 89 | if (value is Property p) 90 | (Value, Type, Flags) = (p.Value, p.Type, p.Flags); 91 | else 92 | (Value, Type, Flags) = (value, t ?? value.GetType(), flags); 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /jClasses/Interfaces/JSelectable.cs: -------------------------------------------------------------------------------- 1 | namespace Xamlade.jClasses; 2 | 3 | public interface JSelectable 4 | { 5 | 6 | } -------------------------------------------------------------------------------- /jClasses/JBaseStatic.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Avalonia.Controls; 3 | using Xamlade.FunctionalAreas; 4 | using Xamlade.XAMLWorkers; 5 | 6 | namespace Xamlade.jClasses; 7 | 8 | public static class JBaseStatic 9 | { 10 | /// 11 | /// Универсальный статический конструктор JControl 12 | /// 13 | /// JObject 14 | public static void Jctor(JControl element) 15 | { 16 | Broadcast.OnBroadcast += (element as JBroadcastHandler).HandleBroadcast; 17 | element.XAMLPiece = new List(); 18 | if (element is JChildContainer container) 19 | if (container.jChildren is null) 20 | container.jChildren = new List(); 21 | } 22 | 23 | public static void CorrectProperties(JControl element) 24 | { 25 | element.UpdateProperty("Width", (element as Control).Bounds.Width); 26 | element.UpdateProperty("Height", (element as Control).Bounds.Height); 27 | element.Beholder.UpdatePropList("Width"); 28 | element.Beholder.UpdatePropList("Height"); 29 | } 30 | } -------------------------------------------------------------------------------- /jClasses/ScottPlot/jAvaplot.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Avalonia.Controls; 4 | using Avalonia.Interactivity; 5 | using Avalonia.Media; 6 | using ScottPlot.Avalonia; 7 | using Xamlade.Extensions; 8 | using Xamlade.LinkWorkers; 9 | 10 | namespace Xamlade.jClasses; 11 | 12 | public class jAvaPlot:AvaPlot,JControl, JBroadcastHandler, JSelectable 13 | { 14 | protected override Type StyleKeyOverride => typeof(AvaPlot); 15 | 16 | 17 | 18 | public Beholder Beholder { get; set; } 19 | public Dictionary SpecialSetDelegates { get; set; } 20 | 21 | public JChildContainer? _jParent { get; set; } 22 | 23 | private string controlType => jElementType.AvaPlot.ToString(); 24 | public string Type => controlType; 25 | public int XAMLRating { get; set; } 26 | public List XAMLPiece { get; set; } 27 | public IBrush? Background { get; set; } 28 | 29 | 30 | public new string? Name 31 | { 32 | get => base.Name; 33 | set => SetValue(NameProperty, value); 34 | } 35 | 36 | public bool IsPressed { get; set; } 37 | public event EventHandler? Click; 38 | 39 | 40 | public void AddSpecialProperties() 41 | { 42 | AddSpecialSetDelegates(); 43 | xPropertiesGroup["specials"] = new(); 44 | xPropertiesGroup["specials"]["Title"] = new Property(this.Plot.Axes.Title.Label.Text, typeof(string),2); 45 | // xPropertiesGroup["specials"]["Columns"] = new Property(this.ColumnDefinitions.Count, typeof(int),2); 46 | this.Beholder.UpdatePropList("Title"); 47 | // this.Beholder.UpdatePropList("Columns"); 48 | } 49 | 50 | public void AddSpecialSetDelegates() 51 | { 52 | SpecialSetDelegates["Title"] = Utils.ConvertSetter(SetPlotTitle); 53 | // SpecialSetDelegates["Columns"] = Utils.ConvertSetter(SetColumnsCount); 54 | } 55 | 56 | void SetPlotTitle(JControl element, string name) => this.Plot.Title(name); 57 | public Dictionary> xPropertiesGroup { get; set; } 58 | 59 | 60 | } -------------------------------------------------------------------------------- /mClasses/Interfaces/MControl.cs: -------------------------------------------------------------------------------- 1 | using System.Linq.Expressions; 2 | 3 | namespace Xamlade.mClasses; 4 | 5 | 6 | 7 | //MControl описывает вспомогательные UI-объекты, необходимые для работы GUI Xamlade 8 | public interface MControl 9 | { 10 | //Строка служебной информации 11 | public string Label { get; set; } 12 | } -------------------------------------------------------------------------------- /mClasses/mBorder.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Xamlade.mClasses; 3 | 4 | namespace Xamlade.jClasses; 5 | 6 | public class mBorder : Border, MControl 7 | { 8 | private JControl master; 9 | public mBorder(JControl binded) 10 | { 11 | master = binded; 12 | Name = master.Name + "_Border"; 13 | } 14 | 15 | public string Label { get; set; } 16 | } -------------------------------------------------------------------------------- /mClasses/mColumnDefinition.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Xamlade.mClasses; 3 | 4 | namespace Xamlade.jClasses; 5 | 6 | public class mColumnDefinition:ColumnDefinition, MControl 7 | { 8 | public jGrid parent; 9 | public mColumnDefinition(jGrid parent,GridLength height) 10 | { 11 | this.parent = parent; 12 | this.Width = height; 13 | } 14 | public mColumnDefinition(jGrid parent,double width, GridUnitType type = GridUnitType.Star) 15 | { 16 | this.parent = parent; 17 | this.Width = new GridLength(width, type); 18 | 19 | } 20 | 21 | public string Label { get; set; } 22 | } -------------------------------------------------------------------------------- /mClasses/mGenButton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Avalonia.Controls; 3 | using Xamlade.mClasses; 4 | 5 | namespace Xamlade.jClasses; 6 | 7 | public class mGenButton:Button, MControl 8 | { 9 | private string _label; 10 | 11 | public string Label 12 | { 13 | get => _label; 14 | set => _label = value.ToString(); 15 | } 16 | 17 | public mGenButton(string label) => Label = label; 18 | protected override Type StyleKeyOverride => typeof(Button); 19 | 20 | public mGenButton():base() 21 | { 22 | this.Label = ""; 23 | } 24 | } -------------------------------------------------------------------------------- /mClasses/mRowDefinition.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Avalonia.Controls; 3 | using Xamlade.mClasses; 4 | 5 | namespace Xamlade.jClasses; 6 | 7 | public class mRowDefinition: RowDefinition, MControl 8 | { 9 | public jGrid parent; 10 | 11 | 12 | public mRowDefinition(jGrid parent,GridLength height) 13 | { 14 | this.parent = parent; 15 | this.Height = height; 16 | } 17 | public mRowDefinition(jGrid parent,double height, GridUnitType type = GridUnitType.Star) 18 | { 19 | this.parent = parent; 20 | this.Height = new GridLength(height, type); 21 | } 22 | 23 | public string Label { get; set; } 24 | } -------------------------------------------------------------------------------- /mClasses/mTreeViewItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Avalonia.Controls; 3 | using Xamlade.LinkWorkers; 4 | using Xamlade.mClasses; 5 | 6 | namespace Xamlade.jClasses; 7 | 8 | //Модифицированные элементы дерева со встроенными jControl 9 | public class mTreeViewItem : TreeViewItem, MControl 10 | { 11 | public mTreeViewItem() 12 | { 13 | } 14 | 15 | protected override Type StyleKeyOverride => typeof(TreeViewItem); 16 | 17 | // public JControl element { get; set; } 18 | public Beholder Beholder { get; set; } 19 | 20 | 21 | public mTreeViewItem(JControl element) 22 | { 23 | this.Beholder = element.Beholder; 24 | // this.Name = $"{Beholder.element.Name}_mTree"; 25 | Header = element.Name; 26 | //Обратная связь с jElement 27 | element.Beholder.mTreeItem = this; 28 | } 29 | 30 | public string Label { get; set; } 31 | } -------------------------------------------------------------------------------- /qodana.yaml: -------------------------------------------------------------------------------- 1 | #-------------------------------------------------------------------------------# 2 | # Qodana analysis is configured by qodana.yaml file # 3 | # https://www.jetbrains.com/help/qodana/qodana-yaml.html # 4 | #-------------------------------------------------------------------------------# 5 | version: "1.0" 6 | 7 | #Specify inspection profile for code analysis 8 | profile: 9 | name: qodana.starter 10 | 11 | #Enable inspections 12 | #include: 13 | # - name: 14 | 15 | #Disable inspections 16 | #exclude: 17 | # - name: 18 | # paths: 19 | # - 20 | 21 | #Execute shell command before Qodana execution (Applied in CI/CD pipeline) 22 | #bootstrap: sh ./prepare-qodana.sh 23 | 24 | #Install IDE plugins before Qodana execution (Applied in CI/CD pipeline) 25 | #plugins: 26 | # - id: #(plugin id can be found at https://plugins.jetbrains.com) 27 | 28 | #Specify Qodana linter for analysis (Applied in CI/CD pipeline) 29 | linter: jetbrains/qodana-dotnet:latest 30 | --------------------------------------------------------------------------------