예제 #1
0
        private void WriteAll(string file_path, byte[] info)
        {
            string parent_folder = PathFunctions.GetParentFolderPath(file_path);

            CreateAllFolders(parent_folder);
            File.WriteAllBytes(file_path, info);
        }
예제 #2
0
 private void CreateAllFolders(string folder_path)
 {
     if (!Directory.Exists(folder_path))
     {
         string parent_folder = PathFunctions.GetParentFolderPath(folder_path);
         CreateAllFolders(parent_folder);
         Directory.CreateDirectory(folder_path);
     }
 }
예제 #3
0
        private void InitializeFormFields()
        {
            _operations = new Action[2];
            _operations[(int)TypeOfOperation.encode] = Encode;
            _operations[(int)TypeOfOperation.decode] = Decode;

            Application.ApplicationExit += new EventHandler(this.OnApplicationExit);

            _token_source = new CancellationTokenSource();
            _canc_token   = _token_source.Token;

            ResetProgressBarDelegate = new Reset(ResetProgressBar);
            PerformStepDelegate      = new Perform(PerformStep);
            OfferToSkip = new Message(CheckIfCorrectPath);
            _destination_folder_path = PathFunctions.SetDestinationFolderPath(_source_file_or_folder_path);
        }