UiInstance.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. using System.Windows.Media;
  3. using System.Windows.Media.Imaging;
  4. using Aitex.Common.Util;
  5. using Aitex.Core.WCF;
  6. using Venus_Simulator.Views;
  7. using MECF.Framework.UI.Core.Applications;
  8. using System.Configuration;
  9. using Venus_Core;
  10. namespace Venus_Simulator.Instances
  11. {
  12. class UiInstance : IUiInstance
  13. {
  14. public string LayoutFile
  15. {
  16. get
  17. {
  18. var section = ConfigurationManager.GetSection("customSettings") as System.Collections.Specialized.NameValueCollection;
  19. ConfigType type = (ConfigType)Convert.ToInt32(section["SimulatorType"]);
  20. switch (type)
  21. {
  22. case ConfigType.VenusSE:
  23. return PathManager.GetCfgDir() + "UILayout_SE.xml";
  24. case ConfigType.VenusDE:
  25. return PathManager.GetCfgDir() + "UILayout_DE.xml";
  26. default:
  27. return PathManager.GetCfgDir() + "UILayout.xml";
  28. }
  29. }
  30. }
  31. public string SystemName => "Simulator";
  32. public bool EnableAccountModule => false;
  33. public ImageSource MainIcon { get; set; }
  34. public bool MaxSizeShow { get; } = true;
  35. public UiInstance()
  36. {
  37. MainIcon = new BitmapImage(new Uri("pack://application:,,,/Venus_Simulator;component/Resources/simulator.ico"));
  38. }
  39. }
  40. }