public void ReturnFromRegistration() { HeadingText.GetComponent <TextMeshProUGUI>().text = "User Login"; LoginButton.SetActive(true); LoginButtonCover.SetActive(true); UserLoginText.SetActive(true); PasswordText.SetActive(true); RegisterButton.SetActive(true); //RegisterName, RegisterPassword, RegisterLocation, RegisterAge, SubmitCoverButton, SubmitButton; RegisterName.SetActive(false); RegisterPassword.SetActive(false); RegisterLocation.SetActive(false); RegisterAge.SetActive(false); SubmitCoverButton.SetActive(false); SubmitButton.SetActive(false); Registering = false; if (netManager) { if (netManager.IsConnectedToServer()) { netManager.AttemptAccountCreation(RegisterName.GetComponent <TMP_InputField>().text, RegisterPassword.GetComponent <TMP_InputField>().text); } } }
// Update is called once per frame void Update() { if (!loggingIn && !loggedIn && !Registering) { if (UserLoginText.GetComponent <TMP_InputField>().text != "" && PasswordText.GetComponent <TMP_InputField>().text != "") { LoginButton.SetActive(true); LoginButtonCover.SetActive(false); } else { LoginButton.SetActive(false); LoginButtonCover.SetActive(true); } } if (Registering) { if (RegisterName.GetComponent <TMP_InputField>().text != "" && RegisterPassword.GetComponent <TMP_InputField>().text != "" && RegisterAge.GetComponent <TMP_InputField>().text != "" && RegisterLocation.GetComponent <TMP_InputField>().text != "") { SubmitCoverButton.SetActive(false); SubmitButton.SetActive(true); } else { SubmitCoverButton.SetActive(true); SubmitButton.SetActive(false); } } if (loggingIn) { if (loginConfirmed) { fakeLoginCount++; if (fakeLoginCount > 180) { LoggedIn(); loggingIn = false; fakeLoginCount = 0; } } } if (loginFailed) { errorCount++; if (errorCount > 250) { loginFailed = false; errorCount = 0; ErrorMessageBacking.SetActive(false); ErrorMessageText.SetActive(false); } } }
public RegisterReference(RegisterLocation location, RegisterType type, int index, ComplexRegisterPart part) { this.RegisterLocation = location; this.RegisterType = type; this.RegisterIndex = index; this.ComplexRegisterPart = part; this.JumpLabel = null; }
public RegisterReference(int jumpLine, string label) { this.ComplexRegisterPart = ComplexRegisterPart.Full; this.RegisterLocation = RegisterLocation.Input; this.RegisterType = RegisterType.Integer; this.RegisterIndex = jumpLine; this.JumpLabel = label; }
/// <inheritdoc /> public override void Visit(RegisterLocation registerLocation) { Write(":").WriteSpace(); Write("register("); if (registerLocation.Profile != null) { Write(registerLocation.Profile); Write(",").WriteSpace(); } Write(registerLocation.Register); Write(")"); }
public RegisterReference(string compact) { string name = compact.ToLowerInvariant().Trim(' ', '\t'); this.ComplexRegisterPart = ComplexRegisterPart.Full; foreach (Pair pair in registersComplexParts) { if (name.EndsWith(pair.Key)) { ComplexRegisterPart currentPart; if (Enum.TryParse(pair.Member, out currentPart)) { this.ComplexRegisterPart = currentPart; } name = name.Remove(name.Length - pair.Key.Length); break; } } while (name.Length > 1 && char.IsDigit(name[name.Length - 1])) { name = name.Remove(name.Length - 1); } //ii, ir, ic, i, r, c, oi, or, oc switch (name) { case "ii": this.RegisterLocation = RegisterLocation.Input; this.RegisterType = RegisterType.Integer; break; case "ir": this.RegisterLocation = RegisterLocation.Input; this.RegisterType = RegisterType.Real; break; case "ic": this.RegisterLocation = RegisterLocation.Input; this.RegisterType = RegisterType.Complex; break; case "i": this.RegisterLocation = RegisterLocation.Work; this.RegisterType = RegisterType.Integer; break; case "r": this.RegisterLocation = RegisterLocation.Work; this.RegisterType = RegisterType.Real; break; case "c": this.RegisterLocation = RegisterLocation.Work; this.RegisterType = RegisterType.Complex; break; case "oi": this.RegisterLocation = RegisterLocation.Output; this.RegisterType = RegisterType.Integer; break; case "or": this.RegisterLocation = RegisterLocation.Output; this.RegisterType = RegisterType.Real; break; case "oc": this.RegisterLocation = RegisterLocation.Output; this.RegisterType = RegisterType.Complex; break; default: throw new InvalidOperationException(); } this.RegisterIndex = int.Parse(compact.Substring(name.Length)); this.JumpLabel = null; }
public void StartRegistration() { LoginButton.SetActive(false); LoginButtonCover.SetActive(false); UserLoginText.SetActive(false); PasswordText.SetActive(false); HeadingText.GetComponent <TextMeshProUGUI>().text = "Register New Profile"; RegisterButton.SetActive(false); //RegisterName, RegisterPassword, RegisterLocation, RegisterAge, SubmitCoverButton, SubmitButton; RegisterName.SetActive(true); RegisterPassword.SetActive(true); RegisterLocation.SetActive(true); RegisterAge.SetActive(true); SubmitCoverButton.SetActive(true); Registering = true; }
public void RegisterLocationTest() { Location location3 = new Location { LocationId = 3, Address = "Av. Jamas 3", City = "Arequipa" }; mockRepository.Setup(x => x.RegisterLocation(location3)) .Returns(true); var handler = new RegisterLocationHandler(mockRepository.Object); RegisterLocation rc = new RegisterLocation(location3); var res = handler.Handle(rc, ct); Assert.IsTrue(res.Result); }
private ConstantBufferSyntax ParseConstantBuffer() { var attributes = ParseAttributes(); var cbuffer = NextToken(); var name = Match(SyntaxKind.IdentifierToken); RegisterLocation register = null; if (Current.Kind == SyntaxKind.ColonToken && Lookahead.Kind == SyntaxKind.RegisterKeyword) { register = ParseRegisterLocation(); } var openBrace = Match(SyntaxKind.OpenBraceToken); var fields = new List <VariableDeclarationStatementSyntax>(); while (Current.Kind != SyntaxKind.CloseBraceToken) { if (IsPossibleVariableDeclarationStatement()) { fields.Add(ParseVariableDeclarationStatement()); } else { var action = SkipBadTokens( p => !p.IsPossibleVariableDeclarationStatement(), p => p.IsTerminator(), SyntaxKind.CloseBraceToken); if (action == PostSkipAction.Abort) { break; } } } var closeBrace = Match(SyntaxKind.CloseBraceToken); var semicolon = NextTokenIf(SyntaxKind.SemiToken); return(new ConstantBufferSyntax(attributes, cbuffer, name, register, openBrace, fields, closeBrace, semicolon)); }
private ConstantBufferSyntax ParseConstantBuffer() { var cbuffer = NextToken(); var name = Match(SyntaxKind.IdentifierToken); RegisterLocation register = null; if (Current.Kind == SyntaxKind.ColonToken && Lookahead.Kind == SyntaxKind.RegisterKeyword) { register = ParseRegisterLocation(); } var openBrace = Match(SyntaxKind.OpenBraceToken); var declarations = new List <SyntaxNode>(); ParseTopLevelDeclarations(declarations, SyntaxKind.CloseBraceToken); var closeBrace = Match(SyntaxKind.CloseBraceToken); var semicolon = NextTokenIf(SyntaxKind.SemiToken); return(new ConstantBufferSyntax(cbuffer, name, register, openBrace, declarations, closeBrace, semicolon)); }
public override void VisitRegisterLocation(RegisterLocation node) { CreateTag(node.Register, HlslClassificationTypeNames.RegisterLocation); base.VisitRegisterLocation(node); }
/// <inheritdoc /> public override void Visit(RegisterLocation registerLocation) { }
public override void VisitRegisterLocation(RegisterLocation node) { CreateTag(node.Register, _classificationService.RegisterLocation); base.VisitRegisterLocation(node); }
public virtual void VisitRegisterLocation(RegisterLocation node) { DefaultVisit(node); }
public override int GetHashCode() { return(RegisterLocation.GetHashCode() ^ ActuallyLocation.GetHashCode()); }