44 lines
No EOL
1.5 KiB
C#
44 lines
No EOL
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using JD.Core.Collections;
|
|
|
|
namespace JD.Timeline.View.SnipeView
|
|
{
|
|
/// <summary>
|
|
/// Contains Sniping Information for one move
|
|
/// Contains SnipeInfo for each examples labelled in the CSV file
|
|
/// </summary>
|
|
public class MoveSnipingData
|
|
{
|
|
public string FileLocation { get; set; }
|
|
public string MoveName { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Contains List of Examples with their Sniping Information, on whether they are positive, negative, or sniped
|
|
/// </summary>
|
|
public DeepObservableList<SnipeInfo> TaggedExamplesList { get; set; }
|
|
public List<string> MetaDataReadFromFile { get; set; }
|
|
public EventHandler<ItemChangedEventArgs<SnipeInfo>> SnipingDataChanged;
|
|
|
|
public MoveSnipingData(string moveName, string fileName)
|
|
{
|
|
MoveName = moveName;
|
|
FileLocation = fileName;
|
|
TaggedExamplesList = new DeepObservableList<SnipeInfo>();
|
|
MetaDataReadFromFile = new List<string>();
|
|
|
|
TaggedExamplesList.ItemChanged += SnipingList_ItemChanged;
|
|
}
|
|
|
|
~MoveSnipingData()
|
|
{
|
|
TaggedExamplesList.ItemChanged -= SnipingList_ItemChanged;
|
|
}
|
|
|
|
private void SnipingList_ItemChanged(object sender, ItemChangedEventArgs<SnipeInfo> args)
|
|
{
|
|
if (SnipingDataChanged != null)
|
|
SnipingDataChanged(this, args);
|
|
}
|
|
}
|
|
} |