Ejemplo n.º 1
0
        private void ReadFile(string fileName)
        {
            var password     = "******";
            var key          = Coder.PasswordToKey(password);
            var dialogResult = new PasswordForm(key).ShowDialog( );

            if (dialogResult == DialogResult.OK)
            {
                var streamReader = new StreamReaderDecorator(fileName, fileReadProgress);
                var readStrings  = streamReader.ReadLines( );
            }
        }
Ejemplo n.º 2
0
        private void ButtonOk_Click(object sender, EventArgs e)
        {
            int key = Coder.PasswordToKey(textBoxPassword.Text);

            if (this.key == key)
            {
                DialogResult = DialogResult.OK;
                Close( );
            }
            else
            {
                textBoxPassword.Text = string.Empty;
                labelIncorectPassword.Show( );
            }
        }