-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
White border when in fullscreen #1 rework of subtitle online search adding dependency msvcr110.dll various minot fixes
- Loading branch information
Showing
69 changed files
with
1,313 additions
and
309 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
MediaPoint_App/AttachedProperties/ItemsControlDoubleClickMouseInputBinding.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Input; | ||
|
||
namespace MediaPoint.App.AttachedProperties | ||
{ | ||
public class InputBindingCommandSetter | ||
{ | ||
public static readonly DependencyProperty CommandProperty = | ||
DependencyProperty.RegisterAttached("Command", | ||
typeof(ICommand), typeof(InputBindingCommandSetter), new PropertyMetadata(new PropertyChangedCallback(CommandChanged))); | ||
|
||
private static void CommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) | ||
{ | ||
SetCommand(d as InputBinding, (ICommand)e.NewValue); | ||
} | ||
|
||
public static ICommand GetCommand(InputBinding element) | ||
{ | ||
return (ICommand)element.GetValue(CommandProperty); | ||
} | ||
|
||
public static void SetCommand(InputBinding element, ICommand value) | ||
{ | ||
element.SetValue(CommandProperty, value); | ||
element.Command = value; | ||
} | ||
} | ||
|
||
public class ItemsControlDoubleClickMouseInputBinding : DependencyObject | ||
{ | ||
public ItemsControlDoubleClickMouseInputBinding() { } | ||
|
||
public static readonly DependencyProperty EnabledProperty = | ||
DependencyProperty.RegisterAttached("Enabled", | ||
typeof(bool), typeof(ItemsControlDoubleClickMouseInputBinding), new PropertyMetadata(new PropertyChangedCallback(EnabledChanged))); | ||
|
||
private static void EnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) | ||
{ | ||
SetEnabled(d as ItemsControl, (bool)e.NewValue); | ||
} | ||
|
||
public static bool GetEnabled(ItemsControl element) | ||
{ | ||
return (bool)element.GetValue(EnabledProperty); | ||
} | ||
|
||
public static void SetEnabled(ItemsControl element, bool value) | ||
{ | ||
element.SetValue(EnabledProperty, value); | ||
|
||
if (value) | ||
{ | ||
element.PreviewMouseDoubleClick += element_PreviewMouseDoubleClick; | ||
} | ||
else | ||
{ | ||
element.PreviewMouseDoubleClick -= element_PreviewMouseDoubleClick; | ||
} | ||
} | ||
|
||
public static readonly DependencyProperty RestrictToProperty = | ||
DependencyProperty.RegisterAttached("RestrictTo", | ||
typeof(string), typeof(ItemsControlDoubleClickMouseInputBinding)); | ||
|
||
public static string GetRestrictTo(ItemsControl element) | ||
{ | ||
return (string)element.GetValue(RestrictToProperty); | ||
} | ||
|
||
public static void SetRestrictTo(ItemsControl element, string value) | ||
{ | ||
element.SetValue(RestrictToProperty, value); | ||
} | ||
|
||
static void element_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e) | ||
{ | ||
ItemsControl control = sender as ItemsControl; | ||
|
||
foreach (InputBinding b in control.InputBindings) | ||
{ | ||
if (!(b is MouseBinding)) | ||
{ | ||
continue; | ||
} | ||
|
||
if (b.Gesture != null | ||
&& b.Gesture is MouseGesture | ||
&& ((MouseGesture)b.Gesture).MouseAction == MouseAction.LeftDoubleClick | ||
&& b.Command.CanExecute(null)) | ||
{ | ||
b.Command.Execute(b.CommandParameter); | ||
e.Handled = true; | ||
} | ||
} | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Windows; | ||
using System.Windows.Data; | ||
using System.Windows.Media; | ||
using MediaPoint.Controls.Extensions; | ||
|
||
namespace MediaPoint.Converters | ||
{ | ||
public class FullscreenPaddingConverter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) | ||
{ | ||
var w = value as Window; | ||
|
||
if (w == null) return 0; | ||
|
||
Size actual = new Size(w.ActualWidth, w.ActualHeight); | ||
var source = PresentationSource.FromVisual(w); | ||
Matrix transformFromDevice = source.CompositionTarget.TransformFromDevice; | ||
Size monitor = MediaPoint.Controls.Extensions.WindowExtensions.MonitorSize(ref w, transformFromDevice); | ||
//w.Visibility = Visibility.Collapsed; | ||
//w.Dispatcher.BeginInvoke((Action)(() => | ||
//{ | ||
|
||
//}), System.Windows.Threading.DispatcherPriority.ContextIdle); | ||
var s = actual.Difference(monitor); | ||
//var ret2 = new Thickness(s.Width / 2, s.Height / 2, s.Width / 2, s.Height / 2); | ||
//System.Diagnostics.Debug.WriteLine(ret2.ToString()); | ||
return s.Width / 2; | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) | ||
{ | ||
return !(bool)value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Windows.Data; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
|
||
namespace MediaPoint.Converters | ||
{ | ||
public class LanguageToFlagConverter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) | ||
{ | ||
if (value == null) return null; | ||
|
||
var uri = new Uri("pack://application:,,,/MediaPoint;component/Images/countryflags/" + value.ToString() + ".gif", UriKind.RelativeOrAbsolute); | ||
return new BitmapImage(uri); | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) | ||
{ | ||
return null; | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.