Browse Source
* Define SupportedOSVersion variables shared between projects * Rename MobileSandbox to Avalonia.SingleProjectSandboxpull/15331/head
committed by
GitHub
47 changed files with 176 additions and 133 deletions
@ -1,13 +0,0 @@ |
|||||
using System; |
|
||||
using Android.App; |
|
||||
using Android.Content.PM; |
|
||||
using Android.OS; |
|
||||
using Avalonia; |
|
||||
using Avalonia.Android; |
|
||||
|
|
||||
namespace MobileSandbox; |
|
||||
|
|
||||
[Activity(Label = "MobileSandbox.Android", Theme = "@style/Theme.AppCompat.NoActionBar", MainLauncher = true, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize)] |
|
||||
public class MainActivity : AvaloniaMainActivity<App> |
|
||||
{ |
|
||||
} |
|
||||
@ -1,21 +0,0 @@ |
|||||
using System; |
|
||||
using Avalonia; |
|
||||
|
|
||||
namespace MobileSandbox.Desktop |
|
||||
{ |
|
||||
static class Program |
|
||||
{ |
|
||||
[STAThread] |
|
||||
static int Main(string[] args) => |
|
||||
BuildAvaloniaApp() |
|
||||
.StartWithClassicDesktopLifetime(args); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// This method is needed for IDE previewer infrastructure
|
|
||||
/// </summary>
|
|
||||
public static AppBuilder BuildAvaloniaApp() |
|
||||
=> AppBuilder.Configure<App>() |
|
||||
.UsePlatformDetect() |
|
||||
.LogToTrace(); |
|
||||
} |
|
||||
} |
|
||||
@ -1,20 +0,0 @@ |
|||||
using System; |
|
||||
using Avalonia; |
|
||||
using Avalonia.Tizen; |
|
||||
using ElmSharp; |
|
||||
using SkiaSharp; |
|
||||
using Tizen.Applications; |
|
||||
|
|
||||
namespace MobileSandbox; |
|
||||
|
|
||||
class Program : NuiTizenApplication<App> |
|
||||
{ |
|
||||
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) => |
|
||||
base.CustomizeAppBuilder(builder); |
|
||||
|
|
||||
static void Main(string[] args) |
|
||||
{ |
|
||||
var app = new Program(); |
|
||||
app.Run(args); |
|
||||
} |
|
||||
} |
|
||||
@ -1,16 +0,0 @@ |
|||||
using Foundation; |
|
||||
using UIKit; |
|
||||
using Avalonia; |
|
||||
using Avalonia.Controls; |
|
||||
using Avalonia.iOS; |
|
||||
|
|
||||
namespace MobileSandbox |
|
||||
{ |
|
||||
// The UIApplicationDelegate for the application. This class is responsible for launching the
|
|
||||
// User Interface of the application, as well as listening (and optionally responding) to
|
|
||||
// application events from iOS.
|
|
||||
[Register("AppDelegate")] |
|
||||
public partial class AppDelegate : AvaloniaAppDelegate<App> |
|
||||
{ |
|
||||
} |
|
||||
} |
|
||||
@ -1,15 +0,0 @@ |
|||||
using UIKit; |
|
||||
|
|
||||
namespace MobileSandbox.iOS |
|
||||
{ |
|
||||
public class Application |
|
||||
{ |
|
||||
// This is the main entry point of the application.
|
|
||||
static void Main(string[] args) |
|
||||
{ |
|
||||
// if you want to use a different Application Delegate class from "AppDelegate"
|
|
||||
// you can specify it here.
|
|
||||
UIApplication.Main(args, null, typeof(AppDelegate)); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
Binary file not shown.
@ -1,7 +1,7 @@ |
|||||
<Application xmlns="https://github.com/avaloniaui" |
<Application xmlns="https://github.com/avaloniaui" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
Name="Mobile Sandbox" |
Name="Single Project Sandbox" |
||||
x:Class="MobileSandbox.App"> |
x:Class="SingleProjectSandbox.App"> |
||||
<Application.Styles> |
<Application.Styles> |
||||
<FluentTheme /> |
<FluentTheme /> |
||||
</Application.Styles> |
</Application.Styles> |
||||
@ -1,8 +1,8 @@ |
|||||
<UserControl x:Class="MobileSandbox.MainView" |
<UserControl x:Class="SingleProjectSandbox.MainView" |
||||
xmlns="https://github.com/avaloniaui" |
xmlns="https://github.com/avaloniaui" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:mobileSandbox="using:MobileSandbox" |
xmlns:local="using:SingleProjectSandbox" |
||||
x:DataType="mobileSandbox:MainView"> |
x:DataType="local:MainView"> |
||||
<StackPanel Margin="100 50" Spacing="50"> |
<StackPanel Margin="100 50" Spacing="50"> |
||||
<TextBlock Text="Login" Foreground="White" /> |
<TextBlock Text="Login" Foreground="White" /> |
||||
<TextBox TextInputOptions.Multiline="True" AcceptsReturn="True" Watermark="Text" Height="200" TextWrapping="Wrap"/> |
<TextBox TextInputOptions.Multiline="True" AcceptsReturn="True" Watermark="Text" Height="200" TextWrapping="Wrap"/> |
||||
@ -1,11 +1,10 @@ |
|||||
<Window xmlns="https://github.com/avaloniaui" |
<Window xmlns="https://github.com/avaloniaui" |
||||
xmlns:local="clr-namespace:MobileSandbox" |
xmlns:local="using:SingleProjectSandbox" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
CanResize="False" |
CanResize="False" |
||||
Width="720" Height="1280" |
Width="720" Height="1280" |
||||
Title="Mobile Sandbox" |
Title="Single Project Sandbox" |
||||
Icon="/Assets/test_icon.ico" |
|
||||
WindowStartupLocation="CenterScreen" |
WindowStartupLocation="CenterScreen" |
||||
x:Class="MobileSandbox.MainWindow"> |
x:Class="SingleProjectSandbox.MainWindow"> |
||||
<local:MainView /> |
<local:MainView /> |
||||
</Window> |
</Window> |
||||
@ -1,7 +1,7 @@ |
|||||
using Avalonia.Controls; |
using Avalonia.Controls; |
||||
using Avalonia.Markup.Xaml; |
using Avalonia.Markup.Xaml; |
||||
|
|
||||
namespace MobileSandbox; |
namespace SingleProjectSandbox; |
||||
|
|
||||
public partial class MainWindow : Window |
public partial class MainWindow : Window |
||||
{ |
{ |
||||
@ -1,5 +1,5 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto"> |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto"> |
||||
<application android:label="MobileSandbox.Android"></application> |
<application android:label="SingleProjectSandbox.Android"></application> |
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
||||
</manifest> |
</manifest> |
||||
@ -0,0 +1,15 @@ |
|||||
|
using Android.App; |
||||
|
using Android.Content.PM; |
||||
|
using Avalonia; |
||||
|
using Avalonia.Android; |
||||
|
|
||||
|
namespace SingleProjectSandbox; |
||||
|
|
||||
|
[Activity(Label = "SingleProjectSandbox.Android", Theme = "@style/Theme.AppCompat.NoActionBar", MainLauncher = true, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize)] |
||||
|
public class MainActivity : AvaloniaMainActivity<App> |
||||
|
{ |
||||
|
protected override AppBuilder CreateAppBuilder() |
||||
|
{ |
||||
|
return App.BuildAvaloniaApp().UseAndroid(); |
||||
|
} |
||||
|
} |
||||
@ -1,19 +1,15 @@ |
|||||
using System.Runtime.Versioning; |
using System.Runtime.Versioning; |
||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
using Avalonia; |
|
||||
using Avalonia.Browser; |
using Avalonia.Browser; |
||||
using MobileSandbox; |
using SingleProjectSandbox; |
||||
|
|
||||
[assembly:SupportedOSPlatform("browser")] |
[assembly:SupportedOSPlatform("browser")] |
||||
|
|
||||
internal partial class Program |
internal static class Program |
||||
{ |
{ |
||||
public static async Task Main(string[] args) |
public static async Task Main(string[] args) |
||||
{ |
{ |
||||
await BuildAvaloniaApp() |
await App.BuildAvaloniaApp() |
||||
.StartBrowserAppAsync("out"); |
.StartBrowserAppAsync("out"); |
||||
} |
} |
||||
|
|
||||
public static AppBuilder BuildAvaloniaApp() |
|
||||
=> AppBuilder.Configure<App>(); |
|
||||
} |
} |
||||
|
Before Width: | Height: | Size: 708 B After Width: | Height: | Size: 708 B |
|
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
@ -0,0 +1,18 @@ |
|||||
|
using System; |
||||
|
using Avalonia; |
||||
|
|
||||
|
namespace SingleProjectSandbox; |
||||
|
|
||||
|
internal static class Program |
||||
|
{ |
||||
|
[STAThread] |
||||
|
static int Main(string[] args) => |
||||
|
BuildAvaloniaApp() |
||||
|
.StartWithClassicDesktopLifetime(args); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// This method is needed for IDE previewer infrastructure
|
||||
|
/// </summary>
|
||||
|
public static AppBuilder BuildAvaloniaApp() |
||||
|
=> App.BuildAvaloniaApp().UsePlatformDetect(); |
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
using Avalonia; |
||||
|
using Avalonia.Tizen; |
||||
|
|
||||
|
namespace SingleProjectSandbox; |
||||
|
|
||||
|
internal class Program : NuiTizenApplication<App> |
||||
|
{ |
||||
|
protected override AppBuilder CreateAppBuilder() => |
||||
|
App.BuildAvaloniaApp().UseTizen(); |
||||
|
|
||||
|
internal static void Main(string[] args) |
||||
|
{ |
||||
|
var app = new Program(); |
||||
|
app.Run(args); |
||||
|
} |
||||
|
} |
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@ -1,7 +1,7 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<manifest package="com.avalonia.control-catalog" version="1.0.0" api-version="8.0" xmlns="http://tizen.org/ns/packages"> |
<manifest package="com.avalonia.control-catalog" version="1.0.0" api-version="8.0" xmlns="http://tizen.org/ns/packages"> |
||||
<profile name="common" /> |
<profile name="common" /> |
||||
<ui-application appid="com.avalonia.mobilesandbox" exec="MobileSandbox.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" hw-acceleration="on" launch_mode="single"> |
<ui-application appid="com.avalonia.SingleProjectSandbox" exec="SingleProjectSandbox.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" hw-acceleration="on" launch_mode="single"> |
||||
<label>Avalonia</label> |
<label>Avalonia</label> |
||||
<icon>Avalonia.png</icon> |
<icon>Avalonia.png</icon> |
||||
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" /> |
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" /> |
||||
@ -0,0 +1,24 @@ |
|||||
|
using Foundation; |
||||
|
using Avalonia; |
||||
|
using Avalonia.iOS; |
||||
|
using UIKit; |
||||
|
|
||||
|
namespace SingleProjectSandbox; |
||||
|
|
||||
|
// The UIApplicationDelegate for the application. This class is responsible for launching the
|
||||
|
// User Interface of the application, as well as listening (and optionally responding) to
|
||||
|
// application events from iOS.
|
||||
|
[Register("AppDelegate")] |
||||
|
public class AppDelegate : AvaloniaAppDelegate<App> |
||||
|
{ |
||||
|
protected override AppBuilder CreateAppBuilder() => |
||||
|
App.BuildAvaloniaApp().UseiOS(); |
||||
|
|
||||
|
// This is the main entry point of the application.
|
||||
|
internal static void Main(string[] args) |
||||
|
{ |
||||
|
// if you want to use a different Application Delegate class from "AppDelegate"
|
||||
|
// you can specify it here.
|
||||
|
UIApplication.Main(args, null, typeof(AppDelegate)); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,6 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||
|
<plist version="1.0"> |
||||
|
<dict> |
||||
|
</dict> |
||||
|
</plist> |
||||
@ -0,0 +1,18 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||
|
<plist version="1.0"> |
||||
|
<dict> |
||||
|
<key>CFBundleShortVersionString</key> |
||||
|
<string>1.0</string> |
||||
|
<key>CFBundleDevelopmentRegion</key> |
||||
|
<string>en</string> |
||||
|
<key>CFBundleInfoDictionaryVersion</key> |
||||
|
<string>6.0</string> |
||||
|
<key>CFBundlePackageType</key> |
||||
|
<string>APPL</string> |
||||
|
<key>CFBundleSignature</key> |
||||
|
<string>????</string> |
||||
|
<key>NSPrincipalClass</key> |
||||
|
<string>NSApplication</string> |
||||
|
</dict> |
||||
|
</plist> |
||||
@ -0,0 +1,13 @@ |
|||||
|
using Avalonia; |
||||
|
|
||||
|
namespace SingleProjectSandbox; |
||||
|
|
||||
|
internal static class Program |
||||
|
{ |
||||
|
internal static int Main(string[] args) => |
||||
|
App.BuildAvaloniaApp() |
||||
|
.UseAvaloniaNative() |
||||
|
.UseSkia() |
||||
|
.StartWithClassicDesktopLifetime(args); |
||||
|
} |
||||
|
|
||||
@ -1,16 +1,19 @@ |
|||||
<Project Sdk="Microsoft.NET.Sdk"> |
<Project Sdk="Microsoft.NET.Sdk"> |
||||
<PropertyGroup> |
<PropertyGroup> |
||||
<TargetFrameworks>net8.0;net8.0-android;net8.0-browser;net8.0-ios</TargetFrameworks> |
<TargetFrameworks>$(AvsCurrentTargetFramework);$(AvsCurrentAndroidTargetFramework);$(AvsCurrentBrowserTargetFramework)</TargetFrameworks> |
||||
|
<TargetFrameworks Condition="'$(IncludeIOSTargetSamples)' == 'true'">$(TargetFrameworks);$(AvsCurrentIOSTargetFramework)</TargetFrameworks> |
||||
|
<TargetFrameworks Condition="'$(IncludeMacTargetSamples)' == 'true'">$(TargetFrameworks);$(AvsCurrentMacOSTargetFramework)</TargetFrameworks> |
||||
|
<TargetFrameworks Condition="'$(IncludeTizenTargetSamples)' == 'true'">$(TargetFrameworks);$(AvsCurrentTizenTargetFramework)</TargetFrameworks> |
||||
<OutputType>Exe</OutputType> |
<OutputType>Exe</OutputType> |
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
||||
<Nullable>enable</Nullable> |
<Nullable>enable</Nullable> |
||||
<IncludeAvaloniaGenerators>true</IncludeAvaloniaGenerators> |
<IncludeAvaloniaGenerators>true</IncludeAvaloniaGenerators> |
||||
</PropertyGroup> |
</PropertyGroup> |
||||
|
|
||||
<PropertyGroup> |
<PropertyGroup> |
||||
<AvaloniaSingleProject>true</AvaloniaSingleProject> |
<AvaloniaSingleProject>true</AvaloniaSingleProject> |
||||
<ApplicationTitle>Mobile Sandbox</ApplicationTitle> |
<ApplicationTitle>Single Project Sandbox</ApplicationTitle> |
||||
<ApplicationId>Avalonia.MobileSandbox</ApplicationId> |
<ApplicationId>Avalonia.SingleProjectSandbox</ApplicationId> |
||||
</PropertyGroup> |
</PropertyGroup> |
||||
|
|
||||
<ItemGroup> |
<ItemGroup> |
||||
Loading…
Reference in new issue