示例#1
0
 public static T UseGtk3 <T>(this AppBuilderBase <T> builder, bool deferredRendering = true, ICustomGtk3NativeLibraryResolver resolver = null)
     where T : AppBuilderBase <T>, new()
 {
     Resolver.Custom = resolver;
     Gtk3Platform.UseDeferredRendering = deferredRendering;
     return(builder.UseWindowingSubsystem(Gtk3Platform.Initialize, "GTK3"));
 }
示例#2
0
 public ShellAppBuilder(AppBuilderBase <TAppBuilder> appBuilder, ApplicationInfo appInfo, string[] args)
 {
     this.appBuilder      = appBuilder ?? throw new ArgumentNullException(nameof(appBuilder));
     this.appInfo         = appInfo;
     this.args            = args;
     containerBuilder     = new ContainerBuilder();
     configurationBuilder = new ConfigurationBuilder();
 }
示例#3
0
    public static ShellAppBuilder <TAppBuilder> ConfigureShellApp <TAppBuilder>(this AppBuilderBase <TAppBuilder> appBuilder, string[] args, Func <ApplicationInfo, ApplicationInfo>?option = null)
        where TAppBuilder : AppBuilderBase <TAppBuilder>, new()
    {
        var appInfo = ApplicationInfo.FromEntryAssembly();

        appInfo = option?.Invoke(appInfo) ?? appInfo;

        return(new ShellAppBuilder <TAppBuilder>(appBuilder, appInfo, args));
    }
示例#4
0
 public static T UseFFMpeg <T>(this AppBuilderBase <T> b, FFOptions fFMpegOptions)
     where T : AppBuilderBase <T>, new()
 {
     return(b.AfterSetup(_ =>
     {
         GlobalFFOptions.Configure(fFMpegOptions);
         FFMpegHelper.VerifyFFMpegExists(fFMpegOptions);
     }));
 }
示例#5
0
        public static T UseVLCSharp <T>(this AppBuilderBase <T> b, LibVLCAvaloniaRenderingOptions?renderingOptions = null, string libvlcDirectoryPath = null)
            where T : AppBuilderBase <T>, new()
        {
            if (renderingOptions != null)
            {
                LibVLCAvaloniaOptions.RenderingOptions = renderingOptions.Value;
            }

            return(b.AfterSetup(_ => Core.Initialize(libvlcDirectoryPath)));
        }
        public static T UseVLCSharp <T>(this AppBuilderBase <T> b, bool?useCutomDrawOperationRendering = null, string libvlcDirectoryPath = null)
            where T : AppBuilderBase <T>, new()
        {
            if (useCutomDrawOperationRendering != null)
            {
                LibVLCAvaloniaOptions.UseCustomDrawOperationRendering = useCutomDrawOperationRendering.Value;
            }

            return(b.AfterSetup(_ => Core.Initialize(libvlcDirectoryPath)));
        }
示例#7
0
        public static AppBuilderBase <T> WithAvaloniaAutomation <T>(this AppBuilderBase <T> aThis)
            where T : AppBuilderBase <T>, new()
        {
            var xEngine = new AutomationEngineImpl();

            AvaloniaLocator.CurrentMutable.Bind <IAutomationEngine>().ToConstant(xEngine);

            xEngine.Initialize();
            aThis.Instance.OnExit += (a, b) => xEngine.Shutdown();

            return(aThis);
        }
示例#8
0
 public static T UseGtk3 <T>(this AppBuilderBase <T> builder, Gtk3PlatformOptions options = null)
     where T : AppBuilderBase <T>, new()
 {
     return(builder.UseWindowingSubsystem(() => Gtk3Platform.Initialize(options ?? new Gtk3PlatformOptions()),
                                          "GTK3"));
 }
示例#9
0
 public static TAppBuilder UseMovere <TAppBuilder>(this AppBuilderBase <TAppBuilder> builder)
     where TAppBuilder : AppBuilderBase <TAppBuilder>, new() =>
 builder.AfterSetup(RegisterMovereDialogs);
示例#10
0
 private static void RegisterMovereDialogs <TAppBuilder>(AppBuilderBase <TAppBuilder> builder)
     where TAppBuilder : AppBuilderBase <TAppBuilder>, new() =>
 AvaloniaLocator.CurrentMutable.Bind <ISystemDialogImpl>().ToSingleton <MovereSystemDialogImpl>();
示例#11
0
 public static T UseVLCSharp <T>(this AppBuilderBase <T> b, string libvlcDirectoryPath = null)
     where T : AppBuilderBase <T>, new()
 {
     return(b.AfterSetup(_ => Core.Initialize(libvlcDirectoryPath)));
 }