Exemple #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            LoginCredentialsVM viewModel = (LoginCredentialsVM)DataContext;
            LoginPort          client    = Globals.LoginClient;
            GetLoginResponse1  response  = client.GetLogin(new GetLoginRequest1(new GetLoginRequest()
            {
                email    = viewModel.Email,
                password = passwordBox.Password
            }));

            Globals.LoggedAgent = response.GetLoginResponse.AgentDetails;
            DialogResult        = true;
            Close();
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserId != 0L)
            {
                hash ^= UserId.GetHashCode();
            }
            if (UserName.Length != 0)
            {
                hash ^= UserName.GetHashCode();
            }
            if (Token.Length != 0)
            {
                hash ^= Token.GetHashCode();
            }
            if (LoginIP.Length != 0)
            {
                hash ^= LoginIP.GetHashCode();
            }
            if (LoginPort != 0)
            {
                hash ^= LoginPort.GetHashCode();
            }
            if (GateIP.Length != 0)
            {
                hash ^= GateIP.GetHashCode();
            }
            if (GatePort != 0)
            {
                hash ^= GatePort.GetHashCode();
            }
            if (ApiIP.Length != 0)
            {
                hash ^= ApiIP.GetHashCode();
            }
            if (ApiPort != 0)
            {
                hash ^= ApiPort.GetHashCode();
            }
            return(hash);
        }