Files
duplicati/Duplicati/Winforms/Controls/PasswordConfirmationDialog.cs
T
kenneth.skovhede@gmail.com e2f7c2afac Update issue #346
Status: Fixed
I have now added password verification dialogs to all password fields.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@674 59da171f-624f-0410-aa54-27559c288bec
2011-01-15 15:40:33 +00:00

37 lines
1019 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Duplicati.Winforms.Controls
{
public partial class PasswordConfirmationDialog : Form
{
private string m_previousPassword;
public PasswordConfirmationDialog(string previousPassword)
{
InitializeComponent();
m_previousPassword = previousPassword;
}
private void OKBtn_Click(object sender, EventArgs e)
{
if (m_previousPassword != Password.Text)
{
MessageBox.Show(this, Strings.PasswordConfirmationDialog.PasswordDoNotMatchError, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
else
{
this.DialogResult = DialogResult.OK;
this.Close();
}
}
}
}