This repository has been archived on 2020-12-20. You can view files and clone it, but cannot push or open issues or pull requests.
aurora-sharp-desktop/Aurora.gtk/Program.cs

37 lines
1.0 KiB
C#
Raw Normal View History

2019-05-16 22:07:36 +00:00
using System;
2019-05-22 22:59:15 +00:00
using LibVLCSharp.Forms.Shared;
2019-05-16 22:07:36 +00:00
using Xamarin.Forms;
using Xamarin.Forms.Platform.GTK;
using Xamarin.Forms.Platform.GTK.Helpers;
2019-05-16 22:07:36 +00:00
namespace Aurora.gtk
{
class MainClass
{
[STAThread]
public static void Main(string[] args)
{
Gtk.Application.Init();
2019-05-22 22:59:15 +00:00
LibVLCSharpFormsRenderer.Init();
// For some reason, Xamarin does not pick the LibVLCSharp.Form.Platforms.Gtk assembly as a renderer assembly.
// Add it manually.
global::Xamarin.Forms.Forms.Init(new[] { typeof(LibVLCSharp.Forms.Platforms.GTK.VideoViewRenderer).Assembly });
2019-05-16 22:07:36 +00:00
if (PlatformHelper.GetGTKPlatform() == GTKPlatform.Windows)
{
GtkThemes.LoadCustomTheme("Themes/gtkrc-dark");
}
2019-05-16 22:07:36 +00:00
var app = new App();
var window = new FormsWindow();
window.LoadApplication(app);
window.SetApplicationTitle("Aurora");
window.Show();
Gtk.Application.Run();
}
}
}