コード例 #1
0
        private void OpenJournal_Click(object sender, RoutedEventArgs e)
        {
            var dlg = new OpenFileDialog();

            dlg.Filter = "Open Secure Journal Files (.osj)|*.osj"; // Filter files by extension

            var result = dlg.ShowDialog();

            if (result == true)
            {
                var filename = dlg.FileName;
                var contents = File.ReadAllText(filename);

                ActiveJournalService.EncryptedJournalText = contents;

                var newWindow = new PasswordPromptWindow();
                newWindow.Show();
            }
        }
コード例 #2
0
        private void NewJournal_Click(object sender, RoutedEventArgs e)
        {
            var newWindow = new PasswordPromptWindow();

            newWindow.Show();
        }