add image editing

This commit is contained in:
Oleksandr Bezdieniezhnykh
2024-08-07 13:22:17 +03:00
parent c72f7fc265
commit a81a6f881d
11 changed files with 146 additions and 57 deletions
+10 -2
View File
@@ -1,5 +1,4 @@
using System.IO;
using System.Reflection;
using System.Text;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
@@ -28,6 +27,9 @@ public class Config
public double RightPanelWidth { get; set; }
public bool ShowHelpOnStart { get; set; }
public List<string> VideoFormats { get; set; }
public List<string> ImageFormats { get; set; }
}
public interface IConfigRepository
@@ -49,6 +51,9 @@ public class FileConfigRepository(ILogger<FileConfigRepository> logger) : IConfi
private static readonly Size DefaultWindowSize = new(1280, 720);
private static readonly Point DefaultWindowLocation = new(100, 100);
private static readonly List<string> DefaultVideoFormats = ["mp4", "mov", "avi"];
private static readonly List<string> DefaultImageFormats = ["jpg", "jpeg", "png", "bmp"];
public Config Get()
{
var exePath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory)!;
@@ -65,7 +70,10 @@ public class FileConfigRepository(ILogger<FileConfigRepository> logger) : IConfi
WindowLocation = DefaultWindowLocation,
WindowSize = DefaultWindowSize,
ShowHelpOnStart = true
ShowHelpOnStart = true,
VideoFormats = DefaultVideoFormats,
ImageFormats = DefaultImageFormats
};
}
var str = File.ReadAllText(CONFIG_PATH);