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 @@ + + + + + + + + + + + + + +