Пример #1
0
        private void ExitLabel_Click(object sender, EventArgs e)
        {
            cutsform.Enabled = true;
            cutsform.Show();

            this.Dispose();
        }
Пример #2
0
        private void SaveBtn_Click(object sender, EventArgs e)
        {
            string link        = linkbox.Text;
            string description = descbox.Text;

            using (EFDbContext db = new EFDbContext())
            {
                db.Shortcuts.Add(new Entities.Shortcut()
                {
                    Link = CypherClass.XORCipher(link, key), Desc = CypherClass.XORCipher(description, key), UserId = user.Id
                });
                db.SaveChanges();
            }
            cutsform.Enabled = true;
            cutsform.Dispose();
            this.Hide();
            CutsForm cutsf = new CutsForm(user);

            cutsf.Show();
        }
Пример #3
0
        private async void LoginButton_Click(object sender, EventArgs e)
        {
            LoadingPic.Visible = true;
            string userLogin     = loginBox.Text;
            string userPass      = passBox.Text;
            bool   successfulLog = false;

            await Task.Run(() => LoginMethod(userLogin, userPass, ref successfulLog));

            LoadingPic.Visible = false;
            if (successfulLog)
            {
                MessageBox.Show("Ви увійшли у систему");
                this.Hide();
                main.Show();
            }
            else
            {
                MessageBox.Show("Неправильний логін або пароль");
            }
        }
 private void CloseForm()
 {
     cutsForm.Enabled = true;
     cutsForm.Show();
     this.Dispose();
 }