static void Main(string[] args) { ContextLogin ctx = new ContextLogin(); NewLogin loginstate = new NewLogin(ctx); ctx.Init(loginstate); Console.WriteLine("Welcome to my website. Please enter your password"); string password = Console.ReadLine(); ctx.login(password); ctx.login("Aa123456"); ctx.restart(); ctx.login("12345"); ctx.login("123"); ctx.login("15"); ctx.restart(); ctx.login("123"); ctx.login("Aa123456"); }
public LoginFailed(ContextLogin ctx) : base(ctx) { }
public StateLoginBase(ContextLogin ctx) { this.ctx = ctx; }
public Locked(ContextLogin ctx) : base(ctx) { }
public NewLogin(ContextLogin ctx) : base(ctx) { }
public LoginSucceed(ContextLogin ctx) : base(ctx) { }