Beispiel #1
0
        void BtnLoginClick(object sender, EventArgs e)
        {
            string pass = txtPassword.Text;
            string path = DiskHelper.GetRegistryValue("Path");

            if (IdHandler.IsValidUser(pass))
            {
                IdHandler.GetUuid(pass);
                LoggedIn();
                loggedIn = true;
                _idx     = new Index(path);
                _p2P     = new Network(25565, _idx, path);
                _p2P.Start();
                _idx.Load();
                IndexEventHandlers();

                if (!_idx.Load())
                {
                    _idx.BuildIndex();
                }
                _idx.Start();
                _idx.MakeIntegrityCheck();
            }
            else
            {
                Controls.Add(lblNope);
            }
        }
Beispiel #2
0
        public void WrongPasswordInvalidUser()
        {
            IdHandler.CreateUser(Password);
            bool result = IdHandler.IsValidUser("wrong");

            IdHandler.RemoveUser();

            Assert.IsFalse(result);
        }
Beispiel #3
0
        public void ValidateUser()
        {
            IdHandler.CreateUser(Password);
            bool result = IdHandler.IsValidUser(Password);

            IdHandler.RemoveUser();

            Assert.IsTrue(result);
        }