BankProject/Client/Context/IntroContext.cs
GabrielTofvesson 9755f06120 * Added flush command to server to flush database
* Fixed how database manages user removal
* Added serverside user removal
* Added UI and netcode for user removal on clientside
* Fixed text rendering for TextView and InputView
* Removed redundant properties from TextView
* Simplified event system in Intro
2018-05-15 23:21:58 +02:00

39 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Client.ConsoleForms;
using Client.ConsoleForms.Graphics;
namespace Client
{
public sealed class IntroContext : Context
{
public IntroContext(ContextManager manager, Action onComplete) : base(manager, "Intro", "Common")
{
GetView<DialogView>("welcome").RegisterSelectListener((v, i, s) =>
{
Hide(v);
if (i == 1) onComplete();
else Show("describe1");
});
GetView<DialogView>("describe5").RegisterSelectListener((v, i, s) =>
{
Hide(v);
Show("describe4_1");
});
GetView<DialogView>("describe5").OnBackEvent = v =>
{
Hide(v);
onComplete();
};
}
public override void OnCreate() => Show("welcome");
public override void OnDestroy() { }
}
}