public void ImportPasswords(object sender, EventArgs e) { var result = _openFileDialog.ShowDialog(); if (result != DialogResult.OK) { return; } _credentialService.ImportCredentials(_openFileDialog.FileName); if (_credentialService.Credentials.Any()) { _window.CopyPasswordToClipboardMenuItem.Enabled = true; _window.ExportPasswordsMenuItem.Enabled = true; } else { _window.TrayBarMenu.ShowBalloonTip(_configuration.DefaultBalloonTipTimeout, "Passwords", "Uploaded file has no entries. Please load passwords.", ToolTipIcon.Info); _window.CopyPasswordToClipboardMenuItem.Enabled = false; _window.ExportPasswordsMenuItem.Enabled = false; } }