Exemplo n.º 1
0
        public string fileEncryption_GetPassword()
        {
            this.Show();
            this.Activate();

            PasswordWindow password = new PasswordWindow(false);
            password.Owner = this;
            password.WindowStartupLocation = WindowStartupLocation.CenterOwner;

            if (password.ShowDialog() == true)
                return password.Password;
            else
                return null;
        }
Exemplo n.º 2
0
        internal void lblDecrypt_Drop(object sender, DragEventArgs e)
        {
            this.Cursor = Cursors.Wait;

            string[] files = Encryption.Instance.GetFilesOfType(e.Data.GetData(DataFormats.FileDrop) as string[], true);

            this.Cursor = Cursors.Arrow;

            if (files.Length > 0)
            {
                this.Activate();

                PasswordWindow password = new PasswordWindow(false);
                password.Owner = this;
                password.WindowStartupLocation = WindowStartupLocation.CenterOwner;

                if (password.ShowDialog() == true)
                {
                    Encryption.Instance.AddFiles(new PasswordAndFiles(password.Password, files, false));
                }
            }
        }