public FakeBikeClient(string uid) { fakeState.ID = uid; fakeState.CompletionProgress = (float)rnd.NextDouble(); fakeState.Transform.M44 = (float)rnd.NextDouble(); tn.Connect(uid); Thread.Sleep(100); StartUpParameters sup = tn.DownloadStartUpParameters(); }
public override void Engage(int keyValue) { //MessageBox.Show("*** Y ** Logon ***"+ this.PeekState().ToString() ); StartUpParameters states = (StartUpParameters)this.PeekState(); switch (states) { case StartUpParameters.EnterOrganization: PosContext.Instance.ClearInput(); this.PromptText = "Organization no"; PosContext.Instance.Operprompt.Update(this); this.States().PushState((int)StartUpParameters.GetOrganization); break; case StartUpParameters.EnterStore: PosContext.Instance.ClearInput(); this.PromptText = "Store no"; PosContext.Instance.Operprompt.Update(this); this.States().PushState((int)StartUpParameters.GetStore); break; case StartUpParameters.EnterStation: PosContext.Instance.ClearInput(); this.PromptText = "Station no"; PosContext.Instance.Operprompt.Update(this); this.States().PushState((int)StartUpParameters.GetStation); break; case StartUpParameters.EnterConfigNo: PosContext.Instance.ClearInput(); this.PromptText = "Config no"; PosContext.Instance.Operprompt.Update(this); this.States().PushState((int)StartUpParameters.GetConfigNumber); break; case StartUpParameters.GetOrganization: /*this.States().PopState(); * pass = PosContext.Instance.InputLine; * try * { * passno = int.Parse(pass); * } * catch * { * PosContext.Instance.Operprompt.Update(this); * return; * } * * if (this.CheckLogon()) * { * * this.States().Clear(); * PosContext.Instance.Receipt.Update(this); * PosContext.Instance.ClearInput(); * } * else * { * //this.PromptText = PosContext.Instance.Parameters.getParam("BadName"); * //PosContext.Instance.Operprompt.Update(this); * PosError posError = new PosError(errorCode); * PosEventStack.Instance.PushEvent(posError); * } * * PosEventStack.Instance.NextEvent(); */ break; case StartUpParameters.GetStore: break; case StartUpParameters.GetStation: break; case StartUpParameters.GetPosNumber: break; //default: } }