diff --git a/LibVLCSharp.WPF.Sample/App.config b/LibVLCSharp.WPF.Sample/App.config new file mode 100644 index 000000000..731f6de6c --- /dev/null +++ b/LibVLCSharp.WPF.Sample/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/LibVLCSharp.WPF.Sample/App.xaml b/LibVLCSharp.WPF.Sample/App.xaml new file mode 100644 index 000000000..2d1dc7fcc --- /dev/null +++ b/LibVLCSharp.WPF.Sample/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/LibVLCSharp.WPF.Sample/App.xaml.cs b/LibVLCSharp.WPF.Sample/App.xaml.cs new file mode 100644 index 000000000..814043037 --- /dev/null +++ b/LibVLCSharp.WPF.Sample/App.xaml.cs @@ -0,0 +1,8 @@ +using System.Windows; + +namespace LibVlcSharp.Wpf.Sample +{ + public class App : Application + { + } +} \ No newline at end of file diff --git a/LibVLCSharp.WPF.Sample/Controls.xaml b/LibVLCSharp.WPF.Sample/Controls.xaml new file mode 100644 index 000000000..2f8b2f657 --- /dev/null +++ b/LibVLCSharp.WPF.Sample/Controls.xaml @@ -0,0 +1,13 @@ + + + + + + diff --git a/LibVLCSharp.WPF.Sample/Controls.xaml.cs b/LibVLCSharp.WPF.Sample/Controls.xaml.cs new file mode 100644 index 000000000..0fce3d4ca --- /dev/null +++ b/LibVLCSharp.WPF.Sample/Controls.xaml.cs @@ -0,0 +1,39 @@ +using LibVLCSharp.Shared; + +using System.Windows; +using System.Windows.Controls; + +namespace LibVLCSharp.WPF.Sample +{ + public partial class Controls : UserControl + { + readonly Example1 parent; + + public Controls(Example1 Parent) + { + parent = Parent; + + InitializeComponent(); + + PlayButton.Click += PlayButton_Click; + StopButton.Click += StopButton_Click; + } + + void StopButton_Click(object sender, RoutedEventArgs e) + { + if (parent.Player.MediaPlayer.IsPlaying) + { + parent.Player.MediaPlayer.Stop(); + } + } + + void PlayButton_Click(object sender, RoutedEventArgs e) + { + if (!parent.Player.MediaPlayer.IsPlaying) + { + parent.Player.MediaPlayer.Play(new Media(parent.Player.LibVLC, + "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation)); + } + } + } +} \ No newline at end of file diff --git a/LibVLCSharp.WPF.Sample/Example1.xaml b/LibVLCSharp.WPF.Sample/Example1.xaml new file mode 100644 index 000000000..66e3afdae --- /dev/null +++ b/LibVLCSharp.WPF.Sample/Example1.xaml @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/LibVLCSharp.WPF.Sample/Example1.xaml.cs b/LibVLCSharp.WPF.Sample/Example1.xaml.cs new file mode 100644 index 000000000..627bfbd0a --- /dev/null +++ b/LibVLCSharp.WPF.Sample/Example1.xaml.cs @@ -0,0 +1,17 @@ +using System.Windows; + +namespace LibVLCSharp.WPF.Sample +{ + public partial class Example1 : Window + { + readonly Controls _controls; + + public Example1() + { + InitializeComponent(); + + _controls = new Controls(this); + Player.Content = _controls; + } + } +} \ No newline at end of file diff --git a/LibVLCSharp.WPF.Sample/Example2.xaml b/LibVLCSharp.WPF.Sample/Example2.xaml new file mode 100644 index 000000000..db983e5ea --- /dev/null +++ b/LibVLCSharp.WPF.Sample/Example2.xaml @@ -0,0 +1,18 @@ + + + + +