Program.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Copyright (c) The Perspex Project. All rights reserved.
  2. // Licensed under the MIT license. See licence.md file in the project root for full license information.
  3. using System;
  4. using System.Linq;
  5. using System.IO;
  6. using System.Reactive.Linq;
  7. using Perspex;
  8. using Perspex.Animation;
  9. using Perspex.Collections;
  10. using Perspex.Controls;
  11. using Perspex.Controls.Html;
  12. using Perspex.Controls.Primitives;
  13. using Perspex.Controls.Shapes;
  14. using Perspex.Controls.Templates;
  15. using Perspex.Diagnostics;
  16. using Perspex.Layout;
  17. using Perspex.Media;
  18. using Perspex.Media.Imaging;
  19. #if PERSPEX_GTK
  20. using Perspex.Gtk;
  21. #endif
  22. using ReactiveUI;
  23. namespace TestApplication
  24. {
  25. internal class Program
  26. {
  27. private static void Main(string[] args)
  28. {
  29. // The version of ReactiveUI currently included is for WPF and so expects a WPF
  30. // dispatcher. This makes sure it's initialized.
  31. System.Windows.Threading.Dispatcher foo = System.Windows.Threading.Dispatcher.CurrentDispatcher;
  32. var app = new App();
  33. if (args.Contains("--gtk"))
  34. {
  35. app.UseGtkSubsystem();
  36. app.UseCairo();
  37. }
  38. else
  39. {
  40. app.UseWin32Subsystem();
  41. // not available until we do the SkiaSharp merge
  42. //if (args.Contains("--skia"))
  43. //{
  44. // app.UseSkia();
  45. //}
  46. //else
  47. {
  48. app.UseDirect2D();
  49. }
  50. }
  51. app.Run();
  52. }
  53. }
  54. }