mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:06:30 +00:00
added better logging to python
add day / winter / night switcher
This commit is contained in:
@@ -120,8 +120,8 @@ public partial class Annotator
|
||||
TbFolder.Text = _appConfig.DirectoriesConfig.VideosDirectory;
|
||||
|
||||
AnnotationClasses = new ObservableCollection<DetectionClass>(_appConfig.AnnotationConfig.AnnotationClasses);
|
||||
LvClasses.ItemsSource = AnnotationClasses;
|
||||
LvClasses.SelectedIndex = 0;
|
||||
LvClasses.DetectionDataGrid.ItemsSource = AnnotationClasses;
|
||||
LvClasses.SelectNum(0);
|
||||
|
||||
if (LvFiles.Items.IsEmpty)
|
||||
BlinkHelp(HelpTexts.HelpTextsDict[HelpTextEnum.Initial]);
|
||||
@@ -176,9 +176,9 @@ public partial class Annotator
|
||||
await _mediator.Publish(new AnnotatorControlEvent(PlaybackControlEnum.Play));
|
||||
};
|
||||
|
||||
LvClasses.SelectionChanged += (_, _) =>
|
||||
LvClasses.DetectionClassChanged += (_, args) =>
|
||||
{
|
||||
var selectedClass = (DetectionClass)LvClasses.SelectedItem;
|
||||
var selectedClass = args.DetectionClass;
|
||||
Editor.CurrentAnnClass = selectedClass;
|
||||
_mediator.Publish(new AnnClassSelectedEvent(selectedClass));
|
||||
};
|
||||
|
||||
@@ -53,12 +53,12 @@ public class AnnotatorEventHandler(
|
||||
await Task.CompletedTask;
|
||||
}
|
||||
|
||||
private void SelectClass(DetectionClass annClass)
|
||||
private void SelectClass(DetectionClass detClass)
|
||||
{
|
||||
mainWindow.Editor.CurrentAnnClass = annClass;
|
||||
mainWindow.Editor.CurrentAnnClass = detClass;
|
||||
foreach (var ann in mainWindow.Editor.CurrentDetections.Where(x => x.IsSelected))
|
||||
ann.DetectionClass = annClass;
|
||||
mainWindow.LvClasses.SelectedIndex = annClass.Id;
|
||||
ann.DetectionClass = detClass;
|
||||
mainWindow.LvClasses.SelectNum(detClass.Id);
|
||||
}
|
||||
|
||||
public async Task Handle(KeyEvent keyEvent, CancellationToken cancellationToken = default)
|
||||
@@ -74,7 +74,7 @@ public class AnnotatorEventHandler(
|
||||
if ((int)key >= (int)Key.NumPad1 && (int)key <= (int)Key.NumPad9)
|
||||
keyNumber = key - Key.NumPad1;
|
||||
if (keyNumber.HasValue)
|
||||
SelectClass((DetectionClass)mainWindow.LvClasses.Items[keyNumber.Value]!);
|
||||
SelectClass((DetectionClass)mainWindow.LvClasses.DetectionDataGrid.Items[keyNumber.Value]!);
|
||||
|
||||
if (_keysControlEnumDict.TryGetValue(key, out var value))
|
||||
await ControlPlayback(value, cancellationToken);
|
||||
|
||||
Reference in New Issue
Block a user