diff --git a/TV Player_old/App.xaml b/TV Player WPF/App.xaml
similarity index 88%
rename from TV Player_old/App.xaml
rename to TV Player WPF/App.xaml
index 1dee3fc..4ace1b4 100644
--- a/TV Player_old/App.xaml
+++ b/TV Player WPF/App.xaml
@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:TV_Player"
- StartupUri="MainWindow.xaml">
+ >
diff --git a/TV Player WPF/App.xaml.cs b/TV Player WPF/App.xaml.cs
new file mode 100644
index 0000000..60833f7
--- /dev/null
+++ b/TV Player WPF/App.xaml.cs
@@ -0,0 +1,22 @@
+using DirectShowLib.BDA;
+using System.Configuration;
+using System.Data;
+using System.Windows;
+using TV_Player.ViewModels;
+
+namespace TV_Player
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ private TVPlayerViewModel _tvPlayer;
+ protected override void OnStartup(StartupEventArgs e)
+ {
+ _tvPlayer = new TVPlayerViewModel();
+
+ base.OnStartup(e);
+ }
+ }
+}
diff --git a/TV Player_old/AssemblyInfo.cs b/TV Player WPF/AssemblyInfo.cs
similarity index 100%
rename from TV Player_old/AssemblyInfo.cs
rename to TV Player WPF/AssemblyInfo.cs
diff --git a/TV Player_old/Assets/bkground.jpg b/TV Player WPF/Assets/bkground.jpg
similarity index 100%
rename from TV Player_old/Assets/bkground.jpg
rename to TV Player WPF/Assets/bkground.jpg
diff --git a/TV Player_old/EnumToBooleanConverter.cs b/TV Player WPF/EnumToBooleanConverter.cs
similarity index 100%
rename from TV Player_old/EnumToBooleanConverter.cs
rename to TV Player WPF/EnumToBooleanConverter.cs
diff --git a/TV Player_old/GroupButton.xaml b/TV Player WPF/GroupButton.xaml
similarity index 96%
rename from TV Player_old/GroupButton.xaml
rename to TV Player WPF/GroupButton.xaml
index 7f54c71..651f58f 100644
--- a/TV Player_old/GroupButton.xaml
+++ b/TV Player WPF/GroupButton.xaml
@@ -3,7 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:TV_Player"
mc:Ignorable="d"
d:DesignHeight="100" d:DesignWidth="200">
diff --git a/TV Player_old/GroupButton.xaml.cs b/TV Player WPF/GroupButton.xaml.cs
similarity index 100%
rename from TV Player_old/GroupButton.xaml.cs
rename to TV Player WPF/GroupButton.xaml.cs
diff --git a/TV Player_old/MainWindow.xaml b/TV Player WPF/MainWindow.xaml
similarity index 77%
rename from TV Player_old/MainWindow.xaml
rename to TV Player WPF/MainWindow.xaml
index edfd22e..fbe86c2 100644
--- a/TV Player_old/MainWindow.xaml
+++ b/TV Player WPF/MainWindow.xaml
@@ -6,13 +6,13 @@
xmlns:local="clr-namespace:TV_Player"
mc:Ignorable="d"
Title="TV" Height="450" Width="800">
-
-
-
+
+
+
-
+
diff --git a/TV Player WPF/MainWindow.xaml.cs b/TV Player WPF/MainWindow.xaml.cs
new file mode 100644
index 0000000..a655cbc
--- /dev/null
+++ b/TV Player WPF/MainWindow.xaml.cs
@@ -0,0 +1,13 @@
+using System.Windows;
+
+namespace TV_Player
+{
+ public partial class MainWindow : Window
+ {
+
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/TV Player WPF/ProgramsGroupGrid.xaml b/TV Player WPF/ProgramsGroupGrid.xaml
new file mode 100644
index 0000000..344bc9e
--- /dev/null
+++ b/TV Player WPF/ProgramsGroupGrid.xaml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TV Player WPF/ProgramsGroupGrid.xaml.cs b/TV Player WPF/ProgramsGroupGrid.xaml.cs
new file mode 100644
index 0000000..d9094ef
--- /dev/null
+++ b/TV Player WPF/ProgramsGroupGrid.xaml.cs
@@ -0,0 +1,23 @@
+using System.Windows.Controls;
+
+namespace TV_Player
+{
+ ///
+ /// Interaction logic for ProgramsGroupGrid.xaml
+ ///
+ public partial class ProgramsGroupGrid : UserControl
+ {
+ public ProgramsGroupGrid()
+ {
+ InitializeComponent();
+ }
+
+ private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ if (DataContext is ProgramsGroupViewModel viewModel)
+ {
+ viewModel.ItemSelectedCommand.Execute(null);
+ }
+ }
+ }
+}
diff --git a/TV Player WPF/ProgramsList.xaml b/TV Player WPF/ProgramsList.xaml
new file mode 100644
index 0000000..47e87e3
--- /dev/null
+++ b/TV Player WPF/ProgramsList.xaml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TV Player WPF/ProgramsList.xaml.cs b/TV Player WPF/ProgramsList.xaml.cs
new file mode 100644
index 0000000..a34a823
--- /dev/null
+++ b/TV Player WPF/ProgramsList.xaml.cs
@@ -0,0 +1,22 @@
+using System.Windows.Controls;
+
+namespace TV_Player
+{
+ ///
+ /// Interaction logic for ProgramsGroupGrid.xaml
+ ///
+ public partial class ProgramsList : UserControl
+ {
+ public ProgramsList()
+ {
+ InitializeComponent();
+ }
+ private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ if (DataContext is ProgramsListViewModel viewModel)
+ {
+ viewModel.ItemSelectedCommand.Execute(null);
+ }
+ }
+ }
+}
diff --git a/TV Player_old/TV Player.csproj b/TV Player WPF/TV Player WPF.csproj
similarity index 63%
rename from TV Player_old/TV Player.csproj
rename to TV Player WPF/TV Player WPF.csproj
index 3c5e77a..6391fe6 100644
--- a/TV Player_old/TV Player.csproj
+++ b/TV Player WPF/TV Player WPF.csproj
@@ -15,8 +15,9 @@
-
-
+
+
+
@@ -26,4 +27,13 @@
+
+
+ Code
+
+
+ Code
+
+
+
diff --git a/TV Player WPF/VideoPlayer.xaml b/TV Player WPF/VideoPlayer.xaml
new file mode 100644
index 0000000..1663b7e
--- /dev/null
+++ b/TV Player WPF/VideoPlayer.xaml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TV Player WPF/VideoPlayer.xaml.cs b/TV Player WPF/VideoPlayer.xaml.cs
new file mode 100644
index 0000000..dabd00d
--- /dev/null
+++ b/TV Player WPF/VideoPlayer.xaml.cs
@@ -0,0 +1,114 @@
+using LibVLCSharp.Shared;
+using LibVLCSharp.WPF;
+using System.IO;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+
+namespace TV_Player
+{
+ ///
+ /// Interaction logic for ProgramsGroupGrid.xaml
+ ///
+ public partial class VideoPlayer : UserControl
+ {
+ private readonly DirectoryInfo vlcLibDirectory;
+
+ public static readonly DependencyProperty SourceUrlProperty =
+ DependencyProperty.Register(
+ "SourceUrl", // Name of the property
+ typeof(string), // Type of the property
+ typeof(VideoPlayer), // Type of the owner class
+ new PropertyMetadata(string.Empty) // Default value
+ );
+
+ LibVLC _libVLC;
+ MediaPlayer _mediaPlayer;
+
+ public string SourceUrl
+ {
+ get { return (string)GetValue(SourceUrlProperty); }
+ set { SetValue(SourceUrlProperty, value);}
+ }
+ public VideoPlayer()
+ {
+ InitializeComponent();
+
+ _libVLC = new LibVLC(enableDebugLogs: true);
+ _mediaPlayer = new MediaPlayer(_libVLC);
+
+ VideoView.Loaded += (sender, e) =>
+ {
+ VideoView.MediaPlayer = _mediaPlayer;
+ VideoView.MouseLeftButtonDown += VideoView_MouseLeftButtonDown;
+ VideoView.MediaPlayer.EnableMouseInput = false;
+ VideoView.PreviewMouseLeftButtonDown += VideoView_MouseLeftButtonDown;
+ AutoPlay();
+ };
+ Unloaded += VideoPlayer_Unloaded;
+
+ }
+
+ private void VideoView_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+ {
+ ToggleOverlay();
+ }
+
+ private void VideoPlayer_Unloaded(object sender, RoutedEventArgs e)
+ {
+ VideoView.Dispose();
+ }
+
+
+ void PauseButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (VideoView.MediaPlayer.IsPlaying)
+ {
+ VideoView.MediaPlayer.Pause();
+ }
+ }
+
+ private void AutoPlay()
+ {
+ if (!VideoView.MediaPlayer.IsPlaying)
+ {
+
+ using (var media = new Media(_libVLC, new Uri(SourceUrl)))
+ VideoView.MediaPlayer.Play(media);
+ }
+ }
+
+
+ private void MyUserControl_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ ToggleOverlay();
+ }
+
+ private void MyUserControl_TouchDown(object sender, TouchEventArgs e)
+ {
+ ToggleOverlay();
+ }
+
+ private void ToggleOverlay()
+ {
+ if (overlayPanel.Visibility == Visibility.Visible)
+ {
+ HideOverlay();
+ }
+ else
+ {
+ ShowOverlay();
+ }
+ }
+
+ public void ShowOverlay()
+ {
+ overlayPanel.Visibility = Visibility.Visible;
+ }
+
+ public void HideOverlay()
+ {
+ overlayPanel.Visibility = Visibility.Collapsed;
+ }
+ }
+}
diff --git a/TV Player WPF/ViewModels/GroupInfo.cs b/TV Player WPF/ViewModels/GroupInfo.cs
new file mode 100644
index 0000000..634f0db
--- /dev/null
+++ b/TV Player WPF/ViewModels/GroupInfo.cs
@@ -0,0 +1,8 @@
+namespace TV_Player
+{
+ public class GroupInfo
+ {
+ public string Name { get; set; }
+ public int Count { get; set; }
+ }
+}
diff --git a/TV Player_old/M3UInfo.cs b/TV Player WPF/ViewModels/M3UInfo.cs
similarity index 100%
rename from TV Player_old/M3UInfo.cs
rename to TV Player WPF/ViewModels/M3UInfo.cs
diff --git a/TV Player_old/M3UParser.cs b/TV Player WPF/ViewModels/M3UParser.cs
similarity index 98%
rename from TV Player_old/M3UParser.cs
rename to TV Player WPF/ViewModels/M3UParser.cs
index 765c6e9..385188e 100644
--- a/TV Player_old/M3UParser.cs
+++ b/TV Player WPF/ViewModels/M3UParser.cs
@@ -90,7 +90,7 @@ namespace TV_Player
GroupTitle = match.Groups["GroupTitle"].Value,
Logo = match.Groups["Logo"].Value,
Name = match.Groups["Name"].Value,
- Url = match.Groups["Url"].Value
+ Url = match.Groups["URL"].Value
};
return true;
}
diff --git a/TV Player WPF/ViewModels/MainViewModel.cs b/TV Player WPF/ViewModels/MainViewModel.cs
new file mode 100644
index 0000000..06fb2c9
--- /dev/null
+++ b/TV Player WPF/ViewModels/MainViewModel.cs
@@ -0,0 +1,23 @@
+using System.Windows.Controls;
+
+namespace TV_Player
+{
+ public class MainViewModel : ObservableViewModelBase
+ {
+ private ContentControl _control;
+ public ContentControl Control
+ {
+ get => _control;
+ set => SetProperty(ref _control, value);
+ }
+
+ public MainViewModel()
+ {
+ var vm = new ProgramsGroupViewModel();
+
+ var control = new ProgramsGroupGrid();
+ control.DataContext = vm;
+ Control = control;
+ }
+ }
+}
diff --git a/TV Player WPF/ViewModels/ObservableViewModelBase.cs b/TV Player WPF/ViewModels/ObservableViewModelBase.cs
new file mode 100644
index 0000000..f54f263
--- /dev/null
+++ b/TV Player WPF/ViewModels/ObservableViewModelBase.cs
@@ -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));
+
+ ///
+ /// Set a property and raise a property changed event if it has changed
+ ///
+ protected bool SetProperty(ref T property, T value, [CallerMemberName] string propertyName = null)
+ {
+ if (EqualityComparer.Default.Equals(property, value))
+ {
+ return false;
+ }
+
+ property = value;
+ RaisePropertyChanged(propertyName);
+ return true;
+ }
+ }
+}
diff --git a/TV Player WPF/ViewModels/PlayerViewModel.cs b/TV Player WPF/ViewModels/PlayerViewModel.cs
new file mode 100644
index 0000000..af40464
--- /dev/null
+++ b/TV Player WPF/ViewModels/PlayerViewModel.cs
@@ -0,0 +1,48 @@
+using System.Windows.Input;
+
+namespace TV_Player
+{
+
+ public class PlayerViewModel: ObservableViewModelBase
+ {
+
+ private readonly M3UInfo _currentProgram;
+
+ private string _urlSource;
+ public string URLSource
+ {
+ get => _urlSource;
+ set => SetProperty(ref _urlSource, value);
+ }
+
+ public GroupInfo SelectedItem { get; set; }
+ public ICommand PlayCommand { get; }
+
+ public PlayerViewModel(M3UInfo selectedProgram)
+ {
+ _currentProgram = selectedProgram;
+ //PlayM3U8(_currentProgram.Url);
+ //_libVLC = new LibVLC();
+ //_mediaPlayer = new MediaPlayer(new Media(_libVLC, new Uri(_currentProgram.Url)));
+ //_mediaPlayer.Play();
+ //PlayCommand = new Command(OnPlayButtonClicked);
+ }
+
+ private void OnPlayButtonClicked()
+ {
+ PlayM3U8(_currentProgram.Url);
+ }
+
+ private void PlayM3U8(string url)
+ {
+ try
+ {
+ URLSource = _currentProgram.Url;
+ }
+ catch (Exception ex)
+ {
+ // Handle exceptions
+ }
+ }
+ }
+}
diff --git a/TV Player WPF/ViewModels/ProgramsData.cs b/TV Player WPF/ViewModels/ProgramsData.cs
new file mode 100644
index 0000000..df482ab
--- /dev/null
+++ b/TV Player WPF/ViewModels/ProgramsData.cs
@@ -0,0 +1,39 @@
+using System.Reactive.Subjects;
+
+namespace TV_Player
+{
+ public class ProgramsData
+ {
+ private static ProgramsData _instance;
+ public static ProgramsData Instance
+ {
+ get
+ {
+ _instance ??= new ProgramsData();
+ return _instance;
+ }
+ }
+
+ private readonly ReplaySubject> programsSubject = new ReplaySubject>();
+ private readonly ReplaySubject> groupsSubject = new ReplaySubject>();
+ public IObservable> AllPrograms => programsSubject;
+ public IObservable> GroupsInformation => groupsSubject;
+
+ private ProgramsData()
+ {
+ _=Initialize();
+ }
+ private async Task Initialize()
+ {
+ string m3uLink = "http://pl.da-tv.vip/a71e77fa/835b3216/tv.m3u";
+ var programs = await M3UParser.DownloadM3UFromWebAsync(m3uLink);
+
+ programsSubject.OnNext(programs);
+
+ var groupping = programs.GroupBy(item => item.GroupTitle)
+ .Select(group => new GroupInfo() { Name = group.Key, Count = group.Count() })
+ .ToList();
+ groupsSubject.OnNext(groupping);
+ }
+ }
+}
diff --git a/TV Player WPF/ViewModels/ProgramsGroupViewModel.cs b/TV Player WPF/ViewModels/ProgramsGroupViewModel.cs
new file mode 100644
index 0000000..45b2e37
--- /dev/null
+++ b/TV Player WPF/ViewModels/ProgramsGroupViewModel.cs
@@ -0,0 +1,36 @@
+using CommunityToolkit.Mvvm.Input;
+using System.Windows.Input;
+using TV_Player.ViewModels;
+
+namespace TV_Player
+{
+ public class ProgramsGroupViewModel : ObservableViewModelBase
+ {
+ private List _programs;
+ public List Programs
+ {
+ get => _programs;
+ set => SetProperty(ref _programs, value);
+ }
+
+ public GroupInfo SelectedItem { get; set; }
+ public ICommand ItemSelectedCommand { get; }
+
+ public ProgramsGroupViewModel()
+ {
+ ItemSelectedCommand = new RelayCommand(OnItemSelected);
+ ProgramsData.Instance.GroupsInformation.Subscribe(x=>Programs = x);
+ }
+
+ private void OnItemSelected()
+ {
+ //var navigation = (INavigation)Application.Current.MainPage.Navigation;
+
+ var programListViewModel = new ProgramsListViewModel(SelectedItem);
+ var conrtrol = new ProgramsList();
+ TVPlayerViewModel.Instance.SetPageContext(conrtrol, programListViewModel);
+
+
+ }
+ }
+}
diff --git a/TV Player WPF/ViewModels/ProgramsListViewModel.cs b/TV Player WPF/ViewModels/ProgramsListViewModel.cs
new file mode 100644
index 0000000..91b7aae
--- /dev/null
+++ b/TV Player WPF/ViewModels/ProgramsListViewModel.cs
@@ -0,0 +1,45 @@
+using CommunityToolkit.Mvvm.Input;
+using System.Windows.Input;
+using TV_Player.ViewModels;
+
+namespace TV_Player
+{
+ public class ProgramsListViewModel : ObservableViewModelBase
+ {
+ private List _programs;
+ public List Programs
+ {
+ get => _programs;
+ set => SetProperty(ref _programs, value);
+ }
+
+ public M3UInfo SelectedItem { get; set; }
+ public ICommand ItemSelectedCommand { get; }
+
+ public ProgramsListViewModel(GroupInfo groupInfo)
+ {
+ ItemSelectedCommand = new RelayCommand(OnItemSelected);
+ ProgramsData.Instance.AllPrograms.Subscribe(x=>Programs = x.Where(p=>p.GroupTitle== groupInfo.Name).ToList());
+ }
+
+ private void OnItemSelected()
+ {
+
+ var playerViewModel = new PlayerViewModel(SelectedItem);
+ var conrtrol = new VideoPlayer();
+ conrtrol.SourceUrl = SelectedItem.Url;
+ TVPlayerViewModel.Instance.SetPageContext(conrtrol, playerViewModel);
+ //var navigation = (INavigation)Application.Current.MainPage.Navigation;
+
+ //var playerViewModel = new PlayerViewModel(SelectedItem);
+
+ //// Create a new SecondPage and set its BindingContext to the ViewModel
+ //var playerPage = new PlayerPage
+ //{
+ // BindingContext = playerViewModel
+ //};
+ //// Navigate to the OtherPage
+ //navigation.PushAsync(playerPage);
+ }
+ }
+}
diff --git a/TV Player WPF/ViewModels/RelayCommand.cs b/TV Player WPF/ViewModels/RelayCommand.cs
new file mode 100644
index 0000000..90ad717
--- /dev/null
+++ b/TV Player WPF/ViewModels/RelayCommand.cs
@@ -0,0 +1,33 @@
+using System.Windows.Input;
+
+namespace TV_Player.ViewModels
+{
+ //public class RelayCommand : ICommand
+ //{
+ // private readonly Action _execute;
+ // private readonly Func _canExecute;
+
+ // public event EventHandler CanExecuteChanged;
+
+ // public RelayCommand(Action execute, Func canExecute = null)
+ // {
+ // _execute = execute ?? throw new ArgumentNullException(nameof(execute));
+ // _canExecute = canExecute;
+ // }
+
+ // public bool CanExecute(object parameter)
+ // {
+ // return _canExecute == null || _canExecute();
+ // }
+
+ // public void Execute(object parameter)
+ // {
+ // _execute();
+ // }
+
+ // public void RaiseCanExecuteChanged()
+ // {
+ // CanExecuteChanged?.Invoke(this, EventArgs.Empty);
+ // }
+ //}
+}
diff --git a/TV Player WPF/ViewModels/TVPlayerViewModel.cs b/TV Player WPF/ViewModels/TVPlayerViewModel.cs
new file mode 100644
index 0000000..35e8504
--- /dev/null
+++ b/TV Player WPF/ViewModels/TVPlayerViewModel.cs
@@ -0,0 +1,37 @@
+using System.Windows.Controls;
+
+namespace TV_Player.ViewModels
+{
+ public class TVPlayerViewModel
+ {
+ private readonly MainViewModel _mainViewModel;
+
+ private static TVPlayerViewModel _instance;
+ public static TVPlayerViewModel Instance
+ {
+ get
+ {
+ if(_instance==null)
+ _instance = new TVPlayerViewModel();
+ return _instance;
+ }
+ }
+
+ public TVPlayerViewModel()
+ {
+ _mainViewModel = new MainViewModel();
+ var mainWindow=new MainWindow();
+ mainWindow.DataContext = _mainViewModel;
+
+ mainWindow.Show();
+ _instance = this;
+ }
+
+ public void SetPageContext(ContentControl control, object viewModel)
+ {
+ control.DataContext = viewModel;
+ _mainViewModel.Control = control;
+ }
+
+ }
+}
diff --git a/TV Player/App.xaml b/TV Player/App.xaml
index afed686..90d882c 100644
--- a/TV Player/App.xaml
+++ b/TV Player/App.xaml
@@ -1,8 +1,8 @@
+ xmlns:local="clr-namespace:TV_Player.MAUI"
+ x:Class="TV_Player.MAUI.App">
diff --git a/TV Player/App.xaml.cs b/TV Player/App.xaml.cs
index 8a99059..05ed0ff 100644
--- a/TV Player/App.xaml.cs
+++ b/TV Player/App.xaml.cs
@@ -1,4 +1,4 @@
-namespace TV_Player
+namespace TV_Player.MAUI
{
public partial class App : Application
{
diff --git a/TV Player/AppShell.xaml b/TV Player/AppShell.xaml
index d5d383b..538e3fc 100644
--- a/TV Player/AppShell.xaml
+++ b/TV Player/AppShell.xaml
@@ -1,9 +1,9 @@
+ xmlns:local="clr-namespace:TV_Player.MAUI"
+ x:Class="TV_Player.MAUI.MainPage">
@@ -15,7 +15,7 @@
SelectedItem="{Binding SelectedItem}"
SelectionChangedCommand="{Binding ItemSelectedCommand}">
-
+
diff --git a/TV Player/MainPage.xaml.cs b/TV Player/MainPage.xaml.cs
index 352c26a..ff0fd5c 100644
--- a/TV Player/MainPage.xaml.cs
+++ b/TV Player/MainPage.xaml.cs
@@ -1,4 +1,4 @@
-namespace TV_Player
+namespace TV_Player.MAUI
{
public partial class MainPage : ContentPage
{
@@ -6,18 +6,6 @@
{
InitializeComponent();
}
-
- //private void OnCounterClicked(object sender, EventArgs e)
- //{
- // count++;
-
- // if (count == 1)
- // CounterBtn.Text = $"Clicked {count} time";
- // else
- // CounterBtn.Text = $"Clicked {count} times";
-
- // SemanticScreenReader.Announce(CounterBtn.Text);
- //}
}
}
diff --git a/TV Player/MauiProgram.cs b/TV Player/MauiProgram.cs
index df475a4..5be3006 100644
--- a/TV Player/MauiProgram.cs
+++ b/TV Player/MauiProgram.cs
@@ -1,6 +1,7 @@
-using Microsoft.Extensions.Logging;
+using CommunityToolkit.Maui;
+using Microsoft.Extensions.Logging;
-namespace TV_Player
+namespace TV_Player.MAUI
{
public static class MauiProgram
{
@@ -9,6 +10,7 @@ namespace TV_Player
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp()
+ .UseMauiCommunityToolkitMediaElement()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
diff --git a/TV Player/MediaViewer.cs b/TV Player/MediaViewer.cs
new file mode 100644
index 0000000..1ae92bc
--- /dev/null
+++ b/TV Player/MediaViewer.cs
@@ -0,0 +1,44 @@
+using LibVLCSharp.Shared;
+
+namespace TV_Player.MAUI
+{
+ public class MediaViewer : ContentView
+ {
+ private LibVLC _libVLC;
+ private MediaPlayer _mediaPlayer;
+
+ public static BindableProperty StreamUrlProperty = BindableProperty.Create(nameof(StreamUrl)
+ , typeof(string)
+ , typeof(MediaViewer)
+ , ""
+ , defaultBindingMode: BindingMode.TwoWay);
+
+ public string StreamUrl
+ {
+ get => (string)GetValue(StreamUrlProperty);
+ set
+ {
+ SetValue(StreamUrlProperty, value);
+ }
+ }
+
+ public MediaViewer()
+ {
+ InitializeMediaPlayer();
+ }
+
+ private void InitializeMediaPlayer()
+ {
+ _libVLC = new LibVLC();
+ _mediaPlayer = new MediaPlayer(_libVLC);
+ // var media = new Media(_libVLC, new Uri("http://ost.da-tv.vip/uPVtzdGJfdG9rZW5dIiwibCI6ImE3MWU3N2ZhIiwicCI6ImE3MWU3N2ZhODM1YjMyMTYiLCJjIjoiNDk3IiwidCI6ImUzNjAwZTEwZmFmMGVhYjhhYWY1YTU2YzRkN2VjZTE5IiwiZCI6IjIzMTQ2IiwiciI6IjIzMDM4IiwibSI6InR2IiwiZHQiOiIwIn0eyJ1IjoiaHR0cDovLzQ1LjkzLjQ2LjI3Ojg4ODcvODM2MS92aWRlby5tM3U4P3Rva2V/video.m3u8"));
+ //_mediaPlayer.Play();
+ }
+
+ public void Play()
+ {
+ var media = new Media(_libVLC, new Uri("http://ost.da-tv.vip/uPVtzdGJfdG9rZW5dIiwibCI6ImE3MWU3N2ZhIiwicCI6ImE3MWU3N2ZhODM1YjMyMTYiLCJjIjoiNDk3IiwidCI6ImUzNjAwZTEwZmFmMGVhYjhhYWY1YTU2YzRkN2VjZTE5IiwiZCI6IjIzMTQ2IiwiciI6IjIzMDM4IiwibSI6InR2IiwiZHQiOiIwIn0eyJ1IjoiaHR0cDovLzQ1LjkzLjQ2LjI3Ojg4ODcvODM2MS92aWRlby5tM3U4P3Rva2V/video.m3u8"));
+ _mediaPlayer.Play(media);
+ }
+ }
+}
diff --git a/TV Player/Platforms/Android/MainApplication.cs b/TV Player/Platforms/Android/MainApplication.cs
index 8424df7..bc3a8cf 100644
--- a/TV Player/Platforms/Android/MainApplication.cs
+++ b/TV Player/Platforms/Android/MainApplication.cs
@@ -1,5 +1,6 @@
using Android.App;
using Android.Runtime;
+using TV_Player.MAUI;
namespace TV_Player
{
diff --git a/TV Player/Platforms/MacCatalyst/AppDelegate.cs b/TV Player/Platforms/MacCatalyst/AppDelegate.cs
deleted file mode 100644
index 237a786..0000000
--- a/TV Player/Platforms/MacCatalyst/AppDelegate.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using Foundation;
-
-namespace TV_Player
-{
- [Register("AppDelegate")]
- public class AppDelegate : MauiUIApplicationDelegate
- {
- protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
- }
-}
diff --git a/TV Player/Platforms/MacCatalyst/Info.plist b/TV Player/Platforms/MacCatalyst/Info.plist
deleted file mode 100644
index c96dd0a..0000000
--- a/TV Player/Platforms/MacCatalyst/Info.plist
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
- UIDeviceFamily
-
- 1
- 2
-
- UIRequiredDeviceCapabilities
-
- arm64
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- XSAppIconAssets
- Assets.xcassets/appicon.appiconset
-
-
diff --git a/TV Player/Platforms/MacCatalyst/Program.cs b/TV Player/Platforms/MacCatalyst/Program.cs
deleted file mode 100644
index d6861d1..0000000
--- a/TV Player/Platforms/MacCatalyst/Program.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using ObjCRuntime;
-using UIKit;
-
-namespace TV_Player
-{
- public class Program
- {
- // This is the main entry point of the application.
- static void Main(string[] args)
- {
- // if you want to use a different Application Delegate class from "AppDelegate"
- // you can specify it here.
- UIApplication.Main(args, null, typeof(AppDelegate));
- }
- }
-}
diff --git a/TV Player/Platforms/Tizen/Main.cs b/TV Player/Platforms/Tizen/Main.cs
deleted file mode 100644
index 2c6aa6e..0000000
--- a/TV Player/Platforms/Tizen/Main.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using Microsoft.Maui;
-using Microsoft.Maui.Hosting;
-using System;
-
-namespace TV_Player
-{
- internal class Program : MauiApplication
- {
- protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
-
- static void Main(string[] args)
- {
- var app = new Program();
- app.Run(args);
- }
- }
-}
diff --git a/TV Player/Platforms/Tizen/tizen-manifest.xml b/TV Player/Platforms/Tizen/tizen-manifest.xml
deleted file mode 100644
index f3f0641..0000000
--- a/TV Player/Platforms/Tizen/tizen-manifest.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
- maui-appicon-placeholder
-
-
-
-
- http://tizen.org/privilege/internet
-
-
-
-
\ No newline at end of file
diff --git a/TV Player/Platforms/Windows/App.xaml.cs b/TV Player/Platforms/Windows/App.xaml.cs
index 98341ae..b7166ee 100644
--- a/TV Player/Platforms/Windows/App.xaml.cs
+++ b/TV Player/Platforms/Windows/App.xaml.cs
@@ -1,4 +1,5 @@
using Microsoft.UI.Xaml;
+using TV_Player.MAUI;
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
diff --git a/TV Player/Platforms/iOS/AppDelegate.cs b/TV Player/Platforms/iOS/AppDelegate.cs
deleted file mode 100644
index 237a786..0000000
--- a/TV Player/Platforms/iOS/AppDelegate.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using Foundation;
-
-namespace TV_Player
-{
- [Register("AppDelegate")]
- public class AppDelegate : MauiUIApplicationDelegate
- {
- protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
- }
-}
diff --git a/TV Player/Platforms/iOS/Info.plist b/TV Player/Platforms/iOS/Info.plist
deleted file mode 100644
index 0004a4f..0000000
--- a/TV Player/Platforms/iOS/Info.plist
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
- LSRequiresIPhoneOS
-
- UIDeviceFamily
-
- 1
- 2
-
- UIRequiredDeviceCapabilities
-
- arm64
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- XSAppIconAssets
- Assets.xcassets/appicon.appiconset
-
-
diff --git a/TV Player/Platforms/iOS/Program.cs b/TV Player/Platforms/iOS/Program.cs
deleted file mode 100644
index d6861d1..0000000
--- a/TV Player/Platforms/iOS/Program.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using ObjCRuntime;
-using UIKit;
-
-namespace TV_Player
-{
- public class Program
- {
- // This is the main entry point of the application.
- static void Main(string[] args)
- {
- // if you want to use a different Application Delegate class from "AppDelegate"
- // you can specify it here.
- UIApplication.Main(args, null, typeof(AppDelegate));
- }
- }
-}
diff --git a/TV Player/PlayerPage.xaml b/TV Player/PlayerPage.xaml
new file mode 100644
index 0000000..0f22423
--- /dev/null
+++ b/TV Player/PlayerPage.xaml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/TV Player/PlayerPage.xaml.cs b/TV Player/PlayerPage.xaml.cs
new file mode 100644
index 0000000..cc38baa
--- /dev/null
+++ b/TV Player/PlayerPage.xaml.cs
@@ -0,0 +1,14 @@
+namespace TV_Player.MAUI;
+
+public partial class PlayerPage : ContentPage
+{
+ public PlayerPage()
+ {
+ this.BindingContext = this;
+ InitializeComponent();
+ }
+
+ private void ContentPage_Loaded(object sender, EventArgs e)
+ {
+ }
+}
\ No newline at end of file
diff --git a/TV Player/ProgramPage.xaml b/TV Player/ProgramPage.xaml
new file mode 100644
index 0000000..7d04fed
--- /dev/null
+++ b/TV Player/ProgramPage.xaml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TV Player/ProgramPage.xaml.cs b/TV Player/ProgramPage.xaml.cs
new file mode 100644
index 0000000..cccdd0b
--- /dev/null
+++ b/TV Player/ProgramPage.xaml.cs
@@ -0,0 +1,10 @@
+namespace TV_Player.MAUI
+{
+ public partial class ProgramPage : ContentPage
+ {
+ public ProgramPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/TV Player/TV Player.csproj b/TV Player/TV Player MAUI.csproj
similarity index 79%
rename from TV Player/TV Player.csproj
rename to TV Player/TV Player MAUI.csproj
index d298b45..35746b9 100644
--- a/TV Player/TV Player.csproj
+++ b/TV Player/TV Player MAUI.csproj
@@ -22,12 +22,9 @@
1.0
1
- 11.0
- 13.1
21.0
10.0.17763.0
10.0.17763.0
- 6.5
@@ -49,8 +46,11 @@
+
+
+
@@ -65,4 +65,25 @@
+
+
+ ProgramPage.xaml
+
+
+
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+
+
+
+ MSBuild:Compile
+
+
+
diff --git a/TV Player/ViewModels/GroupInfo.cs b/TV Player/ViewModels/GroupInfo.cs
index 99a3d84..6e3fabf 100644
--- a/TV Player/ViewModels/GroupInfo.cs
+++ b/TV Player/ViewModels/GroupInfo.cs
@@ -1,7 +1,6 @@
-namespace TV_Player
+namespace TV_Player.MAUI
{
public class GroupInfo
-
{
public string Name { get; set; }
public int Count { get; set; }
diff --git a/TV Player/ViewModels/M3UInfo.cs b/TV Player/ViewModels/M3UInfo.cs
index c46ee17..d4f2665 100644
--- a/TV Player/ViewModels/M3UInfo.cs
+++ b/TV Player/ViewModels/M3UInfo.cs
@@ -1,4 +1,4 @@
-namespace TV_Player
+namespace TV_Player.MAUI
{
public class M3UInfo
{
diff --git a/TV Player/ViewModels/M3UParser.cs b/TV Player/ViewModels/M3UParser.cs
index 9143db0..8d50448 100644
--- a/TV Player/ViewModels/M3UParser.cs
+++ b/TV Player/ViewModels/M3UParser.cs
@@ -1,7 +1,7 @@
using System.Net.Http.Headers;
using System.Text.RegularExpressions;
-namespace TV_Player
+namespace TV_Player.MAUI
{
public static class M3UParser
{
@@ -89,7 +89,7 @@ namespace TV_Player
GroupTitle = match.Groups["GroupTitle"].Value,
Logo = match.Groups["Logo"].Value,
Name = match.Groups["Name"].Value,
- Url = match.Groups["Url"].Value
+ Url = match.Groups["URL"].Value
};
return true;
}
diff --git a/TV Player/ViewModels/MainViewModel.cs b/TV Player/ViewModels/MainViewModel.cs
index 7ff8653..985d1d3 100644
--- a/TV Player/ViewModels/MainViewModel.cs
+++ b/TV Player/ViewModels/MainViewModel.cs
@@ -1,6 +1,6 @@
using System.Windows.Input;
-namespace TV_Player
+namespace TV_Player.MAUI
{
public class MainViewModel : ObservableViewModelBase
{
@@ -22,7 +22,17 @@ namespace TV_Player
private void OnItemSelected()
{
-
+ var navigation = (INavigation)Application.Current.MainPage.Navigation;
+
+ var programPageViewModel = new ProgramViewModel(SelectedItem);
+
+ // Create a new SecondPage and set its BindingContext to the ViewModel
+ var programPage = new ProgramPage
+ {
+ BindingContext = programPageViewModel
+ };
+ // Navigate to the OtherPage
+ navigation.PushAsync(programPage);
}
}
}
diff --git a/TV Player/ViewModels/ObservableViewModelBase.cs b/TV Player/ViewModels/ObservableViewModelBase.cs
index f54f263..95e2400 100644
--- a/TV Player/ViewModels/ObservableViewModelBase.cs
+++ b/TV Player/ViewModels/ObservableViewModelBase.cs
@@ -1,7 +1,7 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
-namespace TV_Player
+namespace TV_Player.MAUI
{
public abstract class ObservableViewModelBase : INotifyPropertyChanged
{
diff --git a/TV Player/ViewModels/PlayerViewModel.cs b/TV Player/ViewModels/PlayerViewModel.cs
new file mode 100644
index 0000000..0e9ec17
--- /dev/null
+++ b/TV Player/ViewModels/PlayerViewModel.cs
@@ -0,0 +1,49 @@
+using LibVLCSharp.Shared;
+using System.Windows.Input;
+
+namespace TV_Player.MAUI
+{
+
+ public class PlayerViewModel: ObservableViewModelBase
+ {
+
+ private readonly M3UInfo _currentProgram;
+
+ private string _urlSource;
+ public string URLSource
+ {
+ get => _urlSource;
+ set => SetProperty(ref _urlSource, value);
+ }
+
+ public GroupInfo SelectedItem { get; set; }
+ public ICommand PlayCommand { get; }
+
+ public PlayerViewModel(M3UInfo selectedProgram)
+ {
+ _currentProgram = selectedProgram;
+ //PlayM3U8(_currentProgram.Url);
+ //_libVLC = new LibVLC();
+ //_mediaPlayer = new MediaPlayer(new Media(_libVLC, new Uri(_currentProgram.Url)));
+ //_mediaPlayer.Play();
+ PlayCommand = new Command(OnPlayButtonClicked);
+ }
+
+ private void OnPlayButtonClicked()
+ {
+ PlayM3U8(_currentProgram.Url);
+ }
+
+ private void PlayM3U8(string url)
+ {
+ try
+ {
+ URLSource = _currentProgram.Url;
+ }
+ catch (Exception ex)
+ {
+ // Handle exceptions
+ }
+ }
+ }
+}
diff --git a/TV Player/ViewModels/ProgramViewModel.cs b/TV Player/ViewModels/ProgramViewModel.cs
new file mode 100644
index 0000000..9926c5d
--- /dev/null
+++ b/TV Player/ViewModels/ProgramViewModel.cs
@@ -0,0 +1,38 @@
+using System.Windows.Input;
+
+namespace TV_Player.MAUI
+{
+ public class ProgramViewModel : ObservableViewModelBase
+ {
+ private List _programs;
+ public List Programs
+ {
+ get => _programs;
+ set => SetProperty(ref _programs, value);
+ }
+
+ public M3UInfo SelectedItem { get; set; }
+ public ICommand ItemSelectedCommand { get; }
+
+ public ProgramViewModel(GroupInfo groupInfo)
+ {
+ ItemSelectedCommand = new Command(OnItemSelected);
+ ProgramsData.Instance.AllPrograms.Subscribe(x=>Programs = x.Where(p=>p.GroupTitle== groupInfo.Name).ToList());
+ }
+
+ private void OnItemSelected()
+ {
+ var navigation = (INavigation)Application.Current.MainPage.Navigation;
+
+ var playerViewModel = new PlayerViewModel(SelectedItem);
+
+ // Create a new SecondPage and set its BindingContext to the ViewModel
+ var playerPage = new PlayerPage
+ {
+ BindingContext = playerViewModel
+ };
+ // Navigate to the OtherPage
+ navigation.PushAsync(playerPage);
+ }
+ }
+}
diff --git a/TV Player/ViewModels/ProgramsData.cs b/TV Player/ViewModels/ProgramsData.cs
index 0d5e8e6..cb9b721 100644
--- a/TV Player/ViewModels/ProgramsData.cs
+++ b/TV Player/ViewModels/ProgramsData.cs
@@ -1,6 +1,6 @@
using System.Reactive.Subjects;
-namespace TV_Player
+namespace TV_Player.MAUI
{
public class ProgramsData
{
@@ -14,10 +14,10 @@ namespace TV_Player
}
}
- private readonly Subject> programsSubject = new Subject>();
- private readonly Subject> groupsSubject = new Subject>();
+ private readonly ReplaySubject> programsSubject = new ReplaySubject>();
+ private readonly ReplaySubject> groupsSubject = new ReplaySubject>();
public IObservable> AllPrograms => programsSubject;
- public Subject> GroupsInformation => groupsSubject;
+ public IObservable> GroupsInformation => groupsSubject;
private ProgramsData()
{
diff --git a/TV Player_old/App.xaml.cs b/TV Player_old/App.xaml.cs
deleted file mode 100644
index ac39428..0000000
--- a/TV Player_old/App.xaml.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System.Configuration;
-using System.Data;
-using System.Windows;
-
-namespace TV_Player
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- }
-
-}
diff --git a/TV Player_old/MainWindow.xaml.cs b/TV Player_old/MainWindow.xaml.cs
deleted file mode 100644
index 23fedba..0000000
--- a/TV Player_old/MainWindow.xaml.cs
+++ /dev/null
@@ -1,102 +0,0 @@
-using System.ComponentModel;
-using System.Data.Common;
-using System.IO;
-using System.Reflection;
-using System.Windows;
-using System.Windows.Controls;
-using Vlc.DotNet.Wpf;
-
-namespace TV_Player
-{
- public partial class MainWindow : Window
- {
- private readonly DirectoryInfo vlcLibDirectory;
- private VlcControl control;
-
- public MainWindow()
- {
- InitializeComponent();
- var currentAssembly = Assembly.GetEntryAssembly();
- var currentDirectory = new FileInfo(currentAssembly.Location).DirectoryName;
- // Default installation path of VideoLAN.LibVLC.Windows
- vlcLibDirectory = new DirectoryInfo(Path.Combine(currentDirectory, "libvlc", IntPtr.Size == 4 ? "win-x86" : "win-x64"));
-
- this.control = new VlcControl();
- this.control.SourceProvider.CreatePlayer(vlcLibDirectory/* pass your player parameters here */);
-
- Initialize();
- }
-
-
-
- protected override void OnClosing(CancelEventArgs e)
- {
- this.control?.Dispose();
- base.OnClosing(e);
- }
-
- private void OnPlayButtonClick(object sender, RoutedEventArgs e)
- {
- //this.control?.Dispose();
- //this.control = new VlcControl();
- //this.ControlContainer.Content = this.control;
- //this.control.SourceProvider.CreatePlayer(this.vlcLibDirectory);
-
- // This can also be called before EndInit
- this.control.SourceProvider.MediaPlayer.Log += (_, args) =>
- {
- string message = $"libVlc : {args.Level} {args.Message} @ {args.Module}";
- System.Diagnostics.Debug.WriteLine(message);
- };
-
- control.SourceProvider.MediaPlayer.Play(new Uri("http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_surround-fix.avi"));
- }
-
- private void OnStopButtonClick(object sender, RoutedEventArgs e)
- {
- this.control?.Dispose();
- this.control = null;
- }
-
- private void OnForwardButtonClick(object sender, RoutedEventArgs e)
- {
- if (this.control == null)
- {
- return;
- }
-
- this.control.SourceProvider.MediaPlayer.Rate = 2;
- }
-
- private void GetLength_Click(object sender, RoutedEventArgs e)
- {
- if (this.control == null)
- {
- return;
- }
-
- //GetLength.Content = this.control.SourceProvider.MediaPlayer.Length + " ms";
- }
-
- private void GetCurrentTime_Click(object sender, RoutedEventArgs e)
- {
- if (this.control == null)
- {
- return;
- }
-
- //GetCurrentTime.Content = this.control.SourceProvider.MediaPlayer.Time + " ms";
- }
-
- private void SetCurrentTime_Click(object sender, RoutedEventArgs e)
- {
- if (this.control == null)
- {
- return;
- }
-
- this.control.SourceProvider.MediaPlayer.Time = 5000;
- //SetCurrentTime.Content = this.control.SourceProvider.MediaPlayer.Time + " ms";
- }
- }
-}
\ No newline at end of file
diff --git a/TV Player_old/MainWindowViewModel.cs b/TV Player_old/MainWindowViewModel.cs
deleted file mode 100644
index 371c267..0000000
--- a/TV Player_old/MainWindowViewModel.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-using System.Windows.Controls;
-
-namespace TV_Player
-{
- public class MainWindowViewModel
- {
- public MainWindowViewModel()
- {
- }
-
- private async Task Initialize()
- {
- string m3uLink = "http://pl.da-tv.vip/a71e77fa/835b3216/tv.m3u";
- var programs = await M3UParser.DownloadM3UFromWebAsync(m3uLink);
- var groupedPrograms = programs.GroupBy(item => item.GroupTitle)
- .ToDictionary(
- group => group.Key,
- group => group.Select(item => item).ToList()
- );
-
- var row = 0;
- var column = 0;
-
- foreach (var group in groupedPrograms)
- {
- var button = new GroupButton(group.Key, group.Value.Count());
- button.TouchDown += (s, e) =>
- {
-
- };
- Grid.SetRow(button, row);
- Grid.SetColumn(button, column);
- groupsGrid.Children.Add(button);
- column++;
- if (column > 4)
- {
- row++;
- column = 0;
- }
- }
- }
- }
-}
diff --git a/TV Player_old/ProgramsGroupGrid.xaml b/TV Player_old/ProgramsGroupGrid.xaml
deleted file mode 100644
index 83d6964..0000000
--- a/TV Player_old/ProgramsGroupGrid.xaml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TV Player_old/ProgramsGroupGrid.xaml.cs b/TV Player_old/ProgramsGroupGrid.xaml.cs
deleted file mode 100644
index 19a26f0..0000000
--- a/TV Player_old/ProgramsGroupGrid.xaml.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace TV_Player
-{
- ///
- /// Interaction logic for ProgramsGroupGrid.xaml
- ///
- public partial class ProgramsGroupGrid : UserControl
- {
- public ProgramsGroupGrid()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/TV player.sln b/TV player.sln
index 29c741a..28d1284 100644
--- a/TV player.sln
+++ b/TV player.sln
@@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34330.188
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TV Player", "TV Player\TV Player.csproj", "{A2ADD73B-0E50-4D86-9E1B-35FB2A31F5BF}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TV Player WPF", "TV Player WPF\TV Player WPF.csproj", "{556AB42C-8961-4051-B0DC-A6B907121B9E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TV Player MAUI", "TV Player\TV Player MAUI.csproj", "{4AEADD32-BAF5-4FB8-AB5B-63050CF46D29}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,12 +13,16 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A2ADD73B-0E50-4D86-9E1B-35FB2A31F5BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A2ADD73B-0E50-4D86-9E1B-35FB2A31F5BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A2ADD73B-0E50-4D86-9E1B-35FB2A31F5BF}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
- {A2ADD73B-0E50-4D86-9E1B-35FB2A31F5BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A2ADD73B-0E50-4D86-9E1B-35FB2A31F5BF}.Release|Any CPU.Build.0 = Release|Any CPU
- {A2ADD73B-0E50-4D86-9E1B-35FB2A31F5BF}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {556AB42C-8961-4051-B0DC-A6B907121B9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {556AB42C-8961-4051-B0DC-A6B907121B9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {556AB42C-8961-4051-B0DC-A6B907121B9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {556AB42C-8961-4051-B0DC-A6B907121B9E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4AEADD32-BAF5-4FB8-AB5B-63050CF46D29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4AEADD32-BAF5-4FB8-AB5B-63050CF46D29}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4AEADD32-BAF5-4FB8-AB5B-63050CF46D29}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {4AEADD32-BAF5-4FB8-AB5B-63050CF46D29}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4AEADD32-BAF5-4FB8-AB5B-63050CF46D29}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4AEADD32-BAF5-4FB8-AB5B-63050CF46D29}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE