-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoaderManeger.cs
More file actions
46 lines (39 loc) · 1.07 KB
/
Copy pathLoaderManeger.cs
File metadata and controls
46 lines (39 loc) · 1.07 KB
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
using System.Windows;
namespace _01LabChumachenko
{
internal class LoaderManager
{
private static readonly object Locker = new object();
private static LoaderManager _instance;
internal static LoaderManager Instance
{
get
{
if (_instance != null)
return _instance;
lock (Locker)
{
return _instance ?? (_instance = new LoaderManager());
}
}
}
private ILoaderOwner _loaderOwner;
private LoaderManager()
{
}
internal void Initialize(ILoaderOwner loaderOwner)
{
_loaderOwner = loaderOwner;
}
internal void ShowLoader()
{
_loaderOwner.LoaderVisibility = Visibility.Visible;
_loaderOwner.IsControlEnabled = false;
}
internal void HideLoader()
{
_loaderOwner.LoaderVisibility = Visibility.Hidden;
_loaderOwner.IsControlEnabled = true;
}
}
}