-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.xaml.cs
49 lines (44 loc) · 1.31 KB
/
App.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using System.Windows;
namespace WpfWebRTCPlayer
{
public static class GlobalValues
{
public static PlayerWindow PlayerWindow { set; get; }
private static bool playerWindowEnable = true;
public static bool PlayerWindowEnable
{
get
{
return playerWindowEnable;
}
set
{
playerWindowEnable = value;
RaiseStaticPropertyChanged(() => playerWindowEnable);
}
}
public static event EventHandler<PropertyChangedEventArgs> StaticPropertyChanged;
public static void RaiseStaticPropertyChanged<T>(Expression<Func<T>> propertyExpression)
{
if (StaticPropertyChanged != null)
{
var propertyName = (propertyExpression.Body as MemberExpression).Member.Name;
StaticPropertyChanged(null, new PropertyChangedEventArgs(propertyName));
}
}
}
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}