-
Notifications
You must be signed in to change notification settings - Fork 0
/
ScreenElement.cs
42 lines (36 loc) · 1.07 KB
/
ScreenElement.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using HashTable = System.Collections.Generic.Dictionary<object, object>;
namespace PatrolCommander
{
class ScreenElement
{
private FrameworkElement frameworkElement;
public delegate void OnShowHide();
public event OnShowHide OnShow;
public event OnShowHide OnHide;
public HashTable param;
public ScreenElement(FrameworkElement frameworkElement)
{
this.frameworkElement = frameworkElement;
frameworkElement.Visibility = Visibility.Collapsed;
}
virtual public void Show(HashTable param)
{
frameworkElement.Visibility = Visibility.Visible;
this.param = param;
if (OnShow != null)
OnShow();
}
virtual public void Hide()
{
frameworkElement.Visibility = Visibility.Collapsed;
if (OnHide != null)
OnHide();
}
}
}