@@ -96,6 +96,7 @@ private void SaveToRegistry()
9696 data . UseEscapeChars = chkUseEscapeChars . Checked ;
9797 data . Encoding = cmbEncoding . Text ;
9898 data . ExcludeDir = txtExcludeDir . Text ;
99+ data . IsKeepModifiedDate = chkKeepModifiedDate . Checked ;
99100
100101 data . SaveToRegistry ( ) ;
101102
@@ -504,7 +505,8 @@ private void ShowReplaceResult(Replacer.ReplaceResultItem replaceResultItem, Sta
504505 {
505506 string fileContent = string . Empty ;
506507
507- using ( var sr = new StreamReader ( replaceResultItem . FilePath , replaceResultItem . FileEncoding ) )
508+
509+ using ( var sr = new StreamReader ( replaceResultItem . FilePath , replaceResultItem . FileEncoding ) )
508510 {
509511 fileContent = sr . ReadToEnd ( ) ;
510512 }
@@ -528,7 +530,7 @@ private void ShowReplaceResult(Replacer.ReplaceResultItem replaceResultItem, Sta
528530
529531 lblStatus . Text = "Processing " + stats . Files . Processed + " of " + stats . Files . Total + " files. Last file: " +
530532 replaceResultItem . FileRelativePath ;
531- ;
533+
532534
533535 ShowStats ( stats , true ) ;
534536 }
@@ -896,8 +898,10 @@ private void InitWithRegistryData()
896898 chkShowEncoding . Checked = data . ShowEncoding ;
897899 txtReplace . Text = data . ReplaceText ;
898900 chkUseEscapeChars . Checked = data . UseEscapeChars ;
901+ chkKeepModifiedDate . Checked = data . IsKeepModifiedDate ;
902+
899903
900- if ( ! string . IsNullOrEmpty ( data . Encoding ) )
904+ if ( ! string . IsNullOrEmpty ( data . Encoding ) )
901905 cmbEncoding . SelectedIndex = cmbEncoding . Items . IndexOf ( data . Encoding ) ;
902906 }
903907
@@ -1025,8 +1029,10 @@ private Replacer GetReplacer()
10251029 replacer . IncludeFilesWithoutMatches = chkIncludeFilesWithoutMatches . Checked ;
10261030 replacer . ReplaceText = CleanRichBoxText ( txtReplace . Text ) ;
10271031 replacer . UseEscapeChars = chkUseEscapeChars . Checked ;
1032+ replacer . IsKeepModifiedDate = chkKeepModifiedDate . Checked ;
10281033
1029- if ( cmbEncoding . SelectedIndex > 0 )
1034+
1035+ if ( cmbEncoding . SelectedIndex > 0 )
10301036 replacer . AlwaysUseEncoding = Utils . GetEncodingByName ( cmbEncoding . Text ) ;
10311037
10321038 return replacer ;
0 commit comments