consolidate all repos to one for archive
This commit is contained in:
79
semester_3/uporabniski_vmesniki/MyApp/Media.cs
Normal file
79
semester_3/uporabniski_vmesniki/MyApp/Media.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace MyApp
|
||||
{
|
||||
public class Media : INotifyPropertyChanged
|
||||
{
|
||||
public string Name
|
||||
{
|
||||
get { return name; }
|
||||
set
|
||||
{
|
||||
name = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
string name = "";
|
||||
|
||||
public string IconSource
|
||||
{
|
||||
get { return iconSource; }
|
||||
set
|
||||
{
|
||||
iconSource = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
string iconSource = "";
|
||||
|
||||
public string FilePath
|
||||
{
|
||||
get { return filePath; }
|
||||
set
|
||||
{
|
||||
filePath = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
string filePath = "";
|
||||
|
||||
[XmlIgnore]
|
||||
public bool IsPlaying
|
||||
{
|
||||
get { return isPlaying; }
|
||||
set
|
||||
{
|
||||
isPlaying = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
bool isPlaying = false;
|
||||
|
||||
public string Genra
|
||||
{
|
||||
get { return genra; }
|
||||
set
|
||||
{
|
||||
genra = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
string genra = "";
|
||||
|
||||
public Media(string name, string filePath)
|
||||
{
|
||||
this.name = name;
|
||||
this.filePath = filePath;
|
||||
iconSource = "pack://application:,,,/assets/video_icon.png";
|
||||
}
|
||||
public Media() { }
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
protected void OnPropertyChanged([CallerMemberName] string? name = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user