Ejemplo n.º 1
0
            public Application GetConfiguredApp(IAvaloniaRemoteTransportConnection transport, object obj)
            {
                var builder = (AppBuilderBase <T>)obj;

                builder.UseWindowingSubsystem(() => PreviewerWindowingPlatform.Initialize(transport));
                builder.SetupWithoutStarting();
                return(builder.Instance);
            }
            public Application GetConfiguredApp(IAvaloniaRemoteTransportConnection transport,
                                                CommandLineArgs args, object obj)
            {
                var builder = (AppBuilderBase <T>)obj;

                if (args.Method == Methods.AvaloniaRemote)
                {
                    builder.UseWindowingSubsystem(() => PreviewerWindowingPlatform.Initialize(transport));
                }
                if (args.Method == Methods.Win32)
                {
                    builder.UseWindowingSubsystem("Avalonia.Win32");
                }
                builder.SetupWithoutStarting();
                return(builder.Instance);
            }
Ejemplo n.º 3
0
            public IAvaloniaRemoteTransportConnection ConfigureApp(IAvaloniaRemoteTransportConnection transport,
                                                                   CommandLineArgs args, object obj)
            {
                var builder = (AppBuilderBase <T>)obj;

                if (args.Method == Methods.AvaloniaRemote)
                {
                    builder.UseWindowingSubsystem(() => PreviewerWindowingPlatform.Initialize(transport));
                }
                if (args.Method == Methods.Html)
                {
                    transport = new HtmlWebSocketTransport(transport,
                                                           args.HtmlMethodListenUri ?? new Uri("http://localhost:5000"));
                    builder.UseWindowingSubsystem(() =>
                                                  PreviewerWindowingPlatform.Initialize(transport));
                }

                if (args.Method == Methods.Win32)
                {
                    builder.UseWindowingSubsystem("Avalonia.Win32");
                }
                builder.SetupWithoutStarting();
                return(transport);
            }