Esempio n. 1
0
        private void login(object sender, RoutedEventArgs e)
        {
            int canTryLoginCode = datafile.canTryLogin();

            if (canTryLoginCode == -1)
            {
                MessageBox.Show("최근에 로그인을 너무 많이 실패했습니다. " + datafile.getNextAvailableLoginText() + " 후에 시도하십시오.");
                return;
            }

            if (datafile.isCorrectPassword(inputRootPassword.Password))
            {
                if (inputRootPassword.Password == EncryptedDatafile.DEFAULT_ROOT_PW)
                {
                    App.Current.MainWindow.Hide();
                    RootPasswordSetting rootPasswordSetting = new RootPasswordSetting(fileManager);
                    rootPasswordSetting.Show();
                }
                else
                {
                    this.Hide();
                    PasswordManage passwordManage = new PasswordManage(fileManager);
                    passwordManage.Show();
                }
            }
            else
            {
                MessageBox.Show("비밀번호가 틀렸습니다. (시도 " + canTryLoginCode + "회 남음)");
            }
            inputRootPassword.Password = "";
        }
Esempio n. 2
0
        private void ResetRootPassword(object sender, RoutedEventArgs e)
        {
            this.Hide();
            RootPasswordSetting rootPasswordSetting = new RootPasswordSetting(fileManager);

            rootPasswordSetting.ShowDialog();
        }