fix config

This commit is contained in:
Oleksandr Bezdieniezhnykh
2024-05-27 14:41:33 +03:00
parent d4adb64655
commit ea8d0e686a
4 changed files with 10 additions and 14 deletions
+3 -7
View File
@@ -20,18 +20,14 @@
<PackageReference Include="WindowsAPICodePack" Version="7.0.4" />
</ItemGroup>
<ItemGroup>
<None Remove="config.json" />
<Content Include="config.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Remove="logo.ico" />
<Resource Include="logo.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<None Update="config.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
+4 -3
View File
@@ -1,5 +1,4 @@
using System.Drawing;
using System.IO;
using System.IO;
using System.Reflection;
using System.Text;
using Newtonsoft.Json;
@@ -34,7 +33,9 @@ public class Config
public static Config Read()
{
if (!File.Exists(CONFIG_PATH))
string configFilePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), CONFIG_PATH);
if (!File.Exists(configFilePath))
{
var exePath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory)!;
return new Config
-1
View File
@@ -4,7 +4,6 @@ using System.Windows.Input;
using Azaion.Annotator.DTO;
using LibVLCSharp.Shared;
using MediatR;
using MS.WindowsAPICodePack.Internal;
namespace Azaion.Annotator;
+3 -3
View File
@@ -1,7 +1,7 @@
{
"LookupDirectory": "video",
"LabelsDirectory": "labels",
"ImagesDirectory": "images",
"VideosDirectory": "D:\\dev\\azaion\\ai\\ai-data",
"LabelsDirectory": "D:\\dev\\azaion\\ai\\ai-data\\Azaion.Annotator\\labels",
"ImagesDirectory": "D:\\dev\\azaion\\ai\\ai-data\\Azaion.Annotator\\images",
"AnnotationClasses": [
{
"Id": 0,