diff options
author | sr55 <[email protected]> | 2011-12-21 18:01:05 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-12-21 18:01:05 +0000 |
commit | 122ea23a9cc9b22313fee0648fa9831132074817 (patch) | |
tree | 84388224cf67ea970b3fcb4a1402439cab3444bc /win/CS/HandBrakeWPF/Views/MainView.xaml.cs | |
parent | ce0f63d8cb8bfacaf4fc139ac49eaf0775bb27e1 (diff) |
WinGui: (WPF) Some further work on the WPF GUI. Started to hook up presets.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4379 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/MainView.xaml.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs index 165e74923..347b83547 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs @@ -11,6 +11,10 @@ namespace HandBrakeWPF.Views {
using System.Windows;
+ using HandBrake.ApplicationServices.Model;
+
+ using HandBrakeWPF.ViewModels.Interfaces;
+
/// <summary>
/// Interaction logic for MainView.xaml
/// </summary>
@@ -23,5 +27,31 @@ namespace HandBrakeWPF.Views {
InitializeComponent();
}
+
+ /// <summary>
+ /// Gets ViewModel.
+ /// </summary>
+ private IMainViewModel ViewModel
+ {
+ get
+ {
+ return ((IMainViewModel)this.DataContext);
+ }
+ }
+
+ /// <summary>
+ /// Set the Selected Preset Property.
+ /// The SelectedItem property of a treeview is readonly.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The RoutedPropertyChangedEventArgs.
+ /// </param>
+ private void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
+ {
+ this.ViewModel.SelectedPreset = e.NewValue as Preset;
+ }
}
}
|