diff --git a/Examples/WPF/Controls/MPVControl.xaml.cs b/Examples/WPF/Controls/MPVControl.xaml.cs
index c5cdaa2..ad080a3 100644
--- a/Examples/WPF/Controls/MPVControl.xaml.cs
+++ b/Examples/WPF/Controls/MPVControl.xaml.cs
@@ -3,11 +3,18 @@
namespace Nickvision.MPVSharp.Examples.WPF.Controls;
+///
+/// MPV WPF Control.
+/// Embedded window is created and MPV window is connected to it (see ).
+///
public partial class MPVControl : UserControl
{
private Client _client;
private MPVHwndHost _hwndHost;
+ ///
+ /// Constructs MPVControl
+ ///
public MPVControl()
{
InitializeComponent();
@@ -19,11 +26,18 @@ public MPVControl()
AddChild(_hwndHost);
}
+ ///
+ /// Loads and plays file from path or URL
+ ///
+ /// Path or URL
public void Load(string url)
{
_client.LoadFile(url);
_client.SetProperty("pause", false);
}
+ ///
+ /// Toggles pause
+ ///
public void CyclePause() => _client.CyclePause();
}
\ No newline at end of file
diff --git a/Examples/WPF/Views/MainWindow.xaml.cs b/Examples/WPF/Views/MainWindow.xaml.cs
index 3dc2f72..5110f5b 100644
--- a/Examples/WPF/Views/MainWindow.xaml.cs
+++ b/Examples/WPF/Views/MainWindow.xaml.cs
@@ -9,11 +9,19 @@ namespace Nickvision.MPVSharp.Examples.WPF.Views;
///
public partial class MainWindow : Window
{
+ ///
+ /// Constructs MainWindow
+ ///
public MainWindow()
{
InitializeComponent();
}
+ ///
+ /// Occurs when Open Video File button was clicked
+ ///
+ /// Sender
+ /// RoutedEventArgs
private void OnOpenVideo(object sender, RoutedEventArgs e)
{
var openFileDialog = new OpenFileDialog()
@@ -28,11 +36,31 @@ private void OnOpenVideo(object sender, RoutedEventArgs e)
OnLoadVideo(sender, e);
}
+ ///
+ /// Occurs when Exit action was activated
+ ///
+ /// Sender
+ /// RoutedEventArgs
private void OnExit(object sender, RoutedEventArgs e) => Close();
+ ///
+ /// Occurs when Load Video button was clicked
+ ///
+ /// Sender
+ /// RoutedEventArgs
private void OnLoadVideo(object sender, RoutedEventArgs e) => MPV.Load(TxtUrl.Text);
+ ///
+ /// Occurs when Pause button aws clicked
+ ///
+ /// Sender
+ /// RoutedEventArgs
private void OnPause(object sender, RoutedEventArgs e) => MPV.CyclePause();
+ ///
+ /// Occurs when About action was activated
+ ///
+ /// Sender
+ /// RoutedEventArgs
private void OnAbout(object sender, RoutedEventArgs e) => MessageBox.Show("WPF MPV# Example", "About", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK);
}