public VhptUserControl CreateUserControl(VhptIdentification vhptId)
        {
            var vhptUserControl = new VhptUserControl();

            vhptUserControl.Initialize(vhptId);

            this.eventBroker.Register(vhptUserControl);

            return vhptUserControl;
        }
        public VhptController(IVhpt vhpt, IStateMachine<VhptStates, VhptEvents> stateMachine, JokeTelling.IJokeTeller jokeTeller)
        {
            this.vhpt = vhpt;
            this.stateMachine = stateMachine;
            this.jokeTeller = jokeTeller;

            this.vhptIdentification = new VhptIdentification(this.vhpt.Id, this.vhpt.Name);

            this.RegisterVhptEvents();
            this.InitialzeStateMachine();
        }
 public bool Equals(VhptIdentification other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other.Id.Equals(this.Id) && Equals(other.Name, this.Name);
 }
 public void Initialize(VhptIdentification vhptId)
 {
     this.vhptId = vhptId;
 }