Exemplo n.º 1
0
        // https://daedtech.com/directory-browser-dialog/
        // https://stackoverflow.com/questions/740837/how-to-create-a-password-protected-file-in-c-sharp
        // https://www.codeproject.com/Questions/552029/EncryptplusandplusDecryptplustheplusfilesplusinplu
        private void CreateFile()
        {
            var file = this.Location + "\\" + this.FileName + ".kh";

            TechOperations.CurrentWorkingFile = file;
            SecureHelper.CreateFileDb(new FileInfo(file));

            this.CachePathInConfig(file);
            this.CreateFilePassword();

            MessageBox.Show("Your file has been created!", "Info", MessageBoxButton.OK, MessageBoxImage.Information);

            this.FileName     = string.Empty;
            this.Location     = string.Empty;
            this.FilePassword = string.Empty;
        }