mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 22:56:29 +00:00
get label files more carefully
put warning min log level put filename to the title
This commit is contained in:
@@ -26,7 +26,7 @@ public partial class App : Application
|
|||||||
{
|
{
|
||||||
Log.Logger = new LoggerConfiguration()
|
Log.Logger = new LoggerConfiguration()
|
||||||
.Enrich.FromLogContext()
|
.Enrich.FromLogContext()
|
||||||
.MinimumLevel.Information()
|
.MinimumLevel.Warning()
|
||||||
.WriteTo.Console()
|
.WriteTo.Console()
|
||||||
.WriteTo.File(
|
.WriteTo.File(
|
||||||
path: "Logs/log.txt",
|
path: "Logs/log.txt",
|
||||||
|
|||||||
@@ -49,9 +49,6 @@ public class FileConfigRepository(ILogger<FileConfigRepository> logger) : IConfi
|
|||||||
var exePath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory)!;
|
var exePath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory)!;
|
||||||
var configFilePath = Path.Combine(exePath, CONFIG_PATH);
|
var configFilePath = Path.Combine(exePath, CONFIG_PATH);
|
||||||
|
|
||||||
logger.LogInformation($"exePath: {exePath}" );
|
|
||||||
logger.LogInformation($"configFilePath: {configFilePath}");
|
|
||||||
|
|
||||||
if (!File.Exists(configFilePath))
|
if (!File.Exists(configFilePath))
|
||||||
{
|
{
|
||||||
return new Config
|
return new Config
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ public partial class MainWindow
|
|||||||
if (!labelDir.Exists)
|
if (!labelDir.Exists)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var labelFiles = labelDir.GetFiles($"{_formState.VideoName}_*");
|
var labelFiles = labelDir.GetFiles($"{_formState.VideoName}_??????.txt");
|
||||||
foreach (var file in labelFiles)
|
foreach (var file in labelFiles)
|
||||||
{
|
{
|
||||||
var name = Path.GetFileNameWithoutExtension(file.Name);
|
var name = Path.GetFileNameWithoutExtension(file.Name);
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ public class PlayerControlHandler(LibVLC libVLC, MediaPlayer mediaPlayer, MainWi
|
|||||||
|
|
||||||
mediaPlayer.Stop();
|
mediaPlayer.Stop();
|
||||||
mediaPlayer.Play(new Media(libVLC, fileInfo.Path));
|
mediaPlayer.Play(new Media(libVLC, fileInfo.Path));
|
||||||
|
mainWindow.Title = $"Azaion Annotator - {fileInfo.Name}";
|
||||||
mainWindow.BlinkHelp(HelpTexts.HelpTextsDict[HelpTextEnum.PauseForAnnotations]);
|
mainWindow.BlinkHelp(HelpTexts.HelpTextsDict[HelpTextEnum.PauseForAnnotations]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"VideosDirectory": "E:\\Azaion3\\VideosDone",
|
"VideosDirectory": "E:\\Azaion3\\Videos",
|
||||||
"LabelsDirectory": "E:\\labels",
|
"LabelsDirectory": "E:\\labels",
|
||||||
"ImagesDirectory": "E:\\images",
|
"ImagesDirectory": "E:\\images",
|
||||||
"ResultsDirectory": "E:\\results",
|
"ResultsDirectory": "E:\\results",
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Id": 8,
|
"Id": 8,
|
||||||
"Name": "Танк з додатковим захистом",
|
"Name": "Танк з захистом",
|
||||||
"Color": "#80008000",
|
"Color": "#80008000",
|
||||||
"ColorBrush": "#80008000"
|
"ColorBrush": "#80008000"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user