예제 #1
0
 static void HostedMain()
 {
     //Initialize sync context
     SynchronizationContext.SetSynchronizationContext(new WindowsFormsSynchronizationContext());
     var comm = new CommChannel(Console.OpenStandardInput(), Console.OpenStandardOutput());
     Console.SetOut(new NullTextWriter());
     Console.SetError(new NullTextWriter());
     comm.Disposed += () => Process.GetCurrentProcess().Kill();
     comm.SendMessage(new StateMessage("Staying awhile and listening..."));
     var service = new AvaloniaAppHost(comm);
     service.Start();
     Application.Run();
 }
예제 #2
0
 internal HostedAppModel(AvaloniaAppHost host)
 {
     _host      = host;
     Background = Settings.Background;
 }
예제 #3
0
 internal HostedAppModel(AvaloniaAppHost host)
 {
     _host = host;
     Background = Settings.Background;
 }