summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/GuildMinePVPBeginView.cs
blob: 9924190d22d8f649292ef720cb89cff89620d840 (plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
using System;
using XMainClient.UI;
using XMainClient.UI.UICommon;
using XUtliPoolLib;

namespace XMainClient
{
	internal class GuildMinePVPBeginView : DlgBase<GuildMinePVPBeginView, GuildMinePVPBeginBehaviour>
	{
		public override string fileName
		{
			get
			{
				return "Guild/GuildMine/GuildMinePVPBegin";
			}
		}

		public override int layer
		{
			get
			{
				return 1;
			}
		}

		public override int group
		{
			get
			{
				return 1;
			}
		}

		public override bool autoload
		{
			get
			{
				return true;
			}
		}

		public override bool isPopup
		{
			get
			{
				return true;
			}
		}

		private uint _TimerID = 0u;

		protected override void OnShow()
		{
			base.OnShow();
			XSingleton<XTimerMgr>.singleton.KillTimer(this._TimerID);
			this._TimerID = XSingleton<XTimerMgr>.singleton.SetTimer(10f, new XTimerMgr.ElapsedEventHandler(this.AutoClose), null);
		}

		protected override void OnHide()
		{
			XSingleton<XTimerMgr>.singleton.KillTimer(this._TimerID);
			this._TimerID = 0u;
			base.OnHide();
		}

		protected override void OnUnload()
		{
			XSingleton<XTimerMgr>.singleton.KillTimer(this._TimerID);
			this._TimerID = 0u;
			base.OnUnload();
		}

		private void AutoClose(object param)
		{
			bool flag = base.IsVisible();
			if (flag)
			{
				XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ENTER_TIME_OUT"), "fece00");
				DlgBase<GuildMinePVPBeginView, GuildMinePVPBeginBehaviour>.singleton.SetVisibleWithAnimation(false, null);
			}
		}
	}
}