mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 19:26:31 +00:00
add image editing
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user