feat: Refactor project structure and add core library

- Migrate shared components from WPF to a new Core library.
- Introduce GroupInfo, M3UInfo, and ObservableViewModelBase classes.
- Implement M3UParser for downloading and parsing M3U files.
- Add ProgramsData for managing program lists and guides.
- Create SettingsModel for application settings management.
- Update project references in solution files.
This commit is contained in:
Vladimir
2026-03-22 13:11:32 +02:00
parent 1e8e444376
commit 689450393b
10 changed files with 614 additions and 6 deletions
+28
View File
@@ -0,0 +1,28 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace TV_Player
{
public abstract class ObservableViewModelBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName)
=> PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
/// <summary>
/// Set a property and raise a property changed event if it has changed
/// </summary>
protected bool SetProperty<T>(ref T property, T value, [CallerMemberName] string propertyName = null)
{
if (EqualityComparer<T>.Default.Equals(property, value))
{
return false;
}
property = value;
RaisePropertyChanged(propertyName);
return true;
}
}
}