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; }
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)); } } }