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" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
Name="Mobile Sandbox" |
|||
x:Class="MobileSandbox.App"> |
|||
Name="Single Project Sandbox" |
|||
x:Class="SingleProjectSandbox.App"> |
|||
<Application.Styles> |
|||
<FluentTheme /> |
|||
</Application.Styles> |
|||
@ -1,8 +1,8 @@ |
|||
<UserControl x:Class="MobileSandbox.MainView" |
|||
<UserControl x:Class="SingleProjectSandbox.MainView" |
|||
xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:mobileSandbox="using:MobileSandbox" |
|||
x:DataType="mobileSandbox:MainView"> |
|||
xmlns:local="using:SingleProjectSandbox" |
|||
x:DataType="local:MainView"> |
|||
<StackPanel Margin="100 50" Spacing="50"> |
|||
<TextBlock Text="Login" Foreground="White" /> |
|||
<TextBox TextInputOptions.Multiline="True" AcceptsReturn="True" Watermark="Text" Height="200" TextWrapping="Wrap"/> |
|||
@ -1,11 +1,10 @@ |
|||
<Window xmlns="https://github.com/avaloniaui" |
|||
xmlns:local="clr-namespace:MobileSandbox" |
|||
xmlns:local="using:SingleProjectSandbox" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
CanResize="False" |
|||
Width="720" Height="1280" |
|||
Title="Mobile Sandbox" |
|||
Icon="/Assets/test_icon.ico" |
|||
Title="Single Project Sandbox" |
|||
WindowStartupLocation="CenterScreen" |
|||
x:Class="MobileSandbox.MainWindow"> |
|||
x:Class="SingleProjectSandbox.MainWindow"> |
|||
<local:MainView /> |
|||
</Window> |
|||
@ -1,7 +1,7 @@ |
|||
using Avalonia.Controls; |
|||
using Avalonia.Markup.Xaml; |
|||
|
|||
namespace MobileSandbox; |
|||
namespace SingleProjectSandbox; |
|||
|
|||
public partial class MainWindow : Window |
|||
{ |
|||
@ -1,5 +1,5 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<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" /> |
|||
</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.Threading.Tasks; |
|||
using Avalonia; |
|||
using Avalonia.Browser; |
|||
using MobileSandbox; |
|||
using SingleProjectSandbox; |
|||
|
|||
[assembly:SupportedOSPlatform("browser")] |
|||
|
|||
internal partial class Program |
|||
internal static class Program |
|||
{ |
|||
public static async Task Main(string[] args) |
|||
{ |
|||
await BuildAvaloniaApp() |
|||
await App.BuildAvaloniaApp() |
|||
.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"?> |
|||
<manifest package="com.avalonia.control-catalog" version="1.0.0" api-version="8.0" xmlns="http://tizen.org/ns/packages"> |
|||
<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> |
|||
<icon>Avalonia.png</icon> |
|||
<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"> |
|||
<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> |
|||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
|||
<Nullable>enable</Nullable> |
|||
<IncludeAvaloniaGenerators>true</IncludeAvaloniaGenerators> |
|||
</PropertyGroup> |
|||
|
|||
|
|||
<PropertyGroup> |
|||
<AvaloniaSingleProject>true</AvaloniaSingleProject> |
|||
<ApplicationTitle>Mobile Sandbox</ApplicationTitle> |
|||
<ApplicationId>Avalonia.MobileSandbox</ApplicationId> |
|||
<ApplicationTitle>Single Project Sandbox</ApplicationTitle> |
|||
<ApplicationId>Avalonia.SingleProjectSandbox</ApplicationId> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
Loading…
Reference in new issue