36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using System;
|
|
using LibVLCSharp.Forms.Shared;
|
|
using Xamarin.Forms.Platform.GTK;
|
|
using Xamarin.Forms.Platform.GTK.Helpers;
|
|
|
|
namespace Aurora.gtk
|
|
{
|
|
class MainClass
|
|
{
|
|
[STAThread]
|
|
public static void Main(string[] args)
|
|
{
|
|
Gtk.Application.Init();
|
|
LibVLCSharpFormsRenderer.Init();
|
|
// For some reason, Xamarin does not pick the LibVLCSharp.Form.Platforms.Gtk assembly as a renderer assembly.
|
|
// Add it manually.
|
|
|
|
//Also css doesn't work without adding the Xaml assembly
|
|
global::Xamarin.Forms.Forms.Init(new[] { typeof(LibVLCSharp.Forms.Platforms.GTK.VideoViewRenderer).Assembly, typeof(Xamarin.Forms.Xaml.ArrayExtension).Assembly });
|
|
|
|
if (PlatformHelper.GetGTKPlatform() == GTKPlatform.Windows)
|
|
{
|
|
GtkThemes.LoadCustomTheme("Themes/gtkrc-dark");
|
|
}
|
|
|
|
var app = new App();
|
|
var window = new FormsWindow();
|
|
window.LoadApplication(app);
|
|
window.SetApplicationTitle("Aurora");
|
|
window.Show();
|
|
|
|
Gtk.Application.Run();
|
|
}
|
|
}
|
|
}
|