diff --git a/Directory.Packages.props b/Directory.Packages.props index 56b7f53..36dbe22 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,35 +1,36 @@ - - - true - 1.1.1.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + true + 1.1.1.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Progrart.Android/Application.cs b/Progrart.Android/Application.cs new file mode 100644 index 0000000..058a9dc --- /dev/null +++ b/Progrart.Android/Application.cs @@ -0,0 +1,22 @@ +using Android.App; +using Android.Runtime; +using Avalonia; +using Avalonia.Android; +using Progrart; + +namespace Progrart.Android +{ + [Application] + public class Application : AvaloniaAndroidApplication + { + protected Application(nint javaReference, JniHandleOwnership transfer) : base(javaReference, transfer) + { + } + + protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) + { + return base.CustomizeAppBuilder(builder) + .WithInterFont(); + } + } +} diff --git a/Progrart.Android/MainActivity.cs b/Progrart.Android/MainActivity.cs index 83165e6..6d5b311 100644 --- a/Progrart.Android/MainActivity.cs +++ b/Progrart.Android/MainActivity.cs @@ -12,11 +12,12 @@ namespace Progrart.Android; RoundIcon = "@drawable/app_icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)] -public class MainActivity : AvaloniaMainActivity +//public class MainActivity : AvaloniaMainActivity +public class MainActivity : AvaloniaMainActivity// { - protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) - { - return base.CustomizeAppBuilder(builder) - .WithInterFont(); - } + //protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) + //{ + // return base.CustomizeAppBuilder(builder) + // .WithInterFont(); + //} } diff --git a/Progrart.Browser/Program.cs b/Progrart.Browser/Program.cs index 959fcf0..ad8b0cc 100644 --- a/Progrart.Browser/Program.cs +++ b/Progrart.Browser/Program.cs @@ -11,6 +11,9 @@ internal sealed partial class Program App.SettingsProvider=new BrowserSettingsProvider(); return BuildAvaloniaApp() .WithInterFont() +#if DEBUG + .WithDeveloperTools() +#endif .StartBrowserAppAsync("out"); } diff --git a/Progrart.Browser/Progrart.Browser.csproj b/Progrart.Browser/Progrart.Browser.csproj index edcaaff..40e8e0b 100644 --- a/Progrart.Browser/Progrart.Browser.csproj +++ b/Progrart.Browser/Progrart.Browser.csproj @@ -10,7 +10,6 @@ - diff --git a/Progrart.Desktop/Progrart.Desktop.csproj b/Progrart.Desktop/Progrart.Desktop.csproj index 3ef6471..b9048fd 100644 --- a/Progrart.Desktop/Progrart.Desktop.csproj +++ b/Progrart.Desktop/Progrart.Desktop.csproj @@ -21,9 +21,10 @@ - - None - All + + + None + All diff --git a/Progrart/App.axaml.cs b/Progrart/App.axaml.cs index e54faf3..e672946 100644 --- a/Progrart/App.axaml.cs +++ b/Progrart/App.axaml.cs @@ -84,7 +84,7 @@ public partial class App : Application // Avoid duplicate validations from both Avalonia and the CommunityToolkit. // More info: https://docs.avaloniaui.net/docs/guides/development-guides/data-validation#manage-validationplugins isDesktop = true; - DisableAvaloniaDataAnnotationValidation(); + //DisableAvaloniaDataAnnotationValidation(); desktop.MainWindow = new MainWindow(); } else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewPlatform) @@ -95,16 +95,16 @@ public partial class App : Application base.OnFrameworkInitializationCompleted(); } - private void DisableAvaloniaDataAnnotationValidation() - { - // Get an array of plugins to remove - var dataValidationPluginsToRemove = - BindingPlugins.DataValidators.OfType().ToArray(); + //private void DisableAvaloniaDataAnnotationValidation() + //{ + // // Get an array of plugins to remove + // var dataValidationPluginsToRemove = + // BindingPlugins.DataValidators.OfType().ToArray(); - // remove each entry found - foreach (var plugin in dataValidationPluginsToRemove) - { - BindingPlugins.DataValidators.Remove(plugin); - } - } + // // remove each entry found + // foreach (var plugin in dataValidationPluginsToRemove) + // { + // BindingPlugins.DataValidators.Remove(plugin); + // } + //} } \ No newline at end of file diff --git a/Progrart/Pages/ProgrartEditorPage.axaml.cs b/Progrart/Pages/ProgrartEditorPage.axaml.cs index b7a2e53..6904dd4 100644 --- a/Progrart/Pages/ProgrartEditorPage.axaml.cs +++ b/Progrart/Pages/ProgrartEditorPage.axaml.cs @@ -202,7 +202,6 @@ public partial class ProgrartEditorPage : UserControl, ITabPage, IEditorPage { if (LayoutButtonV.IsChecked == true) { - direction = LayoutDirection.Vertical; ApplyLayout(); } diff --git a/Progrart/Progrart.csproj b/Progrart/Progrart.csproj index 9d9e9cb..6fe6c5e 100644 --- a/Progrart/Progrart.csproj +++ b/Progrart/Progrart.csproj @@ -21,7 +21,7 @@ - + None All diff --git a/Progrart/Views/MainWindow.axaml.cs b/Progrart/Views/MainWindow.axaml.cs index d562dd6..d62899a 100644 --- a/Progrart/Views/MainWindow.axaml.cs +++ b/Progrart/Views/MainWindow.axaml.cs @@ -8,7 +8,8 @@ public partial class MainWindow : Window { InitializeComponent(); this.ExtendClientAreaToDecorationsHint = true; - this.ExtendClientAreaChromeHints = Avalonia.Platform.ExtendClientAreaChromeHints.PreferSystemChrome; + //this.WindowDecorations= WindowDecorations. + //this.ExtendClientAreaChromeHints = Avalonia.Platform.ExtendClientAreaChromeHints.PreferSystemChrome; this.Closing += MainWindow_Closing; }