AppSettings.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. namespace PicView.Core.Config;
  2. public class AppSettings
  3. {
  4. public double Version { get; set; } = SettingsConfiguration.CurrentSettingsVersion;
  5. public WindowProperties? WindowProperties { get; set; }
  6. public UIProperties? UIProperties { get; set; }
  7. public Theme? Theme { get; set; }
  8. public Gallery? Gallery { get; set; }
  9. public ImageScaling? ImageScaling { get; set; }
  10. public Sorting? Sorting { get; set; }
  11. public Zoom? Zoom { get; set; }
  12. public StartUp? StartUp { get; set; }
  13. }
  14. public class WindowProperties
  15. {
  16. public double Top { get; set; } = 0;
  17. public double Left { get; set; } = 0;
  18. public double Width { get; set; } = 750;
  19. public double Height { get; set; } = 1024;
  20. public bool AutoFit { get; set; } = true;
  21. public bool TopMost { get; set; } = false;
  22. public bool Maximized { get; set; } = false;
  23. public bool Fullscreen { get; set; } = false;
  24. public bool KeepCentered { get; set; } = false;
  25. public double Margin { get; set; } = -1;
  26. }
  27. public class UIProperties
  28. {
  29. public string UserLanguage { get; set; } = "en";
  30. public bool ShowInterface { get; set; } = true;
  31. public bool ShowAltInterfaceButtons { get; set; } = true;
  32. public bool ShowBottomNavBar { get; set; } = true;
  33. public bool IsTaskbarProgressEnabled { get; set; } = true;
  34. public double NavSpeed { get; set; } = 0.3;
  35. public bool Looping { get; set; } = false;
  36. public int BgColorChoice { get; set; } = 0;
  37. public double SlideShowTimer { get; set; } = 5000;
  38. public bool OpenInSameWindow { get; set; } = false;
  39. public bool ShowConfirmationOnEsc { get; set; } = false;
  40. public bool ShowRecycleConfirmation { get; set; } = false;
  41. public bool ShowPermanentDeletionConfirmation { get; set; } = true;
  42. public bool IsConstrainBackgroundColorEnabled { get; set; } = true;
  43. }
  44. public class Theme
  45. {
  46. public bool Dark { get; set; } = true;
  47. public int ColorTheme { get; set; } = 3;
  48. public bool UseSystemTheme { get; set; } = false;
  49. public bool GlassTheme { get; set; } = false;
  50. }
  51. public class Gallery
  52. {
  53. public bool IsBottomGalleryShown { get; set; } = false;
  54. public bool ShowBottomGalleryInHiddenUI { get; set; } = false;
  55. public double BottomGalleryItemSize { get; set; } = 37;
  56. public double ExpandedGalleryItemSize { get; set; } = 23;
  57. public string FullGalleryStretchMode { get; set; } = "Uniform";
  58. public string BottomGalleryStretchMode { get; set; } = "Uniform";
  59. }
  60. public class ImageScaling
  61. {
  62. public bool StretchImage { get; set; } = false;
  63. public bool IsScalingSetToNearestNeighbor { get; set; } = false;
  64. public bool ShowImageSideBySide { get; set; } = false;
  65. }
  66. public class Zoom
  67. {
  68. public double ZoomSpeed { get; set; } = 0.3;
  69. public bool AvoidZoomingOut { get; set; } = false;
  70. public bool CtrlZoom { get; set; } = true;
  71. public bool HorizontalReverseScroll { get; set; } = true;
  72. public bool ScrollEnabled { get; set; } = false;
  73. public bool IsUsingTouchPad { get; set; } = false;
  74. }
  75. public class Sorting
  76. {
  77. public bool Name { get; set; } = true;
  78. public bool Size { get; set; } = false;
  79. public bool CreationTime { get; set; } = false;
  80. public bool LastAccessTime { get; set; } = false;
  81. public bool LastWriteTime { get; set; } = false;
  82. public bool Random { get; set; } = false;
  83. public bool Ascending { get; set; } = true;
  84. public int SortPreference { get; set; } = 0;
  85. public bool IncludeSubDirectories { get; set; } = false;
  86. }
  87. public class StartUp
  88. {
  89. public bool OpenLastFile { get; set; } = false;
  90. public bool OpenSpecificFile { get; set; } = false;
  91. public string OpenSpecificString { get; set; } = "";
  92. public string? LastFile { get; set; } = "";
  93. }