├── .gitattributes ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE.md ├── .gitignore ├── LICENSE ├── README.md ├── dapper-plus-sponsor.png ├── docs ├── 404.md ├── CNAME ├── _config.yml ├── _data │ └── meta.csv ├── _includes │ ├── _global_variable.html │ ├── aside.html │ ├── infozzzprojects-email.html │ ├── layout-angle-begin.html │ ├── layout-angle-end.html │ ├── site-footer.html │ ├── site-header-nav-context.html │ ├── site-header-nav-md.html │ ├── site-header-nav-site.html │ ├── template-example.html │ ├── template-exception-cause.html │ ├── template-exception.html │ ├── template-execute-thrown.html │ ├── template-h1.html │ └── under-construction.html ├── _layouts │ └── default.html ├── _sass │ ├── card-layout-z1.scss │ ├── card-layout-z2.scss │ ├── console.scss │ ├── hero.scss │ ├── highlight.scss │ ├── highlight2.scss │ ├── page-index.scss │ ├── section-faq.scss │ ├── site-footer.scss │ ├── site-header-nav-context.scss │ ├── site-header-nav-md.scss │ ├── site-header-nav-site.scss │ └── site-header.scss ├── css │ └── master.scss ├── downloads │ └── fnr.zip ├── images │ ├── 2196c765-9b2a-4035-984c-01bdca0f8755.png │ ├── 246341ae-bf89-4318-856d-5d308b13d79a.png │ ├── 358a59e5-8789-4779-b131-0cf89b5a0286.png │ ├── 3d5ad2c7-0122-4e90-b985-f81a4b7641b5.png │ ├── arrow-down1.png │ ├── bab753cd-5f59-44f1-b62a-0a24b99345d5.png │ ├── basic-usage-1.png │ ├── basic-usage.png │ ├── command-line-1.png │ ├── command-line.png │ ├── e0652876-1428-4d98-8e47-646df4cefa84.png │ ├── escape-chars.png │ ├── logo.png │ ├── logo256X256-opacity.png │ ├── logo256X256.png │ └── regular-expressions.png ├── index.md ├── pages │ ├── api │ │ └── api.md │ ├── articles │ │ └── articles.md │ ├── faq │ │ └── faq.md │ ├── problems │ │ └── problems.md │ ├── site │ │ ├── contact-us.md │ │ └── download.md │ ├── tutorials.md │ └── tutorials │ │ ├── basic-usage.md │ │ ├── command-line.md │ │ ├── detect-encoding.md │ │ ├── error-levels.md │ │ ├── flags.md │ │ ├── installing.md │ │ ├── overview.md │ │ ├── regular-expressions.md │ │ └── special-characters.md └── robots.txt ├── docs2 └── pages │ ├── getting-started │ ├── basic-usage.md │ ├── command-line.md │ ├── detect-encoding.md │ ├── error-levels.md │ ├── flags.md │ ├── overview.md │ ├── regular-expressions.md │ └── special-characters.md │ └── site │ ├── contact-us.md │ └── download.md ├── entity-framework-extensions-sponsor.png ├── lib ├── CommandLineParser.1.9.71 │ ├── CommandLineParser.1.9.71.nupkg │ ├── CommandLineParser.1.9.71.nuspec │ ├── lib │ │ ├── net35 │ │ │ ├── CommandLine.dll │ │ │ └── CommandLine.xml │ │ ├── net40 │ │ │ ├── CommandLine.dll │ │ │ └── CommandLine.xml │ │ └── net45 │ │ │ ├── CommandLine.dll │ │ │ └── CommandLine.xml │ └── readme.txt ├── NUnit.2.5.10.11092 │ ├── Logo.ico │ ├── NUnit.2.5.10.11092.nupkg │ ├── NUnitFitTests.html │ ├── fit-license.txt │ ├── lib │ │ ├── nunit.framework.dll │ │ ├── nunit.framework.xml │ │ ├── nunit.mocks.dll │ │ └── pnunit.framework.dll │ ├── license.txt │ └── tools │ │ ├── NUnitTests.VisualState.xml │ │ ├── NUnitTests.config │ │ ├── NUnitTests.nunit │ │ ├── TestResult.xml │ │ ├── agent.conf │ │ ├── agent.log.conf │ │ ├── launcher.log.conf │ │ ├── lib │ │ ├── Failure.png │ │ ├── Ignored.png │ │ ├── Inconclusive.png │ │ ├── Skipped.png │ │ ├── Success.png │ │ ├── fit.dll │ │ ├── log4net.dll │ │ ├── nunit-console-runner.dll │ │ ├── nunit-gui-runner.dll │ │ ├── nunit.core.dll │ │ ├── nunit.core.interfaces.dll │ │ ├── nunit.fixtures.dll │ │ ├── nunit.uiexception.dll │ │ ├── nunit.uikit.dll │ │ └── nunit.util.dll │ │ ├── nunit-agent-x86.exe │ │ ├── nunit-agent-x86.exe.config │ │ ├── nunit-agent.exe │ │ ├── nunit-agent.exe.config │ │ ├── nunit-console-x86.exe │ │ ├── nunit-console-x86.exe.config │ │ ├── nunit-console.exe │ │ ├── nunit-console.exe.config │ │ ├── nunit-x86.exe │ │ ├── nunit-x86.exe.config │ │ ├── nunit.exe │ │ ├── nunit.exe.config │ │ ├── nunit.framework.dll │ │ ├── pnunit-agent.exe │ │ ├── pnunit-agent.exe.config │ │ ├── pnunit-launcher.exe │ │ ├── pnunit-launcher.exe.config │ │ ├── pnunit.framework.dll │ │ ├── pnunit.tests.dll │ │ ├── runFile.exe │ │ ├── runFile.exe.config │ │ ├── runpnunit.bat │ │ └── test.conf └── repositories.config └── src ├── .gitignore ├── EncodingTools ├── EncodingTools.cs ├── EncodingTools.csproj ├── Multilang │ ├── CMLangConvertCharset.cs │ ├── CMLangConvertCharsetClass.cs │ ├── CMLangString.cs │ ├── CMLangStringClass.cs │ ├── CMultiLanguage.cs │ ├── CMultiLanguageClass.cs │ ├── IEnumCodePage.cs │ ├── IEnumRfc1766.cs │ ├── IEnumScript.cs │ ├── IMLangCodePages.cs │ ├── IMLangConvertCharset.cs │ ├── IMLangFontLink.cs │ ├── IMLangFontLink2.cs │ ├── IMLangLineBreakConsole.cs │ ├── IMLangString.cs │ ├── IMLangStringAStr.cs │ ├── IMLangStringBufA.cs │ ├── IMLangStringBufW.cs │ ├── IMLangStringWStr.cs │ ├── IMultiLanguage.cs │ ├── IMultiLanguage2.cs │ ├── IMultiLanguage3.cs │ ├── ISequentialStream.cs │ ├── IStream.cs │ ├── _FILETIME.cs │ ├── _LARGE_INTEGER.cs │ ├── _RemotableHandle.cs │ ├── _ULARGE_INTEGER.cs │ ├── __MIDL_IWinTypes_0009.cs │ ├── tagDetectEncodingInfo.cs │ ├── tagMIMECONTF.cs │ ├── tagMIMECPINFO.cs │ ├── tagMIMECSETINFO.cs │ ├── tagMLCPF.cs │ ├── tagMLDETECTCP.cs │ ├── tagMLSTR_FLAGS.cs │ ├── tagRFC1766INFO.cs │ ├── tagSCRIPFONTINFO.cs │ ├── tagSCRIPTINFO.cs │ ├── tagSTATSTG.cs │ └── tagUNICODERANGE.cs ├── Properties │ └── AssemblyInfo.cs └── StopWatch.cs ├── FindAndReplace.App ├── AboutBox.Designer.cs ├── AboutBox.cs ├── AboutBox.resx ├── CommandLineOptions.cs ├── FindAndReplace.App.csproj ├── FindAndReplace.App.csproj.vspscc ├── FormData.cs ├── MainForm.Designer.cs ├── MainForm.cs ├── MainForm.resx ├── ProcessExtension.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ ├── donate.png │ ├── donate2.png │ └── swap_icon.gif ├── ValidationUtils.cs ├── app.config └── packages.config ├── FindAndReplace.Tests.CommandLine ├── App.config ├── CommandLineOptions.cs ├── FindAndReplace.Tests.CommandLine.csproj ├── FindAndReplace.Tests.CommandLine.csproj.vspscc ├── Program.cs ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── FindAndReplace.Tests ├── CommandLineLearningTests.cs ├── CommandLineUtilsTest.cs ├── DetectEncodingAccuracyTest.cs ├── DetectEncodingSpeedTest.cs ├── FileGetterTest.cs ├── FindAndReplace.Tests.csproj ├── FindAndReplace.Tests.csproj.vspscc ├── FinderSpeedTest.cs ├── FinderTest.cs ├── Properties │ └── AssemblyInfo.cs ├── RegexLearningTest.cs ├── ReplacerTest.cs ├── TestBase.cs └── packages.config ├── FindAndReplace.sln ├── FindAndReplace ├── CommandLineUtils.cs ├── EncodingDetector.cs ├── FileGetter.cs ├── FindAndReplace.csproj ├── FindAndReplace.csproj.vspscc ├── Finder.cs ├── Finder_UsingFileGetter.cs ├── KlerksSoftEncodingDetector.cs ├── LiteMatch.cs ├── MatchPreviewLineNumber.cs ├── Properties │ └── AssemblyInfo.cs ├── Replacer.cs ├── ResultItem.cs ├── Stats.cs ├── Utils.cs ├── VerifyArgument.cs └── packages.config ├── MakeOneExe.bat ├── log.txt ├── nuget.config └── sign ├── Certificate.p12 ├── Certificate.pfx └── sign.bat /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [zzzprojects] 2 | custom: ["https://zzzprojects.com/contribute"] 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Here is what to include in your request to make sure we implement a solution as quickly as possible. 2 | 3 | ## 1. Description 4 | Describe the issue or propose a feature. 5 | 6 | ## 2. Exception 7 | If you are seeing an exception, include the full exception details (message and stack trace). 8 | 9 | ``` 10 | Exception message: 11 | Stack trace: 12 | ``` 13 | 14 | ## 3. Fiddle or Project 15 | If you are able, 16 | 17 | Provide a Fiddle that reproduce the issue: https://dotnetfiddle.net/25Vjsn 18 | 19 | Or provide a project/solution that we can run to reproduce the issue. 20 | - Make sure the project compile 21 | - Make sure to provide only the code that is required to reproduce the issue, not the whole project 22 | - You can send private code here: info@zzzprojects.com 23 | 24 | Otherwise, make sure to include as much information as possible to help our team to reproduce the issue. 25 | 26 | ## 4. Any further technical details 27 | Add any relevant detail can help us. 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Bb]in/ 2 | [Oo]bj/ 3 | [Pp]ackages/ 4 | Z.Expressions.Eval.NET40/ 5 | Z.Lab/ 6 | .vs/ 7 | *.suo 8 | *.user 9 | *.userprefs 10 | _ReSharper.* 11 | *.ReSharper.user 12 | *.resharper.user -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 ENTech Solutions 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # What's Find and Replace (FNR)? 2 | Find and Replace (FNR) is an open source tool to find and replace text in multiple files. It can quickly search through large numbers of files and also find the information using regular expressions specifying the form of what you want, instead of literal text. 3 | 4 | Read more on our [Website](http://findandreplace.io/). 5 | 6 | [Download](http://findandreplace.io/download) 7 | 8 | ## Sponsors 9 | 10 | ZZZ Projects owns and maintains **Find and Replace** as part of our [mission](https://zzzprojects.com/mission) to add value to the .NET community 11 | 12 | Through [Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=zzzprojects&utm_medium=findandreplace) and [Dapper Plus](https://dapper-plus.net/?utm_source=zzzprojects&utm_medium=findandreplace), we actively sponsor and help key open-source libraries grow. 13 | 14 | [![Entity Framework Extensions](https://raw.githubusercontent.com/zzzprojects/findandreplace/master/entity-framework-extensions-sponsor.png)](https://entityframework-extensions.net/bulk-insert?utm_source=zzzprojects&utm_medium=findandreplace) 15 | 16 | [![Dapper Plus](https://raw.githubusercontent.com/zzzprojects/findandreplace/master/dapper-plus-sponsor.png)](https://dapper-plus.net/bulk-insert?utm_source=zzzprojects&utm_medium=findandreplace) 17 | 18 | ## More Projects 19 | 20 | - Projects: 21 | - [EntityFramework Extensions](https://entityframework-extensions.net/) 22 | - [Dapper Plus](https://dapper-plus.net/) 23 | - [C# Eval Expression](https://eval-expression.net/) 24 | - Learn Websites 25 | - [Learn EF Core](https://www.learnentityframeworkcore.com/) 26 | - [Learn Dapper](https://www.learndapper.com/) 27 | - Online Tools: 28 | - [.NET Fiddle](https://dotnetfiddle.net/) 29 | - [SQL Fiddle](https://sqlfiddle.com/) 30 | - [ZZZ Code AI](https://zzzcode.ai/) 31 | - and much more! 32 | 33 | To view all our free and paid projects, visit our website [ZZZ Projects](https://zzzprojects.com/). 34 | -------------------------------------------------------------------------------- /dapper-plus-sponsor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/dapper-plus-sponsor.png -------------------------------------------------------------------------------- /docs/404.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: /404.html 3 | --- 4 | 5 |
6 | Oops! The page has moved, or the link is broken. 7 | 8 | Let us know how you landed on this page, and we will try to fix the link: info@zzzprojects.com 9 | 10 | Go to Home 11 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | findandreplace.io -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | highlighter: rouge 2 | ga: "UA-109631523-1" 3 | gems: 4 | defaults: 5 | - 6 | scope: 7 | path: "" 8 | values: 9 | layout: "default" 10 | - 11 | scope: 12 | path: "" 13 | type: "pages" 14 | values: 15 | last_modified_at: "2017-03-13" 16 | -------------------------------------------------------------------------------- /docs/_data/meta.csv: -------------------------------------------------------------------------------- 1 | permalink,title,meta-description,meta-keywords,h1,h2,nagivation,template 2 | index,Find & Replace Tool,Find & Replace Tool.,,,,,full 3 | /404.html,Page Moved,Page Moved,,Page Moved,,,container-h1 4 | download,Download,Download,,Download,,no,full-h1 5 | contact-us,Contact Us,Contact Us,,Contact Us,,no,full-h1 6 | tutorials,Tutorials,Tutorials,,Tutorials,,,container-h1 7 | overview,Overview,Overview,,Overview,,, 8 | installing,Installing,Installing,,Installing,,, 9 | basic-usage,Basic Usage,Basic Usage,,Basic Usage,,, 10 | command-line,Command Line,Command Line,,Command Line,,, 11 | flags,Flags,Flags,,Flags,,, 12 | regular-expressions,Regular Expressions,Regular Expressions,,Regular Expressions,,, 13 | detect-encoding,Detect Encoding,Detect Encoding,,Detect Encoding,,, 14 | error-levels,Error Levels,Error Levels,,Error Levels,,, 15 | special-characters,Special Characters,Special Characters,,Special Characters,,, 16 | faq,FAQ,FAQ,,FAQ,,, 17 | problems,Problems,Problems,,Problems,,, 18 | -------------------------------------------------------------------------------- /docs/_includes/_global_variable.html: -------------------------------------------------------------------------------- 1 | {% if page.path contains "tutorials.md" %} 2 | {% assign is_context_home = true; %} 3 | {% assign is_context_home_css_active = "active"; %} 4 | {% elsif page.path contains "/tutorials/" %} 5 | {% assign is_context_tutorials = true; %} 6 | {% assign is_context_tutorials_css_active = "active"; %} 7 | {% elsif page.path contains "/api/" %} 8 | {% assign is_context_api = true; %} 9 | {% assign is_context_api_css_active = "active"; %} 10 | {% elsif page.path contains "/faq/" %} 11 | {% assign is_context_faq = true; %} 12 | {% assign is_context_faq_css_active = "active"; %} 13 | {% elsif page.path contains "/problems/" %} 14 | {% assign is_context_problems = true; %} 15 | {% assign is_context_problems_css_active = "active"; %} 16 | {% endif %} 17 | {% for num in (0..site.data.meta.size) %} 18 | {% if site.data.meta[num].permalink == page.permalink %} 19 | {% assign meta_index = num %} 20 | {% endif %} 21 | {% endfor %} -------------------------------------------------------------------------------- /docs/_includes/aside.html: -------------------------------------------------------------------------------- 1 | {% if page.path contains "/tutorials/" %} 2 |
3 |
4 |

Tutorials

5 |
6 |
7 | 8 |

Getting Started

9 | 19 | 20 |
21 |
22 | 23 | {% endif %} 24 | -------------------------------------------------------------------------------- /docs/_includes/infozzzprojects-email.html: -------------------------------------------------------------------------------- 1 | info@zzzprojects.com 2 | -------------------------------------------------------------------------------- /docs/_includes/layout-angle-begin.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
-------------------------------------------------------------------------------- /docs/_includes/layout-angle-end.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
-------------------------------------------------------------------------------- /docs/_includes/site-footer.html: -------------------------------------------------------------------------------- 1 | 24 | -------------------------------------------------------------------------------- /docs/_includes/site-header-nav-context.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/_includes/site-header-nav-md.html: -------------------------------------------------------------------------------- 1 | 23 | 24 | 58 | 59 | -------------------------------------------------------------------------------- /docs/_includes/site-header-nav-site.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/_includes/template-example.html: -------------------------------------------------------------------------------- 1 |

2 | {% if include.title == null %} 3 | Example 4 | {% else %} 5 | {{ include.title }} 6 | {% endif %} 7 |

8 | -------------------------------------------------------------------------------- /docs/_includes/template-exception-cause.html: -------------------------------------------------------------------------------- 1 | This error can be caused for the following reasons: 2 | -------------------------------------------------------------------------------- /docs/_includes/template-exception.html: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /docs/_includes/template-execute-thrown.html: -------------------------------------------------------------------------------- 1 | You execute the method {{ include.methodName }}, and the following error is thrown: 2 | -------------------------------------------------------------------------------- /docs/_includes/template-h1.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

6 | {{site.data.meta[meta_index].h1}} 7 |

8 | {% if site.data.meta[meta_index].h2 != null %} 9 |

{{ site.data.meta[meta_index].h2 }}

10 | {% endif %} 11 |
12 |
13 |
14 |
15 |
16 |
17 | -------------------------------------------------------------------------------- /docs/_includes/under-construction.html: -------------------------------------------------------------------------------- 1 | This page is under construction. 2 | 3 | We hope to complete to finish to rewrite EFE tutorials at the end of November. -------------------------------------------------------------------------------- /docs/_sass/card-layout-z1.scss: -------------------------------------------------------------------------------- 1 | .card-layout-z1 { 2 | border: 1px solid #000; 3 | box-shadow: 10px 10px grey; 4 | border-radius: 0; 5 | } 6 | .card-layout-z1 .card-body { 7 | border-radius: 0; 8 | padding-left: 20px; 9 | } 10 | .card-layout-z1 .card-header { 11 | border-radius: 0 !important; 12 | background: rgb(204, 0, 0); 13 | background: -webkit-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 14 | background: -o-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 15 | background: -moz-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 16 | background: radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 17 | color: #fff; 18 | padding-left: 20px; 19 | } 20 | .card-layout-z1 h2 { 21 | padding: 5px 0; 22 | } 23 | .card-layout-z1 h3:not(:first-child) { 24 | margin-top: 15px; 25 | } 26 | .card-layout-z1 ul { 27 | padding-left: 20px; 28 | } 29 | .card-layout-z1 li { 30 | list-style: none; 31 | padding: 5px 0; 32 | } 33 | .card-layout-z1 li .fa { 34 | font-size: 24px; 35 | position: relative; 36 | top: 5px; 37 | } 38 | 39 | .card-layout-z1 a { 40 | color: #c00; 41 | } -------------------------------------------------------------------------------- /docs/_sass/card-layout-z2.scss: -------------------------------------------------------------------------------- 1 | .card-layout-z2 { 2 | background: #333; 3 | background: -webkit-radial-gradient(circle, #333, #111); 4 | background: -o-radial-gradient(circle, #333, #111); 5 | background: -moz-radial-gradient(circle, #333, #111); 6 | background: radial-gradient(circle, #333, #111); 7 | color: #fff; 8 | overflow: hidden; 9 | border: 0; 10 | text-align: center; 11 | box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.3); 12 | } 13 | 14 | .card-layout-z2 .card-header { 15 | margin-top: 30px; 16 | margin-bottom: 50px; 17 | background: rgb(204, 0, 0); 18 | background: -webkit-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 19 | background: -o-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 20 | background: -moz-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 21 | background: radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 22 | } 23 | 24 | .card-layout-z2 .card-header a { 25 | color: #fff; 26 | } -------------------------------------------------------------------------------- /docs/_sass/console.scss: -------------------------------------------------------------------------------- 1 | .language-csharp .c1 { 2 | color: #008000; 3 | } 4 | .language-csharp .nf { 5 | color: #c00; 6 | } 7 | 8 | .card-code { 9 | border: 0; 10 | border-radius: 0; 11 | } 12 | .card-code .card-header { 13 | border: 0; 14 | border-radius: 0; 15 | font-size: 20px; 16 | } 17 | 18 | .card-code-dark-inverse { 19 | box-shadow: 10px 10px grey; 20 | background: #fff; 21 | } 22 | .card-code-dark-inverse .card-header { 23 | background: #777; 24 | background: -webkit-radial-gradient(circle, #777, #444); 25 | background: -o-radial-gradient(circle, #777, #444); 26 | background: -moz-radial-gradient(circle, #777, #444); 27 | background: radial-gradient(circle, #777, #444); 28 | color: #fff; 29 | text-shadow: 2px -1px rgba(0, 0, 0, 0.7); 30 | } 31 | .card-code-light { 32 | box-shadow: 10px 10px grey; 33 | background-color: rgba(255, 255, 255, 1); 34 | background: -webkit-radial-gradient(circle, #fff, #fff, #ccc); 35 | background: -o-radial-gradient(circle, #fff, #fff, #ccc); 36 | background: -moz-radial-gradient(circle, #fff, #fff, #ccc); 37 | background: radial-gradient(circle, #fff, #fff, #ccc); 38 | } 39 | .card-code-light .card-header { 40 | background: #333; 41 | background: -webkit-radial-gradient(circle, #333, #111); 42 | background: -o-radial-gradient(circle, #333, #111); 43 | background: -moz-radial-gradient(circle, #333, #111); 44 | background: radial-gradient(circle, #333, #111); 45 | color: #fff; 46 | text-shadow: 2px -1px rgba(0, 0, 0, 0.7); 47 | } 48 | 49 | article h3.example { 50 | background: #777; 51 | background: -webkit-radial-gradient(circle, #777, #444); 52 | background: -o-radial-gradient(circle, #777, #444); 53 | background: -moz-radial-gradient(circle, #777, #444); 54 | background: radial-gradient(circle, #777, #444); 55 | color: #fff; 56 | text-shadow: 2px -1px rgba(0, 0, 0, 0.7); 57 | padding: 10px; 58 | margin-top: 20px; 59 | margin-bottom: 0px; 60 | } 61 | article figure.highlight { 62 | background: #333; 63 | background: -webkit-radial-gradient(circle, #333, #222, #111); 64 | background: -o-radial-gradient(circle, #333, #222, #111); 65 | background: -moz-radial-gradient(circle, #333, #222, #111); 66 | background: radial-gradient(circle, #333, #222, #111); 67 | color: #fff; 68 | padding: 10px; 69 | } 70 | article figure.highlight pre { 71 | color: #d4d4d4; 72 | } 73 | article figure.highlight .language-csharp .nf { 74 | /*color: #569cd6;*/ 75 | color: #569cd6; 76 | } 77 | article2 h3.example { 78 | background: #333; 79 | background: -webkit-radial-gradient(circle, #333, #111); 80 | background: -o-radial-gradient(circle, #333, #111); 81 | background: -moz-radial-gradient(circle, #333, #111); 82 | background: radial-gradient(circle, #333, #111); 83 | color: #fff; 84 | text-shadow: 2px -1px rgba(0, 0, 0, 0.7); 85 | padding: 10px; 86 | margin-top: 20px; 87 | margin-bottom: 0px; 88 | } 89 | article2 figure.highlight { 90 | background: #ccc; 91 | background: -webkit-radial-gradient(circle, #fff, #fff, #ccc); 92 | background: -o-radial-gradient(circle, #fff, #fff, #ccc); 93 | background: -moz-radial-gradient(circle, #fff, #fff, #ccc); 94 | background: radial-gradient(circle, #fff, #fff, #ccc); 95 | padding: 10px; 96 | } 97 | 98 | 99 | -------------------------------------------------------------------------------- /docs/_sass/hero.scss: -------------------------------------------------------------------------------- 1 | .hero { 2 | background: #333; 3 | background: -webkit-radial-gradient(circle, #333, #111); 4 | background: -o-radial-gradient(circle, #333, #111); 5 | background: -moz-radial-gradient(circle, #333, #111); 6 | background: radial-gradient(circle, #333, #111); 7 | color: #fff; 8 | padding: 60px 0; 9 | min-height: 800px; 10 | } 11 | .hero .hero-header { 12 | background-image: url('/images/logo256X256-opacity.png'); 13 | background-size: 100%; 14 | background-repeat: no-repeat; 15 | background-position: center; 16 | } 17 | .hero .hero-header h1 { 18 | margin-top: 60px; 19 | margin-bottom: 40px; 20 | } 21 | .hero .hero-header h1 .display-1 { 22 | font-size: 9rem; 23 | font-weight: 700; 24 | } 25 | .hero .hero-header .download-count .item-text { 26 | color: #888; 27 | font-size: 1.2rem; 28 | margin-top: 30px; 29 | } 30 | .hero .hero-examples .row:first-child { 31 | padding-bottom: 30px; 32 | } 33 | .hero .hero-examples h5 { 34 | background: rgb(204, 0, 0); 35 | background: -webkit-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 36 | background: -o-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 37 | background: -moz-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 38 | background: radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 39 | border-radius: 50%; 40 | font-size: 20px; 41 | font-weight: 700; 42 | height: 140px; 43 | width: 140px; 44 | text-align: center; 45 | padding: 40px 0px; 46 | margin: 0; 47 | text-shadow: 2px -1px rgba(0, 0, 0, 0.7); 48 | } 49 | .hero .hero-examples .hero-arrow img{ 50 | width: 90px; 51 | } 52 | .hero .hero-examples .hero-arrow-ltr { 53 | text-align: right; 54 | } 55 | .hero .hero-examples .hero-arrow-rtl img{ 56 | transform: scaleX(-1); 57 | } 58 | @media (max-width: 575px) { 59 | .hero .hero-header .download-count img { 60 | width: 350px; 61 | } 62 | } 63 | @media (max-width: 991px) { 64 | .hero .hero-header { 65 | text-align: center; 66 | } 67 | .hero .hero-header .download-count img { 68 | width: 350px; 69 | } 70 | .hero .hero-examples h5 { 71 | margin: auto; 72 | } 73 | .hero .hero-examples .hero-arrow { 74 | display: none; 75 | } 76 | .hero .hero-examples h5 { 77 | margin-bottom: 20px; 78 | } 79 | .hero .hero-examples .row:last-child { 80 | margin-top: 40px; 81 | } 82 | } 83 | @media (max-width: 1199px) { 84 | .hero .hero-header .download-count img { 85 | width: 350px; 86 | } 87 | } -------------------------------------------------------------------------------- /docs/_sass/highlight.scss: -------------------------------------------------------------------------------- 1 | .highlight .k { color: #0000ff; font-weight: normal } 2 | .highlight .nb { color: #0000ff; } 3 | .highlight .nf { color: #c00; font-weight: 700;} 4 | .highlight .c1 { color: #008000;} 5 | .highlight .cm { color: #008000;} 6 | .highlight .o { font-weight: normal;} 7 | 8 | pre { 9 | counter-reset: line-numbering; 10 | border: solid 1px #d9d9d9; 11 | border-radius: 0; 12 | background: #fff; 13 | padding: 15; 14 | line-height: 23px; 15 | margin-bottom: 30px; 16 | white-space: pre; 17 | overflow-x: auto; 18 | word-break: inherit; 19 | word-wrap: inherit; 20 | } 21 | 22 | pre a::before { 23 | content: counter(line-numbering); 24 | counter-increment: line-numbering; 25 | padding-right: 1em; 26 | width: 25px; 27 | text-align: right; 28 | opacity: 0.7; 29 | display: inline-block; 30 | color: #aaa; 31 | background: #eee; 32 | margin-right: 16px; 33 | padding: 2px 10px; 34 | font-size: 13px; 35 | -webkit-touch-callout: none; 36 | -webkit-user-select: none; 37 | -khtml-user-select: none; 38 | -moz-user-select: none; 39 | -ms-user-select: none; 40 | user-select: none; 41 | } 42 | 43 | pre a:first-of-type::before { 44 | padding-top: 10px; 45 | } 46 | 47 | pre a:last-of-type::before { 48 | padding-bottom: 10px; 49 | } 50 | 51 | pre a:only-of-type::before { 52 | padding: 10px; 53 | } 54 | -------------------------------------------------------------------------------- /docs/_sass/highlight2.scss: -------------------------------------------------------------------------------- 1 | .highlight .k { color: #0000ff; font-weight: normal } 2 | .highlight .nb { color: #0000ff; } 3 | .highlight .nf { color: #c00; font-weight: 700;} 4 | .highlight .c1 { color: #008000;} 5 | .highlight .cm { color: #008000;} 6 | .highlight .o { font-weight: normal;} -------------------------------------------------------------------------------- /docs/_sass/page-index.scss: -------------------------------------------------------------------------------- 1 | .featured { 2 | padding: 60px 0; 3 | } 4 | .featured h2 { 5 | font-size: 3rem; 6 | margin-bottom: 30px; 7 | } 8 | .featured .left { 9 | font-size: 1.25rem; 10 | } 11 | .featured .left ul { 12 | padding-left: 15px; 13 | } 14 | .featured .left ul li { 15 | list-style: none; 16 | padding: 5px 0; 17 | } 18 | .featured .left ul li .fa { 19 | position: relative; 20 | top: 3px; 21 | } 22 | .featured .right .table { 23 | box-shadow: 0 10px 10px 0 rgba(0, 0, 0, 0.4); 24 | } 25 | .featured .right .text-muted { 26 | font-style: italic; 27 | } 28 | .testimonials { 29 | margin: 60px 0; 30 | } 31 | .testimonials .container { 32 | padding-top: 80px; 33 | padding-bottom: 40px; 34 | } 35 | .testimonials .container h2 { 36 | font-size: 3rem; 37 | margin-bottom: 30px; 38 | text-align: center; 39 | } 40 | .testimonials .container blockquote { 41 | font-size: 1.25rem; 42 | } 43 | .testimonials .container blockquote a { 44 | color: #c00; 45 | } 46 | .testimonials .container .more { 47 | text-align: center; 48 | padding: 30px 0; 49 | } 50 | 51 | .features h2 { 52 | font-size: 3rem; 53 | margin-bottom: 30px; 54 | } 55 | .features hr { 56 | margin: 60px 0; 57 | } 58 | .features .more-info { 59 | padding-top: 40px; 60 | padding-bottom: 40px; 61 | } 62 | .features .more { 63 | text-align: center; 64 | margin-top: 120px; 65 | margin-bottom: 40px; 66 | } 67 | 68 | #testimonials { 69 | background: transparent; 70 | border: 0; 71 | padding: 125px 0; 72 | } 73 | .main { 74 | overflow-x: hidden; 75 | } 76 | .header-angle { 77 | transform:rotate(4deg); 78 | background: #333; 79 | background: -webkit-radial-gradient(circle, #333, #111); 80 | background: -o-radial-gradient(circle, #333, #111); 81 | background: -moz-radial-gradient(circle, #333, #111); 82 | background: radial-gradient(circle, #333, #111); 83 | box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.3); 84 | width:110%; 85 | left:-5%; 86 | top: 30px; 87 | position: relative; 88 | } 89 | /* 90 | .header-angle h1 { 91 | font-size: 5rem; 92 | position: relative; 93 | text-align: center; 94 | vertical-align: middle; 95 | height: 225px; 96 | line-height: 225px; 97 | margin-bottom: 0px; 98 | } 99 | .header-angle h2 { 100 | font-size: 3rem; 101 | position: relative; 102 | text-align: center; 103 | vertical-align: middle; 104 | margin-bottom: 0px; 105 | top: -50px; 106 | }*/ 107 | .header-angle .header-angle-inner { 108 | color: #fff; 109 | transform:rotate(-4deg); 110 | } 111 | .header-angle .top-triangle { 112 | position: absolute; 113 | border-style: solid; 114 | border-width: 200px 600px 0 0; 115 | width: 600px; 116 | border-color: #c00 transparent; 117 | } 118 | .header-angle .bottom-triangle-outer { 119 | margin-right: 500px; 120 | position: relative; 121 | } 122 | 123 | .header-angle .bottom-triangle { 124 | left: 100%; 125 | top: -200px; 126 | border-style: solid; 127 | border-width: 0 0 200px 500px; 128 | border-style: solid; 129 | border-color: #c00 transparent; 130 | position: absolute; 131 | } -------------------------------------------------------------------------------- /docs/_sass/section-faq.scss: -------------------------------------------------------------------------------- 1 | .section-faq hr { 2 | margin: 60px 0; 3 | } 4 | .section-faq h2 { 5 | font-size: 3rem; 6 | margin: 30px 0; 7 | } 8 | .section-faq a { 9 | color: orange; 10 | } -------------------------------------------------------------------------------- /docs/_sass/site-footer.scss: -------------------------------------------------------------------------------- 1 | .site-footer { 2 | margin-top: 60px; 3 | } 4 | .site-footer .fixed-bottom { 5 | background: -moz-linear-gradient(top, #333, #222); 6 | background: -webkit-linear-gradient(top, #333, #222); 7 | background: -ms-linear-gradient(top, #333, #222); 8 | background: -o-linear-gradient(top, #333, #222); 9 | background: linear-gradient(top, #333, #222); 10 | color: #666; 11 | padding-top: 5px; 12 | padding-bottom: 5px; 13 | } 14 | .site-footer .footer-site-copyright { 15 | padding-top: 4px; 16 | } 17 | .site-footer a { 18 | color: #777; 19 | } 20 | .site-footer a:hover { 21 | color: #777; 22 | opacity: 0.7; 23 | text-decoration: none; 24 | transition: all 0.4s ease-in-out 0s; 25 | } 26 | .site-footer .footer-site-social a { 27 | font-size: 24px; 28 | padding: 0 10px; 29 | } 30 | @media (max-width: 61em) { 31 | .site-footer { 32 | padding: 20px 0; 33 | } 34 | } 35 | @media (max-width: 575px) { 36 | .site-footer { 37 | display: none; 38 | } 39 | } -------------------------------------------------------------------------------- /docs/_sass/site-header-nav-context.scss: -------------------------------------------------------------------------------- 1 | /* top-nav-lg-context */ 2 | .site-header .nav-context { 3 | background: #333; 4 | background: -webkit-radial-gradient(circle, #333, #111); 5 | background: -o-radial-gradient(circle, #333, #111); 6 | background: -moz-radial-gradient(circle, #333, #111); 7 | background: radial-gradient(circle, #333, #111); 8 | } 9 | .site-header .nav-context nav { 10 | height:40px; 11 | padding-bottom:0px; 12 | padding-top:0px 13 | } 14 | .site-header .nav-context nav li { 15 | font-size:20px; 16 | text-transform:uppercase 17 | } 18 | .site-header .nav-context nav li.active { 19 | background: rgb(204, 0, 0); 20 | background: -webkit-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 21 | background: -o-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 22 | background: -moz-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 23 | background: radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); 24 | } 25 | .site-header .nav-context nav li .nav-link { 26 | padding-left:1rem !important; 27 | padding-right:1rem !important 28 | } 29 | .site-header .nav-context nav li .nav-link .fa-home { 30 | font-size:24px 31 | } 32 | .site-header .nav-context nav li a.nav-link:hover { 33 | color:rgba(255, 255, 255, 1) !important; 34 | } 35 | 36 | @media (max-width: 991px) { 37 | .top-nav-lg.top-nav-dual { 38 | display: none; 39 | } 40 | } 41 | @media (min-width: 992px) { 42 | .top-nav-lg.top-nav-dual { 43 | display: ""; 44 | } 45 | } -------------------------------------------------------------------------------- /docs/_sass/site-header-nav-md.scss: -------------------------------------------------------------------------------- 1 | .site-header .nav-md { 2 | background-color: white; 3 | box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.3); 4 | position:fixed; 5 | top:0; 6 | right:0; 7 | left:0; 8 | z-index: 1030; 9 | } 10 | .site-header .nav-md .header-brand a { 11 | color: #000; 12 | } 13 | .site-header .nav-md .top-nav-md-menu { 14 | text-align: center; 15 | padding-bottom: 20px; 16 | } 17 | .site-header .nav-md .top-nav-md-menu a.nav-link { 18 | color: #000; 19 | } 20 | .site-header .nav-md .top-nav-md-menu .nav-item a .fa { 21 | margin-right: 5px; 22 | } 23 | .site-header .nav-md .top-nav-md-menu .nav-item a .fa-angle-right{ 24 | margin-left: 5px; 25 | margin-right: 0; 26 | } 27 | @media (max-width: 991px) { 28 | .site-header .nav-md { 29 | display: ""; 30 | } 31 | } 32 | @media (min-width: 992px) { 33 | .site-header .nav-md { 34 | display: none; 35 | } 36 | } -------------------------------------------------------------------------------- /docs/_sass/site-header-nav-site.scss: -------------------------------------------------------------------------------- 1 | /* top-nav-lg-site */ 2 | .site-header .nav-site .navbar-brand { 3 | padding-bottom: 0; 4 | padding-top: 0; 5 | } 6 | .site-header .nav-site .navbar-nav .nav-item a.nav-link { 7 | color: #000; 8 | font-size: 18px; 9 | font-weight: 300; 10 | } 11 | .site-header .nav-site .navbar-nav .nav-item a.nav-link:hover { 12 | color: rgba(204, 0, 0, 0.8); 13 | } 14 | .site-header .nav-site .navbar-nav .nav-item a .fa { 15 | margin-right: 5px; 16 | } 17 | .site-header .nav-site .navbar-nav .nav-item a .fa-angle-right{ 18 | margin-left: 5px; 19 | margin-right: 0; 20 | } 21 | @media print { 22 | .site-header .nav-site { 23 | position:relative; 24 | } 25 | } 26 | @media (max-width: 991px) { 27 | .site-header .nav-site .navbar-brand img { 28 | height: 60px; 29 | } 30 | .site-header .nav-site .navbar-nav { 31 | padding: 1em 0; 32 | } 33 | .site-header .nav-site .navbar-nav .nav-item { 34 | border-top: 1px solid rgba(0, 0, 0, 0.3); 35 | text-align: center; 36 | padding: 0.5em 1em; 37 | } 38 | .site-header .nav-site .navbar-nav .nav-item-download { 39 | padding-top: 1em; 40 | } 41 | } 42 | @media (max-width: 575px) { 43 | .site-header .nav-site .navbar-brand { 44 | font-size: 0.8rem; 45 | } 46 | .site-header .nav-site .navbar-brand img { 47 | height: 36px; 48 | } 49 | } 50 | @media (min-width: 992px) and (max-width: 1199px) { 51 | .site-header .nav-site .navbar-nav .nav-item:not(.nav-item-download) i { 52 | display: none; 53 | } 54 | } 55 | @media (min-width: 992px) { 56 | .site-header .nav-site { 57 | padding-bottom: 0; 58 | padding-top: 0; 59 | } 60 | .site-header .nav-site .navbar-brand img { 61 | height: 80px; 62 | } 63 | .site-header .nav-site .navbar-nav .nav-item { 64 | padding-left: 1em; 65 | padding-right: 1em; 66 | } 67 | .site-header .nav-site .navbar-nav .nav-item a.nav-link { 68 | position: relative; 69 | text-decoration: none; 70 | } 71 | .site-header .nav-site a.nav-link::after { 72 | border-bottom: 2px solid #c00; 73 | bottom: 0; 74 | content: ""; 75 | left: 0; 76 | position: absolute; 77 | transition: all 0.5s ease 0s; 78 | width: 0; 79 | } 80 | .site-header .nav-site a.nav-link:hover::after { 81 | width: 100%; 82 | } 83 | .site-header .nav-site .navbar-nav .nav-item { 84 | border-left: 1px solid rgba(0, 0, 0, 0.3); 85 | } 86 | } -------------------------------------------------------------------------------- /docs/_sass/site-header.scss: -------------------------------------------------------------------------------- 1 | .site-header.page { 2 | margin-top: 100px; 3 | } 4 | .site-header .site-header-inner { 5 | background-color: white; 6 | box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.3); 7 | position:fixed; 8 | top:0; 9 | right:0; 10 | left:0; 11 | z-index: 1030; 12 | } 13 | @media (max-width: 991px) { 14 | .site-header.post { 15 | height: 80px; 16 | } 17 | } 18 | @media (min-width: 992px) { 19 | .site-header.post { 20 | height: 140px; 21 | } 22 | } -------------------------------------------------------------------------------- /docs/downloads/fnr.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/downloads/fnr.zip -------------------------------------------------------------------------------- /docs/images/2196c765-9b2a-4035-984c-01bdca0f8755.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/2196c765-9b2a-4035-984c-01bdca0f8755.png -------------------------------------------------------------------------------- /docs/images/246341ae-bf89-4318-856d-5d308b13d79a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/246341ae-bf89-4318-856d-5d308b13d79a.png -------------------------------------------------------------------------------- /docs/images/358a59e5-8789-4779-b131-0cf89b5a0286.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/358a59e5-8789-4779-b131-0cf89b5a0286.png -------------------------------------------------------------------------------- /docs/images/3d5ad2c7-0122-4e90-b985-f81a4b7641b5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/3d5ad2c7-0122-4e90-b985-f81a4b7641b5.png -------------------------------------------------------------------------------- /docs/images/arrow-down1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/arrow-down1.png -------------------------------------------------------------------------------- /docs/images/bab753cd-5f59-44f1-b62a-0a24b99345d5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/bab753cd-5f59-44f1-b62a-0a24b99345d5.png -------------------------------------------------------------------------------- /docs/images/basic-usage-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/basic-usage-1.png -------------------------------------------------------------------------------- /docs/images/basic-usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/basic-usage.png -------------------------------------------------------------------------------- /docs/images/command-line-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/command-line-1.png -------------------------------------------------------------------------------- /docs/images/command-line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/command-line.png -------------------------------------------------------------------------------- /docs/images/e0652876-1428-4d98-8e47-646df4cefa84.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/e0652876-1428-4d98-8e47-646df4cefa84.png -------------------------------------------------------------------------------- /docs/images/escape-chars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/escape-chars.png -------------------------------------------------------------------------------- /docs/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/logo.png -------------------------------------------------------------------------------- /docs/images/logo256X256-opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/logo256X256-opacity.png -------------------------------------------------------------------------------- /docs/images/logo256X256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/logo256X256.png -------------------------------------------------------------------------------- /docs/images/regular-expressions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/docs/images/regular-expressions.png -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | permalink: index 4 | --- 5 | 6 | 7 |
8 |
9 |
10 |
11 |
12 |
13 | 14 |
15 | 16 |

17 |
FNR
18 |
Find and Replace
19 |

20 | 21 | 29 |
30 | 31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | 46 | 47 | 52 | -------------------------------------------------------------------------------- /docs/pages/api/api.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: api 3 | --- 4 | -------------------------------------------------------------------------------- /docs/pages/articles/articles.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: articles 3 | --- 4 | 5 | ## Articles 6 | 7 | -------------------------------------------------------------------------------- /docs/pages/faq/faq.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: faq 3 | --- 4 | 5 | ## FAQ 6 | -------------------------------------------------------------------------------- /docs/pages/problems/problems.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: problems 3 | --- 4 | 5 | ## Troubleshooting 6 | -------------------------------------------------------------------------------- /docs/pages/site/contact-us.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: contact-us 3 | --- 4 | 5 |
6 | 7 |

Support

8 | 9 | The support for `Find & Replace` is currently paused. 10 | 11 |
12 | -------------------------------------------------------------------------------- /docs/pages/site/download.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: download 3 | --- 4 | 5 |
6 |
7 |
8 |
9 |
10 | 18 |
19 | 21 | 22 | FnR Zip Download 23 | 24 |
Download Count:
25 |
26 | 28 | 29 | 30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | 38 | -------------------------------------------------------------------------------- /docs/pages/tutorials.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: tutorials 3 | --- 4 | 5 |
6 | 7 |
8 |
9 |
10 |

Tutorial

11 |

FNR Tutotrial

12 |
13 |

Start learning about how to use Find and Replace (FNR) with our tutorial.

14 |

15 | Learn more 16 |

17 |
18 |
19 |
20 | -------------------------------------------------------------------------------- /docs/pages/tutorials/basic-usage.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: basic-usage 3 | --- 4 | 5 | ## Basic Usage 6 | 7 | **Find and Replace (FNR)** has a very simple and easy to use UI which provides search and replace operations across multiple ASCII (text, HTML, etc.) files. 8 | 9 | Basic Usage 10 | 11 | - You can find/replace text in multiple files by specifying the path in **Dir** field. 12 | - You can also specify file masks, and even exclude some file masks. 13 | - You can search documents for a phrase or several words, multi-line or regular expression. 14 | 15 | ### Example 16 | 17 | Let’s try to search “license” by specify it in Find field and click on the Find Only button which will search for all occurrences of “license”. The Results section will display all the files in which the results are found. 18 | 19 | Basic Usage 20 | 21 | Now to replace a text just specify the text in **Replace** field and click Replace button and all the occurrences of text specified in **Find** field will be replaced with the text specified in **Replace** field. 22 | 23 | -------------------------------------------------------------------------------- /docs/pages/tutorials/command-line.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: command-line 3 | --- 4 | 5 | ## Command Line 6 | 7 | **Find and Replace (FNR)** can also be used as a command line utility. The intersting thing about FNR is that it can create command line text to put in batch file by simply clinking on the **Gen Replace Command Line** button. 8 | 9 | Command Line 10 | 11 | ### Example 12 | 13 | Let's try to replace "license" with "agreement" by using the command line, so just copy the command line text created by FNR. 14 | 15 | {% include template-example.html%} 16 | {% highlight csharp %} 17 | 18 | "D:\fnr.exe" --cl --dir "D:\Project\ZZZ\FNR Testing\Temp" --fileMask "*.*" --excludeFileMask 19 | "*.dll; *.exe" --includeSubDirectories --find "license" --replace "agreement" 20 | 21 | {% endhighlight %} 22 | 23 | Command Line 24 | 25 | -------------------------------------------------------------------------------- /docs/pages/tutorials/detect-encoding.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: detect-encoding 3 | --- 4 | 5 | ## Detect Encoding 6 | 7 | Find and Replace (FNR) uses two approaches two detect file encoding: 8 | 9 | - First KlerkSoft Bom Detector which is streamlined version of code from [here](http://www.architectshack.com/TextFileEncodingDetector.ashx) 10 | 11 | - If Bom Detection fails it uses Microsoft's MLang library using approach described [here](http://www.codeproject.com/Articles/17201/Detect-Encoding-for-In-and-Outgoing-Text) 12 | 13 | ## Why Detection Fail? 14 | 15 | In some rare cases, the detection may fail or may report a false positive. 16 | 17 | - The reason for it failing is that detecting correct file encoding 100% of the time is impossible. 18 | - MLang uses heuristics to go through file content and give its best guess on encoding. 19 | - Usually, its guess is correct 99%+ of the time. 20 | - The only sure way to load a file with correct encoding is to know it upfront and pass it in. 21 | 22 | ## Workaround 23 | 24 | If you have a case where encoding detection fails for a specific file, you will get error message "Could not detect file encoding." for that file. To get around this error, there are several approaches: 25 | 26 | ### Save as Unicode Encoding. 27 | 28 | - You can open the problematic file in Notepad and save it using Unicode encoding. 29 | - This will add a BOM header to the file so it will be easily detected by KlerkSoft Bom Detector 30 | 31 | 32 | ### Use Enconding Flags 33 | 34 | - Use **--defaultEncodingIfNotDetected** or **--alwaysUseEncoding** to bypass automatic detection. See details for these flags in the [Flags](/flags). 35 | 36 | - For these flags you can use any encoding listed [here](http://msdn.microsoft.com/en-us/library/system.text.encoding.getencodings(v=vs.110).aspx). Just scroll down to example results and look for values in column 'identifier and name': -------------------------------------------------------------------------------- /docs/pages/tutorials/error-levels.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: error-levels 3 | --- 4 | 5 | ## Error Levels 6 | 7 | **Find and Replace (FNR)** supports the following error levels: 8 | 9 | Level | Description| 10 | :-----|:-----------| 11 | 0 | No errors| 12 | 1 | Major error like directory is invalid| 13 | 2 | Read/Write error for any processed file| 14 | 15 | By default, only 0 and 1 are returned by the command. To enable ErrorLevel 2, use new flag --setErrorLevelIfAnyFileErrors. See details for flags [here](/flags). -------------------------------------------------------------------------------- /docs/pages/tutorials/flags.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: flags 3 | --- 4 | 5 | ## Flags 6 | 7 | Flag | Description| 8 | :-------------- | :-------------- | 9 | --cl | Required to run on command line.| 10 | --find | Required. Text to find.| 11 | --replace | Replacement text. If not specified only find operation is performed.| 12 | --useRegEx | Use regular expressions in 'find' parameter.| 13 | --useEscapeChars | Use escape chars like '\n' in 'find' and 'replace' parameters.| 14 | --caseSensitive | Case Sensitive.| 15 | --dir | Required. Directory path.| 16 | --includeSubDirectories | Include files in SubDirectories.| 17 | --fileMask | Required. File mask or multiple file masks separated by comma.| 18 | --excludeFileMask | File masks to exclude. If multiple - separate by comma| 19 | --help | Dispaly help screen.| 20 | --showEncoding | Displays detected encoding for each file with matches.| 21 | --silent | Supress the command window output.| 22 | --logFile | Path to log file where to save command output.| 23 | --skipBinaryFileDetection | Ignore detection of binary files.| 24 | --alwaysUseEncoding | Skip encoding detection and always use specified encoding.| 25 | --defaultEncodingIfNotDetected | If encoding is not detected in some very rare cases, use this one.| 26 | --includeFilesWithoutMatches | Include files without matches in results.| 27 | --setErrorLevelIfAnyFileErrors | Return ErrorLevel 2 if any files have read/write errors.| 28 | -------------------------------------------------------------------------------- /docs/pages/tutorials/installing.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: installing 3 | --- 4 | 5 | **Find and Replace (FNR)** is single file which can be easily downloaded and don't need any installation. 6 | 7 |
8 |
9 |
10 | 16 |
17 |
18 |
19 | -------------------------------------------------------------------------------- /docs/pages/tutorials/overview.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: overview 3 | --- 4 | 5 | ## Definition 6 | 7 | **Find and Replace (FNR)** is an open source tool to find and replace text in multiple files. It can quickly search through large numbers of files and also find the information using regular expressions specifying the form of what you want, instead of literal text. 8 | 9 | Find and Replace has; 10 | 11 | - Simple UI to make sure that find/replace works. 12 | - Command line to run find/replace using a batch file. 13 | 14 | 15 | ## Features? 16 | 17 | - Single file download - fnr.exe (181kb) 18 | - Replace text in multiple files using windows application or through command line 19 | - Find Only to see where matches are found 20 | - Case-sensitive searching 21 | - Searching for files in one directory or recursing sub-directories 22 | - Regular expressions 23 | - Find and replace multi-line text 24 | - Generate command line button to create command line text to put in batch file 25 | - Command line help 26 | 27 | -------------------------------------------------------------------------------- /docs/pages/tutorials/regular-expressions.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: regular-expressions 3 | --- 4 | 5 | ## Regular Expressions 6 | 7 | Regular expressions provide a robust, flexible, and efficient method for processing text. The [.NET RegEx engine](http://msdn.microsoft.com/en-us/library/hs600312(v=vs.110).aspx) is used for regular expressions. 8 | 9 | In the .NET Framework, regular expression patterns are defined by a [unique syntax or language](https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference), which is compatible with Perl 5 regular expressions and adds some additional features such as right-to-left matching. 10 | 11 | To use regular expressions in your find/replace text, you need just to check the "Use regular expressions" checkbox if you are using the UI. For example, to search for emails then you can use the following regular expression. 12 | 13 | {% include template-example.html%} 14 | {% highlight csharp %} 15 | 16 | \b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b 17 | 18 | {% endhighlight %} 19 | 20 | Regular Expressions 21 | 22 | But if you are using the command line in batch mode then use **--useRegEx** flag. 23 | 24 | {% include template-example.html%} 25 | {% highlight csharp %} 26 | 27 | "D:\fnr.exe" --cl --dir "D:\Project\ZZZ\FNR Testing\Temp" --fileMask "*.*" --includeSubDirectories 28 | --useRegEx --find "\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b" --replace "" 29 | 30 | {% endhighlight %} 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /docs/pages/tutorials/special-characters.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: special-characters 3 | --- 4 | 5 | ## Escape Characters 6 | 7 | **Find and Replace (FNR)** supports escape characters such as "\n", "\t", etc. To use [escape characters](https://en.wikipedia.org/wiki/Escape_character) in your find/replace text, you need just to check the **Use escape chars** checkbox if you are using the UI. 8 | 9 | Escape Chars 10 | 11 | But if you are using the command line in batch mode then use **--useEscapeChars** flag. 12 | 13 | {% include template-example.html%} 14 | {% highlight csharp %} 15 | 16 | "D:\fnr.exe" --cl --dir "D:\Project\ZZZ\FNR Testing\Temp" --fileMask "*.*" --includeSubDirectories 17 | --useEscapeChars --find "\t" --replace "\r\n" 18 | 19 | {% endhighlight %} 20 | 21 | ## Accented Characters 22 | 23 | By default, when you run DOS commands, the values in arguments are limited to [code page 437](https://en.wikipedia.org/wiki/Code_page_437). 24 | 25 | To pass chars that are not supported by code page 437 in find/replace text or other arguments, you can use the following techniques: 26 | 27 | - How to write a batch file that has accented chars: [http://stackoverflow.com/questions/1427796/batch-file-encoding/1427817](http://stackoverflow.com/questions/1427796/batch-file-encoding/1427817). 28 | - View UTF-16 or other encodings in DOS prompt [http://stackoverflow.com/questions/10764920/utf-16-on-cmd-exe](http://stackoverflow.com/questions/10764920/utf-16-on-cmd-exe). 29 | - One more tip is to make sure you save your BAT file in UTF-8 or another format that displays the chars correctly. Don't use ASCII. -------------------------------------------------------------------------------- /docs/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | 3 | # Allow crawling of all content 4 | User-agent: 5 | Disallow: * 6 | Sitemap: http://entityframework-dynamicfilters.net/sitemap.xml 7 | -------------------------------------------------------------------------------- /docs2/pages/getting-started/basic-usage.md: -------------------------------------------------------------------------------- 1 | # Basic Usage 2 | 3 | ## Basic Usage 4 | 5 | **Find and Replace (FNR)** has a very simple and easy to use UI which provides search and replace operations across multiple ASCII (text, HTML, etc.) files. 6 | 7 | Basic Usage 8 | 9 | - You can find/replace text in multiple files by specifying the path in **Dir** field. 10 | - You can also specify file masks, and even exclude some file masks. 11 | - You can search documents for a phrase or several words, multi-line or regular expression. 12 | 13 | ### Example 14 | 15 | Let's try to search “license” by specify it in Find field and click on the Find Only button which will search for all occurrences of “license”. The Results section will display all the files in which the results are found. 16 | 17 | Basic Usage 18 | 19 | Now to replace a text just specify the text in **Replace** field and click Replace button and all the occurrences of text specified in **Find** field will be replaced with the text specified in **Replace** field. 20 | 21 | -------------------------------------------------------------------------------- /docs2/pages/getting-started/command-line.md: -------------------------------------------------------------------------------- 1 | # Command Line 2 | 3 | ## Command Line 4 | 5 | **Find and Replace (FNR)** can also be used as a command line utility. The intersting thing about FNR is that it can create command line text to put in batch file by simply clinking on the **Gen Replace Command Line** button. 6 | 7 | Command Line 8 | 9 | ### Example 10 | 11 | Let's try to replace "license" with "agreement" by using the command line, so just copy the command line text created by FNR. 12 | 13 | 14 | ```csharp 15 | 16 | "D:\fnr.exe" --cl --dir "D:\Project\ZZZ\FNR Testing\Temp" --fileMask "*.*" --excludeFileMask 17 | "*.dll; *.exe" --includeSubDirectories --find "license" --replace "agreement" 18 | 19 | ``` 20 | 21 | Command Line 22 | 23 | -------------------------------------------------------------------------------- /docs2/pages/getting-started/detect-encoding.md: -------------------------------------------------------------------------------- 1 | # Detect Encoding 2 | 3 | ## Detect Encoding 4 | 5 | Find and Replace (FNR) uses two approaches two detect file encoding: 6 | 7 | - First KlerkSoft Bom Detector which is streamlined version of code from [here](http://www.architectshack.com/TextFileEncodingDetector.ashx) 8 | 9 | - If Bom Detection fails it uses Microsoft's MLang library using approach described [here](http://www.codeproject.com/Articles/17201/Detect-Encoding-for-In-and-Outgoing-Text) 10 | 11 | ## Why Detection Fail? 12 | 13 | In some rare cases, the detection may fail or may report a false positive. 14 | 15 | - The reason for it failing is that detecting correct file encoding 100% of the time is impossible. 16 | - MLang uses heuristics to go through file content and give its best guess on encoding. 17 | - Usually, its guess is correct 99%+ of the time. 18 | - The only sure way to load a file with correct encoding is to know it upfront and pass it in. 19 | 20 | ## Workaround 21 | 22 | If you have a case where encoding detection fails for a specific file, you will get error message "Could not detect file encoding." for that file. To get around this error, there are several approaches: 23 | 24 | ### Save as Unicode Encoding. 25 | 26 | - You can open the problematic file in Notepad and save it using Unicode encoding. 27 | - This will add a BOM header to the file so it will be easily detected by KlerkSoft Bom Detector 28 | 29 | 30 | ### Use Enconding Flags 31 | 32 | - Use **--defaultEncodingIfNotDetected** or **--alwaysUseEncoding** to bypass automatic detection. See details for these flags in the [Flags](/flags). 33 | 34 | - For these flags you can use any encoding listed [here](http://msdn.microsoft.com/en-us/library/system.text.encoding.getencodings(v=vs.110).aspx). Just scroll down to example results and look for values in column 'identifier and name': -------------------------------------------------------------------------------- /docs2/pages/getting-started/error-levels.md: -------------------------------------------------------------------------------- 1 | # Error Levels 2 | 3 | ## Error Levels 4 | 5 | **Find and Replace (FNR)** supports the following error levels: 6 | 7 | Level | Description| 8 | :-----|:-----------| 9 | 0 | No errors| 10 | 1 | Major error like directory is invalid| 11 | 2 | Read/Write error for any processed file| 12 | 13 | By default, only 0 and 1 are returned by the command. To enable ErrorLevel 2, use new flag --setErrorLevelIfAnyFileErrors. See details for flags [here](/flags). -------------------------------------------------------------------------------- /docs2/pages/getting-started/flags.md: -------------------------------------------------------------------------------- 1 | # Flags 2 | 3 | ## Flags 4 | 5 | Flag | Description| 6 | :-------------- | :-------------- | 7 | --cl | Required to run on command line.| 8 | --find | Required. Text to find.| 9 | --replace | Replacement text. If not specified only find operation is performed.| 10 | --useRegEx | Use regular expressions in 'find' parameter.| 11 | --useEscapeChars | Use escape chars like '\n' in 'find' and 'replace' parameters.| 12 | --caseSensitive | Case Sensitive.| 13 | --dir | Required. Directory path.| 14 | --includeSubDirectories | Include files in SubDirectories.| 15 | --fileMask | Required. File mask or multiple file masks separated by comma.| 16 | --excludeFileMask | File masks to exclude. If multiple - separate by comma| 17 | --help | Dispaly help screen.| 18 | --showEncoding | Displays detected encoding for each file with matches.| 19 | --silent | Supress the command window output.| 20 | --logFile | Path to log file where to save command output.| 21 | --skipBinaryFileDetection | Ignore detection of binary files.| 22 | --alwaysUseEncoding | Skip encoding detection and always use specified encoding.| 23 | --defaultEncodingIfNotDetected | If encoding is not detected in some very rare cases, use this one.| 24 | --includeFilesWithoutMatches | Include files without matches in results.| 25 | --setErrorLevelIfAnyFileErrors | Return ErrorLevel 2 if any files have read/write errors.| 26 | -------------------------------------------------------------------------------- /docs2/pages/getting-started/overview.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | 3 | ## Definition 4 | 5 | **Find and Replace (FNR)** is an open source tool to find and replace text in multiple files. It can quickly search through large numbers of files and also find the information using regular expressions specifying the form of what you want, instead of literal text. 6 | 7 | Find and Replace has; 8 | 9 | - Simple UI to make sure that find/replace works. 10 | - Command line to run find/replace using a batch file. 11 | 12 | ## Installing and Upgrading 13 | Find and Replace (FNR) is single file which can be easily downloaded and don't need any installation. 14 | 15 | ## Features? 16 | 17 | - Single file download - fnr.exe (181kb) 18 | - Replace text in multiple files using windows application or through command line 19 | - Find Only to see where matches are found 20 | - Case-sensitive searching 21 | - Searching for files in one directory or recursing sub-directories 22 | - Regular expressions 23 | - Find and replace multi-line text 24 | - Generate command line button to create command line text to put in batch file 25 | - Command line help 26 | 27 | -------------------------------------------------------------------------------- /docs2/pages/getting-started/regular-expressions.md: -------------------------------------------------------------------------------- 1 | # Regular Expressions 2 | 3 | ## Regular Expressions 4 | 5 | Regular expressions provide a robust, flexible, and efficient method for processing text. The [.NET RegEx engine](http://msdn.microsoft.com/en-us/library/hs600312(v=vs.110).aspx) is used for regular expressions. 6 | 7 | In the .NET Framework, regular expression patterns are defined by a [unique syntax or language](https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference), which is compatible with Perl 5 regular expressions and adds some additional features such as right-to-left matching. 8 | 9 | To use regular expressions in your find/replace text, you need just to check the "Use regular expressions" checkbox if you are using the UI. For example, to search for emails then you can use the following regular expression. 10 | 11 | 12 | ```csharp 13 | 14 | \b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b 15 | 16 | ``` 17 | 18 | Regular Expressions 19 | 20 | But if you are using the command line in batch mode then use **--useRegEx** flag. 21 | 22 | 23 | ```csharp 24 | 25 | "D:\fnr.exe" --cl --dir "D:\Project\ZZZ\FNR Testing\Temp" --fileMask "*.*" --includeSubDirectories 26 | --useRegEx --find "\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b" --replace "" 27 | 28 | ``` 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /docs2/pages/getting-started/special-characters.md: -------------------------------------------------------------------------------- 1 | # Special Characters 2 | 3 | ## Escape Characters 4 | 5 | **Find and Replace (FNR)** supports escape characters such as "\n", "\t", etc. To use [escape characters](https://en.wikipedia.org/wiki/Escape_character) in your find/replace text, you need just to check the **Use escape chars** checkbox if you are using the UI. 6 | 7 | Escape Chars 8 | 9 | But if you are using the command line in batch mode then use **--useEscapeChars** flag. 10 | 11 | 12 | ```csharp 13 | 14 | "D:\fnr.exe" --cl --dir "D:\Project\ZZZ\FNR Testing\Temp" --fileMask "*.*" --includeSubDirectories 15 | --useEscapeChars --find "\t" --replace "\r\n" 16 | 17 | ``` 18 | 19 | ## Accented Characters 20 | 21 | By default, when you run DOS commands, the values in arguments are limited to [code page 437](https://en.wikipedia.org/wiki/Code_page_437). 22 | 23 | To pass chars that are not supported by code page 437 in find/replace text or other arguments, you can use the following techniques: 24 | 25 | - How to write a batch file that has accented chars: [http://stackoverflow.com/questions/1427796/batch-file-encoding/1427817](http://stackoverflow.com/questions/1427796/batch-file-encoding/1427817). 26 | - View UTF-16 or other encodings in DOS prompt [http://stackoverflow.com/questions/10764920/utf-16-on-cmd-exe](http://stackoverflow.com/questions/10764920/utf-16-on-cmd-exe). 27 | - One more tip is to make sure you save your BAT file in UTF-8 or another format that displays the chars correctly. Don't use ASCII. -------------------------------------------------------------------------------- /docs2/pages/site/contact-us.md: -------------------------------------------------------------------------------- 1 | # Contact Us 2 | 3 |
4 | 5 |

Support

6 | 7 | The support for `Find & Replace` is currently paused. 8 | 9 |
10 | -------------------------------------------------------------------------------- /docs2/pages/site/download.md: -------------------------------------------------------------------------------- 1 | # Download 2 | 3 |
4 |
5 |
6 |
7 |
8 | 16 |
17 | 19 | 20 | FnR Zip Download 21 | 22 |
Download Count:
23 |
24 | 26 | 27 | 28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | 36 | -------------------------------------------------------------------------------- /entity-framework-extensions-sponsor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/entity-framework-extensions-sponsor.png -------------------------------------------------------------------------------- /lib/CommandLineParser.1.9.71/CommandLineParser.1.9.71.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/CommandLineParser.1.9.71/CommandLineParser.1.9.71.nupkg -------------------------------------------------------------------------------- /lib/CommandLineParser.1.9.71/CommandLineParser.1.9.71.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CommandLineParser 5 | 1.9.71 6 | Command Line Parser Library 7 | Giacomo Stelluti Scala 8 | Giacomo Stelluti Scala 9 | https://raw.github.com/gsscoder/commandline/master/doc/LICENSE 10 | https://github.com/gsscoder/commandline 11 | https://github.com/gsscoder/commandline/raw/master/art/CommandLine.png 12 | false 13 | The Command Line Parser Library offers to CLR applications a clean and concise API for manipulating command line arguments and related tasks. 14 | 15 | Copyright (c) 2005 - 2013 Giacomo Stelluti Scala 16 | 17 | command line argument option parser parsing library syntax shell 18 | 19 | -------------------------------------------------------------------------------- /lib/CommandLineParser.1.9.71/lib/net35/CommandLine.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/CommandLineParser.1.9.71/lib/net35/CommandLine.dll -------------------------------------------------------------------------------- /lib/CommandLineParser.1.9.71/lib/net40/CommandLine.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/CommandLineParser.1.9.71/lib/net40/CommandLine.dll -------------------------------------------------------------------------------- /lib/CommandLineParser.1.9.71/lib/net45/CommandLine.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/CommandLineParser.1.9.71/lib/net45/CommandLine.dll -------------------------------------------------------------------------------- /lib/CommandLineParser.1.9.71/readme.txt: -------------------------------------------------------------------------------- 1 | Command Line Parser Library 1.9.71.2 stable 2 | ------------------------------------------ 3 | Giacomo Stelluti Scala 4 | (gsscoder@gmail.com) 5 | 6 | GitHub (Latest Sources, Updated Docs): https://github.com/gsscoder/commandline 7 | Codeplex (Binary Downloads): http://commandline.codeplex.com/ 8 | 9 | Remarks: 10 | - IParser and IParserSettings interface were removed. 11 | 12 | Upgrading from < 1.9.6.1 rc1: 13 | ----------------------------- 14 | Now CommandLine.Parser is defiend as: 15 | interface CommandLine.Parser { 16 | bool ParseArguments(string[] args, object options); 17 | bool ParseArguments(string[] args, object options, Action onVerbCommand); 18 | bool ParseArgumentsStrict(string[] args, object options, Action onFail = null); 19 | bool ParseArgumentsStrict(string[] args, object options, Action onVerbCommand, Action onFail = null); 20 | } 21 | Please refer to wiki (https://github.com/gsscoder/commandline/wiki). 22 | For help screen in verb command scenario use new HelpText::AutoBuild(object,string). 23 | 24 | Upgrading from < 1.9.4.91 versions: 25 | ----------------------------------- 26 | - Use System.Char for short name: 27 | [Option('o', "my-option", DefaultValue=10, HelpText="This is an option!")] 28 | public int MyOption { get; set; } 29 | - Receive parsing errors without CommandLineOptionsBase (removed): 30 | public class Options { 31 | [ParserState] 32 | public IParserState LastParserState { get; set; } 33 | } 34 | - Types rename: 35 | MultiLineTextAttribute -> MultilineTextAttribute (first 'L' -> lowercase) 36 | CommandLineParser -> Parser (suggestion: qualify with namespace -> CommandLine.Parser). 37 | ICommandLineParser -> IParser 38 | CommandLineParserSettings -> ParserSettings 39 | CommandLineParserException -> ParserException 40 | 41 | Upgrading from 1.8.* versions: 42 | ------------------------------ 43 | The major API change is that all attributes that inherits from BaseOptionAttribute now 44 | apply only to properties. Fields are no longer supported. 45 | 46 | Old Code: 47 | --------- 48 | class Options { 49 | [Option("o", "my-option", HelpText="This is an option!")] 50 | public int MyOption = 10; 51 | } 52 | 53 | New Code: 54 | --------- 55 | class Options { 56 | [Option("o", "my-option", DefaultValue=10, HelpText="This is an option!")] 57 | public int MyOption { get; set; } 58 | } 59 | 60 | As you can see I've added the new DefaultValue property to help you initialize properties. 61 | 62 | Shortcut for Help Screen 63 | ------------------------ 64 | [HelpOption] 65 | public string GetUsage() 66 | { 67 | return HelpText.AutoBuild(this, 68 | (HelpText current) => HelpText.DefaultParsingErrorsHandler(this, current)); 69 | } 70 | 71 | Note: 72 | ----- 73 | If you don't use mutually exclusive options, now there's a singleton built for common uses: 74 | 75 | if (CommandLineParser.Default.ParseArguments(args, options)) { 76 | // consume values here 77 | } 78 | 79 | Have fun! 80 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/Logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/Logo.ico -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/NUnit.2.5.10.11092.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/NUnit.2.5.10.11092.nupkg -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/lib/nunit.framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/lib/nunit.framework.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/lib/nunit.mocks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/lib/nunit.mocks.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/lib/pnunit.framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/lib/pnunit.framework.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/license.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/license.txt -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/NUnitTests.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 25 | 26 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 54 | 55 | 60 | 61 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/NUnitTests.nunit: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/agent.conf: -------------------------------------------------------------------------------- 1 | 2 | 8080 3 | . 4 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/agent.log.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/launcher.log.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/Failure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/Failure.png -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/Ignored.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/Ignored.png -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/Inconclusive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/Inconclusive.png -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/Skipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/Skipped.png -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/Success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/Success.png -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/fit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/fit.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/log4net.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/nunit-console-runner.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/nunit-console-runner.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/nunit-gui-runner.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/nunit-gui-runner.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/nunit.core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/nunit.core.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/nunit.core.interfaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/nunit.core.interfaces.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/nunit.fixtures.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/nunit.fixtures.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/nunit.uiexception.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/nunit.uiexception.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/nunit.uikit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/nunit.uikit.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/lib/nunit.util.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/lib/nunit.util.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/nunit-agent-x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/nunit-agent-x86.exe -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/nunit-agent-x86.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 22 | 24 | 25 | 26 | 29 | 31 | 32 | 33 | 34 | 37 | 39 | 40 | 41 | 42 | 45 | 47 | 48 | 49 | 50 | 53 | 55 | 56 | 57 | 58 | 61 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/nunit-agent.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/nunit-agent.exe -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/nunit-agent.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 22 | 24 | 25 | 26 | 29 | 31 | 32 | 33 | 34 | 37 | 39 | 40 | 41 | 42 | 45 | 47 | 48 | 49 | 50 | 53 | 55 | 56 | 57 | 58 | 61 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/nunit-console-x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/nunit-console-x86.exe -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/nunit-console-x86.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 22 | 24 | 25 | 26 | 29 | 31 | 32 | 33 | 34 | 37 | 39 | 40 | 41 | 42 | 45 | 47 | 48 | 49 | 50 | 53 | 55 | 56 | 57 | 58 | 61 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/nunit-console.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/nunit-console.exe -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/nunit-console.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 22 | 24 | 25 | 26 | 29 | 31 | 32 | 33 | 34 | 37 | 39 | 40 | 41 | 42 | 45 | 47 | 48 | 49 | 50 | 53 | 55 | 56 | 57 | 58 | 61 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/nunit-x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/nunit-x86.exe -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/nunit-x86.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 36 | 38 | 39 | 40 | 43 | 45 | 46 | 47 | 48 | 51 | 53 | 54 | 55 | 56 | 59 | 61 | 62 | 63 | 64 | 67 | 69 | 70 | 71 | 72 | 75 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/nunit.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/nunit.exe -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/nunit.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 36 | 38 | 39 | 40 | 43 | 45 | 46 | 47 | 48 | 51 | 53 | 54 | 55 | 56 | 59 | 61 | 62 | 63 | 64 | 67 | 69 | 70 | 71 | 72 | 75 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/nunit.framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/nunit.framework.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/pnunit-agent.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/pnunit-agent.exe -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/pnunit-agent.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 30 | 32 | 33 | 34 | 37 | 39 | 40 | 41 | 42 | 45 | 47 | 48 | 49 | 50 | 53 | 55 | 56 | 57 | 58 | 61 | 63 | 64 | 65 | 66 | 69 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/pnunit-launcher.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/pnunit-launcher.exe -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/pnunit-launcher.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 30 | 32 | 33 | 34 | 37 | 39 | 40 | 41 | 42 | 45 | 47 | 48 | 49 | 50 | 53 | 55 | 56 | 57 | 58 | 61 | 63 | 64 | 65 | 66 | 69 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/pnunit.framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/pnunit.framework.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/pnunit.tests.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/pnunit.tests.dll -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/runFile.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/lib/NUnit.2.5.10.11092/tools/runFile.exe -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/runFile.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/runpnunit.bat: -------------------------------------------------------------------------------- 1 | start pnunit-agent agent.conf 2 | pnunit-launcher test.conf -------------------------------------------------------------------------------- /lib/NUnit.2.5.10.11092/tools/test.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Testing 6 | 7 | 8 | Testing 9 | pnunit.tests.dll 10 | TestLibraries.Testing.EqualTo19 11 | localhost:8080 12 | 13 | ..\server 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /lib/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # This .gitignore file was automatically created by Microsoft(R) Visual Studio. 3 | ################################################################################ 4 | 5 | /packages 6 | /.vs 7 | /EncodingTools/bin/Debug 8 | /EncodingTools/obj/Debug 9 | /EncodingTools/obj/Release 10 | /FindAndReplace/bin/Debug 11 | /FindAndReplace/obj 12 | /FindAndReplace.App/obj/x86 13 | /FindAndReplace.App/bin/Debug 14 | /FindAndReplace.Tests/obj 15 | /FindAndReplace.Tests/bin/Debug 16 | /FindAndReplace.Tests.CommandLine/obj 17 | /FindAndReplace.Tests.CommandLine/bin/Debug 18 | /EncodingTools/bin/Release 19 | /FindAndReplace/bin/Release 20 | /FindAndReplace.App/bin/Release 21 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/CMLangConvertCharset.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System.Runtime.InteropServices; 4 | 5 | [ComImport, Guid("D66D6F98-CDAA-11D0-B822-00C04FC9B31F"), CoClass(typeof(CMLangConvertCharsetClass))] 6 | public interface CMLangConvertCharset : IMLangConvertCharset 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/CMLangConvertCharsetClass.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | using System.Security; 7 | 8 | [ComImport, ClassInterface((short) 0), TypeLibType((short) 2), Guid("D66D6F99-CDAA-11D0-B822-00C04FC9B31F")] 9 | public class CMLangConvertCharsetClass : IMLangConvertCharset, CMLangConvertCharset 10 | { 11 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 12 | public virtual extern void DoConversion([In] ref byte pSrcStr, [In, Out] ref uint pcSrcSize, [In] ref byte pDstStr, [In, Out] ref uint pcDstSize); 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | public virtual extern void DoConversionFromUnicode([In] ref ushort pSrcStr, [In, Out] ref uint pcSrcSize, [In] ref sbyte pDstStr, [In, Out] ref uint pcDstSize); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | public virtual extern void DoConversionToUnicode([In] ref sbyte pSrcStr, [In, Out] ref uint pcSrcSize, [In] ref ushort pDstStr, [In, Out] ref uint pcDstSize); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | public virtual extern void GetDestinationCodePage(out uint puiDstCodePage); 19 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 20 | public virtual extern void GetProperty(out uint pdwProperty); 21 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 22 | public virtual extern void GetSourceCodePage(out uint puiSrcCodePage); 23 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 24 | public virtual extern void Initialize([In] uint uiSrcCodePage, [In] uint uiDstCodePage, [In] uint dwProperty); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/CMLangString.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System.Runtime.InteropServices; 4 | 5 | [ComImport, CoClass(typeof(CMLangStringClass)), Guid("C04D65CE-B70D-11D0-B188-00AA0038C969")] 6 | public interface CMLangString : IMLangString 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/CMultiLanguage.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System.Runtime.InteropServices; 4 | 5 | [ComImport, Guid("275C23E1-3747-11D0-9FEA-00AA003F8646"), CoClass(typeof(CMultiLanguageClass))] 6 | public interface CMultiLanguage : IMultiLanguage 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IEnumCodePage.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | using System.Security; 7 | 8 | [ComImport, Guid("275C23E3-3747-11D0-9FEA-00AA003F8646"), InterfaceType((short) 1)] 9 | public interface IEnumCodePage 10 | { 11 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 12 | void Clone([MarshalAs(UnmanagedType.Interface)] out IEnumCodePage ppEnum); 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void Next([In] uint celt, out tagMIMECPINFO rgelt, out uint pceltFetched); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | void Reset(); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | void Skip([In] uint celt); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IEnumRfc1766.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | using System.Security; 7 | 8 | [ComImport, Guid("3DC39D1D-C030-11D0-B81B-00C04FC9B31F"), InterfaceType((short) 1)] 9 | public interface IEnumRfc1766 10 | { 11 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 12 | void Clone([MarshalAs(UnmanagedType.Interface)] out IEnumRfc1766 ppEnum); 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void Next([In] uint celt, out tagRFC1766INFO rgelt, out uint pceltFetched); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | void Reset(); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | void Skip([In] uint celt); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IEnumScript.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | using System.Security; 7 | 8 | [ComImport, Guid("AE5F1430-388B-11D2-8380-00C04F8F5DA1"), InterfaceType((short) 1)] 9 | public interface IEnumScript 10 | { 11 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 12 | void Clone([MarshalAs(UnmanagedType.Interface)] out IEnumScript ppEnum); 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void Next([In] uint celt, out tagSCRIPTINFO rgelt, out uint pceltFetched); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | void Reset(); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | void Skip([In] uint celt); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IMLangCodePages.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | using System.Security; 7 | 8 | [ComImport, Guid("359F3443-BD4A-11D0-B188-00AA0038C969"), InterfaceType((short) 1)] 9 | public interface IMLangCodePages 10 | { 11 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 12 | void GetCharCodePages([In] ushort chSrc, out uint pdwCodePages); 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void GetStrCodePages([In] ref ushort pszSrc, [In] int cchSrc, [In] uint dwPriorityCodePages, out uint pdwCodePages, out int pcchCodePages); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | void CodePageToCodePages([In] uint uCodePage, out uint pdwCodePages); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | void CodePagesToCodePage([In] uint dwCodePages, [In] uint uDefaultCodePage, out uint puCodePage); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IMLangConvertCharset.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | using System.Security; 7 | 8 | [ComImport, Guid("D66D6F98-CDAA-11D0-B822-00C04FC9B31F"), InterfaceType((short) 1)] 9 | public interface IMLangConvertCharset 10 | { 11 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 12 | void Initialize([In] uint uiSrcCodePage, [In] uint uiDstCodePage, [In] uint dwProperty); 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void GetSourceCodePage(out uint puiSrcCodePage); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | void GetDestinationCodePage(out uint puiDstCodePage); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | void GetProperty(out uint pdwProperty); 19 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 20 | void DoConversion([In] ref byte pSrcStr, [In, Out] ref uint pcSrcSize, [In] ref byte pDstStr, [In, Out] ref uint pcDstSize); 21 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 22 | void DoConversionToUnicode([In] ref sbyte pSrcStr, [In, Out] ref uint pcSrcSize, [In] ref ushort pDstStr, [In, Out] ref uint pcDstSize); 23 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 24 | void DoConversionFromUnicode([In] ref ushort pSrcStr, [In, Out] ref uint pcSrcSize, [In] ref sbyte pDstStr, [In, Out] ref uint pcDstSize); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IMLangFontLink.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0108 2 | 3 | namespace MultiLanguage 4 | { 5 | using System; 6 | using System.Runtime.CompilerServices; 7 | using System.Runtime.InteropServices; 8 | using System.Security; 9 | 10 | [ComImport, InterfaceType((short) 1), ComConversionLoss, Guid("359F3441-BD4A-11D0-B188-00AA0038C969")] 11 | public interface IMLangFontLink : IMLangCodePages 12 | { 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void GetCharCodePages([In] ushort chSrc, out uint pdwCodePages); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | void GetStrCodePages([In] ref ushort pszSrc, [In] int cchSrc, [In] uint dwPriorityCodePages, out uint pdwCodePages, out int pcchCodePages); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | void CodePageToCodePages([In] uint uCodePage, out uint pdwCodePages); 19 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 20 | void CodePagesToCodePage([In] uint dwCodePages, [In] uint uDefaultCodePage, out uint puCodePage); 21 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 22 | void GetFontCodePages([In, ComAliasName("MultiLanguage.wireHDC")] ref _RemotableHandle hDC, [In, ComAliasName("MultiLanguage.wireHFONT")] ref _RemotableHandle hFont, out uint pdwCodePages); 23 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 24 | void MapFont([In, ComAliasName("MultiLanguage.wireHDC")] ref _RemotableHandle hDC, [In] uint dwCodePages, [In, ComAliasName("MultiLanguage.wireHFONT")] ref _RemotableHandle hSrcFont, [Out, ComAliasName("MultiLanguage.wireHFONT")] IntPtr phDestFont); 25 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 26 | void ReleaseFont([In, ComAliasName("MultiLanguage.wireHFONT")] ref _RemotableHandle hFont); 27 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 28 | void ResetFontMapping(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IMLangFontLink2.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0108 2 | 3 | namespace MultiLanguage 4 | { 5 | using System; 6 | using System.Runtime.CompilerServices; 7 | using System.Runtime.InteropServices; 8 | using System.Security; 9 | 10 | [ComImport, ComConversionLoss, InterfaceType((short) 1), Guid("DCCFC162-2B38-11D2-B7EC-00C04F8F5D9A")] 11 | public interface IMLangFontLink2 : IMLangCodePages 12 | { 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void GetCharCodePages([In] ushort chSrc, out uint pdwCodePages); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | void GetStrCodePages([In] ref ushort pszSrc, [In] int cchSrc, [In] uint dwPriorityCodePages, out uint pdwCodePages, out int pcchCodePages); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | void CodePageToCodePages([In] uint uCodePage, out uint pdwCodePages); 19 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 20 | void CodePagesToCodePage([In] uint dwCodePages, [In] uint uDefaultCodePage, out uint puCodePage); 21 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 22 | void GetFontCodePages([In, ComAliasName("MultiLanguage.wireHDC")] ref _RemotableHandle hDC, [In, ComAliasName("MultiLanguage.wireHFONT")] ref _RemotableHandle hFont, out uint pdwCodePages); 23 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 24 | void ReleaseFont([In, ComAliasName("MultiLanguage.wireHFONT")] ref _RemotableHandle hFont); 25 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 26 | void ResetFontMapping(); 27 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 28 | void MapFont([In, ComAliasName("MultiLanguage.wireHDC")] ref _RemotableHandle hDC, [In] uint dwCodePages, [In] ushort chSrc, [Out, ComAliasName("MultiLanguage.wireHFONT")] IntPtr pFont); 29 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 30 | void GetFontUnicodeRanges([In, ComAliasName("MultiLanguage.wireHDC")] ref _RemotableHandle hDC, [In, Out] ref uint puiRanges, out tagUNICODERANGE pUranges); 31 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 32 | void GetScriptFontInfo([In] byte sid, [In] uint dwFlags, [In, Out] ref uint puiFonts, out tagSCRIPFONTINFO pScriptFont); 33 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 34 | void CodePageToScriptID([In] uint uiCodePage, out byte pSid); 35 | } 36 | } 37 | 38 | #pragma warning restore 0108 -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IMLangLineBreakConsole.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | using System.Security; 7 | 8 | [ComImport, InterfaceType((short) 1), Guid("F5BE2EE1-BFD7-11D0-B188-00AA0038C969")] 9 | public interface IMLangLineBreakConsole 10 | { 11 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 12 | void BreakLineML([In, MarshalAs(UnmanagedType.Interface)] CMLangString pSrcMLStr, [In] int lSrcPos, [In] int lSrcLen, [In] int cMinColumns, [In] int cMaxColumns, out int plLineLen, out int plSkipLen); 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void BreakLineW([In] uint locale, [In] ref ushort pszSrc, [In] int cchSrc, [In] int cMaxColumns, out int pcchLine, out int pcchSkip); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | void BreakLineA([In] uint locale, [In] uint uCodePage, [In] ref sbyte pszSrc, [In] int cchSrc, [In] int cMaxColumns, out int pcchLine, out int pcchSkip); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IMLangString.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | using System.Security; 7 | 8 | [ComImport, Guid("C04D65CE-B70D-11D0-B188-00AA0038C969"), InterfaceType((short) 1)] 9 | public interface IMLangString 10 | { 11 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 12 | void Sync([In] int fNoAccess); 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | int GetLength(); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | void SetMLStr([In] int lDestPos, [In] int lDestLen, [In, MarshalAs(UnmanagedType.IUnknown)] object pSrcMLStr, [In] int lSrcPos, [In] int lSrcLen); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | void GetMLStr([In] int lSrcPos, [In] int lSrcLen, [In, MarshalAs(UnmanagedType.IUnknown)] object pUnkOuter, [In] uint dwClsContext, [In] ref Guid piid, [MarshalAs(UnmanagedType.IUnknown)] out object ppDestMLStr, out int plDestPos, out int plDestLen); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IMLangStringAStr.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0108 2 | 3 | namespace MultiLanguage 4 | { 5 | using System; 6 | using System.Runtime.CompilerServices; 7 | using System.Runtime.InteropServices; 8 | using System.Security; 9 | 10 | [ComImport, Guid("C04D65D2-B70D-11D0-B188-00AA0038C969"), ComConversionLoss, InterfaceType((short) 1)] 11 | public interface IMLangStringAStr : IMLangString 12 | { 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void Sync([In] int fNoAccess); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | int GetLength(); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | void SetMLStr([In] int lDestPos, [In] int lDestLen, [In, MarshalAs(UnmanagedType.IUnknown)] object pSrcMLStr, [In] int lSrcPos, [In] int lSrcLen); 19 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 20 | void GetMLStr([In] int lSrcPos, [In] int lSrcLen, [In, MarshalAs(UnmanagedType.IUnknown)] object pUnkOuter, [In] uint dwClsContext, [In] ref Guid piid, [MarshalAs(UnmanagedType.IUnknown)] out object ppDestMLStr, out int plDestPos, out int plDestLen); 21 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 22 | void SetAStr([In] int lDestPos, [In] int lDestLen, [In] uint uCodePage, [In] ref sbyte pszSrc, [In] int cchSrc, out int pcchActual, out int plActualLen); 23 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 24 | void SetStrBufA([In] int lDestPos, [In] int lDestLen, [In] uint uCodePage, [In, MarshalAs(UnmanagedType.Interface)] IMLangStringBufA pSrcBuf, out int pcchActual, out int plActualLen); 25 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 26 | void GetAStr([In] int lSrcPos, [In] int lSrcLen, [In] uint uCodePageIn, out uint puCodePageOut, out sbyte pszDest, [In] int cchDest, out int pcchActual, out int plActualLen); 27 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 28 | void GetStrBufA([In] int lSrcPos, [In] int lSrcMaxLen, out uint puDestCodePage, [MarshalAs(UnmanagedType.Interface)] out IMLangStringBufA ppDestBuf, out int plDestLen); 29 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 30 | void LockAStr([In] int lSrcPos, [In] int lSrcLen, [In] int lFlags, [In] uint uCodePageIn, [In] int cchRequest, out uint puCodePageOut, [Out] IntPtr ppszDest, out int pcchDest, out int plDestLen); 31 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 32 | void UnlockAStr([In] ref sbyte pszSrc, [In] int cchSrc, out int pcchActual, out int plActualLen); 33 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 34 | void SetLocale([In] int lDestPos, [In] int lDestLen, [In] uint locale); 35 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 36 | void GetLocale([In] int lSrcPos, [In] int lSrcMaxLen, out uint plocale, out int plLocalePos, out int plLocaleLen); 37 | } 38 | } 39 | 40 | #pragma warning restore 0108 -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IMLangStringBufA.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | using System.Security; 7 | 8 | [ComImport, Guid("D24ACD23-BA72-11D0-B188-00AA0038C969"), InterfaceType((short) 1), ComConversionLoss] 9 | public interface IMLangStringBufA 10 | { 11 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 12 | void GetStatus(out int plFlags, out int pcchBuf); 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void LockBuf([In] int cchOffset, [In] int cchMaxLock, [Out] IntPtr ppszBuf, out int pcchBuf); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | void UnlockBuf([In] ref sbyte pszBuf, [In] int cchOffset, [In] int cchWrite); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | void Insert([In] int cchOffset, [In] int cchMaxInsert, out int pcchActual); 19 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 20 | void Delete([In] int cchOffset, [In] int cchDelete); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IMLangStringBufW.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | using System.Security; 7 | 8 | [ComImport, InterfaceType((short) 1), Guid("D24ACD21-BA72-11D0-B188-00AA0038C969"), ComConversionLoss] 9 | public interface IMLangStringBufW 10 | { 11 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 12 | void GetStatus(out int plFlags, out int pcchBuf); 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void LockBuf([In] int cchOffset, [In] int cchMaxLock, [Out] IntPtr ppszBuf, out int pcchBuf); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | void UnlockBuf([In] ref ushort pszBuf, [In] int cchOffset, [In] int cchWrite); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | void Insert([In] int cchOffset, [In] int cchMaxInsert, out int pcchActual); 19 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 20 | void Delete([In] int cchOffset, [In] int cchDelete); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IMLangStringWStr.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0108 2 | 3 | namespace MultiLanguage 4 | { 5 | using System; 6 | using System.Runtime.CompilerServices; 7 | using System.Runtime.InteropServices; 8 | using System.Security; 9 | 10 | [ComImport, InterfaceType((short) 1), ComConversionLoss, Guid("C04D65D0-B70D-11D0-B188-00AA0038C969")] 11 | public interface IMLangStringWStr : IMLangString 12 | { 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void Sync([In] int fNoAccess); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | int GetLength(); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | void SetMLStr([In] int lDestPos, [In] int lDestLen, [In, MarshalAs(UnmanagedType.IUnknown)] object pSrcMLStr, [In] int lSrcPos, [In] int lSrcLen); 19 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 20 | void GetMLStr([In] int lSrcPos, [In] int lSrcLen, [In, MarshalAs(UnmanagedType.IUnknown)] object pUnkOuter, [In] uint dwClsContext, [In] ref Guid piid, [MarshalAs(UnmanagedType.IUnknown)] out object ppDestMLStr, out int plDestPos, out int plDestLen); 21 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 22 | void SetWStr([In] int lDestPos, [In] int lDestLen, [In] ref ushort pszSrc, [In] int cchSrc, out int pcchActual, out int plActualLen); 23 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 24 | void SetStrBufW([In] int lDestPos, [In] int lDestLen, [In, MarshalAs(UnmanagedType.Interface)] IMLangStringBufW pSrcBuf, out int pcchActual, out int plActualLen); 25 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 26 | void GetWStr([In] int lSrcPos, [In] int lSrcLen, out ushort pszDest, [In] int cchDest, out int pcchActual, out int plActualLen); 27 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 28 | void GetStrBufW([In] int lSrcPos, [In] int lSrcMaxLen, [MarshalAs(UnmanagedType.Interface)] out IMLangStringBufW ppDestBuf, out int plDestLen); 29 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 30 | void LockWStr([In] int lSrcPos, [In] int lSrcLen, [In] int lFlags, [In] int cchRequest, [Out] IntPtr ppszDest, out int pcchDest, out int plDestLen); 31 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 32 | void UnlockWStr([In] ref ushort pszSrc, [In] int cchSrc, out int pcchActual, out int plActualLen); 33 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 34 | void SetLocale([In] int lDestPos, [In] int lDestLen, [In] uint locale); 35 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 36 | void GetLocale([In] int lSrcPos, [In] int lSrcMaxLen, out uint plocale, out int plLocalePos, out int plLocaleLen); 37 | } 38 | } 39 | 40 | #pragma warning restore 0108 -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IMultiLanguage.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | using System.Security; 7 | 8 | [ComImport, Guid("275C23E1-3747-11D0-9FEA-00AA003F8646"), InterfaceType((short) 1)] 9 | public interface IMultiLanguage 10 | { 11 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 12 | void GetNumberOfCodePageInfo(out uint pcCodePage); 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void GetCodePageInfo([In] uint uiCodePage, out tagMIMECPINFO pCodePageInfo); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | void GetFamilyCodePage([In] uint uiCodePage, out uint puiFamilyCodePage); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | void EnumCodePages([In] uint grfFlags, [MarshalAs(UnmanagedType.Interface)] out IEnumCodePage ppEnumCodePage); 19 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 20 | void GetCharsetInfo([In, MarshalAs(UnmanagedType.BStr)] string Charset, out tagMIMECSETINFO pCharsetInfo); 21 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 22 | void IsConvertible([In] uint dwSrcEncoding, [In] uint dwDstEncoding); 23 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 24 | void ConvertString([In, Out] ref uint pdwMode, [In] uint dwSrcEncoding, [In] uint dwDstEncoding, [In] ref byte pSrcStr, [In, Out] ref uint pcSrcSize, [In] ref byte pDstStr, [In, Out] ref uint pcDstSize); 25 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 26 | void ConvertStringToUnicode([In, Out] ref uint pdwMode, [In] uint dwEncoding, [In] ref sbyte pSrcStr, [In, Out] ref uint pcSrcSize, [In] ref ushort pDstStr, [In, Out] ref uint pcDstSize); 27 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 28 | void ConvertStringFromUnicode([In, Out] ref uint pdwMode, [In] uint dwEncoding, [In] ref ushort pSrcStr, [In, Out] ref uint pcSrcSize, [In] ref sbyte pDstStr, [In, Out] ref uint pcDstSize); 29 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 30 | void ConvertStringReset(); 31 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 32 | void GetRfc1766FromLcid([In] uint locale, [MarshalAs(UnmanagedType.BStr)] out string pbstrRfc1766); 33 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 34 | void GetLcidFromRfc1766(out uint plocale, [In, MarshalAs(UnmanagedType.BStr)] string bstrRfc1766); 35 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 36 | void EnumRfc1766([MarshalAs(UnmanagedType.Interface)] out IEnumRfc1766 ppEnumRfc1766); 37 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 38 | void GetRfc1766Info([In] uint locale, out tagRFC1766INFO pRfc1766Info); 39 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 40 | void CreateConvertCharset([In] uint uiSrcCodePage, [In] uint uiDstCodePage, [In] uint dwProperty, [MarshalAs(UnmanagedType.Interface)] out CMLangConvertCharset ppMLangConvertCharset); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/ISequentialStream.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | using System.Security; 7 | 8 | [ComImport, Guid("0C733A30-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType((short) 1)] 9 | public interface ISequentialStream 10 | { 11 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 12 | void RemoteRead(IntPtr pv, uint cb, ref uint pcbRead); 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void RemoteWrite([In] ref byte pv, [In] uint cb, ref uint pcbWritten); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/IStream.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0108 2 | 3 | namespace MultiLanguage 4 | { 5 | using System; 6 | using System.Runtime.CompilerServices; 7 | using System.Runtime.InteropServices; 8 | using System.Security; 9 | 10 | [ComImport, Guid("0000000C-0000-0000-C000-000000000046"), InterfaceType((short) 1)] 11 | public interface IStream : ISequentialStream 12 | { 13 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 14 | void RemoteRead(IntPtr pv, uint cb, ref uint pcbRead); 15 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 16 | void RemoteWrite([In] ref byte pv, [In] uint cb, ref uint pcbWritten); 17 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 18 | void RemoteSeek([In] _LARGE_INTEGER dlibMove, [In] uint dwOrigin, IntPtr plibNewPosition); 19 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 20 | void SetSize([In] _ULARGE_INTEGER libNewSize); 21 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 22 | void RemoteCopyTo([In, MarshalAs(UnmanagedType.Interface)] IStream pstm, [In] _ULARGE_INTEGER cb, out _ULARGE_INTEGER pcbRead, out _ULARGE_INTEGER pcbWritten); 23 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 24 | void Commit([In] uint grfCommitFlags); 25 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 26 | void Revert(); 27 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 28 | void LockRegion([In] _ULARGE_INTEGER libOffset, [In] _ULARGE_INTEGER cb, [In] uint dwLockType); 29 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 30 | void UnlockRegion([In] _ULARGE_INTEGER libOffset, [In] _ULARGE_INTEGER cb, [In] uint dwLockType); 31 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 32 | void Stat(out tagSTATSTG pstatstg, [In] uint grfStatFlag); 33 | [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] 34 | void Clone([MarshalAs(UnmanagedType.Interface)] out IStream ppstm); 35 | } 36 | } 37 | 38 | #pragma warning restore 0108 -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/_FILETIME.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | [StructLayout(LayoutKind.Sequential, Pack=4)] 8 | public struct _FILETIME 9 | { 10 | public uint dwLowDateTime; 11 | public uint dwHighDateTime; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/_LARGE_INTEGER.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | [StructLayout(LayoutKind.Sequential, Pack=8)] 8 | public struct _LARGE_INTEGER 9 | { 10 | public long QuadPart; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/_RemotableHandle.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | [StructLayout(LayoutKind.Sequential, Pack=4)] 8 | public struct _RemotableHandle 9 | { 10 | public int fContext; 11 | public __MIDL_IWinTypes_0009 u; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/_ULARGE_INTEGER.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | [StructLayout(LayoutKind.Sequential, Pack=8)] 8 | public struct _ULARGE_INTEGER 9 | { 10 | public ulong QuadPart; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/__MIDL_IWinTypes_0009.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | [StructLayout(LayoutKind.Explicit, Pack=4)] 8 | public struct __MIDL_IWinTypes_0009 9 | { 10 | [FieldOffset(0)] 11 | public int hInproc; 12 | [FieldOffset(0)] 13 | public int hRemote; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/tagDetectEncodingInfo.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | /// Thanks to jannewe for finding the fix! 8 | /// http://www.codeproject.com/KB/recipes/DetectEncoding.aspx?msg=3247475#xx3247475xx 9 | [StructLayout(LayoutKind.Sequential)] 10 | public struct DetectEncodingInfo 11 | { 12 | public uint nLangID; 13 | public uint nCodePage; 14 | public int nDocPercent; 15 | public int nConfidence; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/tagMIMECONTF.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Security; 5 | 6 | public enum tagMIMECONTF 7 | { 8 | MIMECONTF_BROWSER = 2, 9 | MIMECONTF_EXPORT = 0x400, 10 | MIMECONTF_IMPORT = 8, 11 | MIMECONTF_MAILNEWS = 1, 12 | MIMECONTF_MIME_IE4 = 0x10000000, 13 | MIMECONTF_MIME_LATEST = 0x20000000, 14 | MIMECONTF_MIME_REGISTRY = 0x40000000, 15 | MIMECONTF_MINIMAL = 4, 16 | MIMECONTF_PRIVCONVERTER = 0x10000, 17 | MIMECONTF_SAVABLE_BROWSER = 0x200, 18 | MIMECONTF_SAVABLE_MAILNEWS = 0x100, 19 | MIMECONTF_VALID = 0x20000, 20 | MIMECONTF_VALID_NLS = 0x40000 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/tagMIMECPINFO.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | [StructLayout(LayoutKind.Sequential, Pack=4)] 8 | public struct tagMIMECPINFO 9 | { 10 | public uint dwFlags; 11 | public uint uiCodePage; 12 | public uint uiFamilyCodePage; 13 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40)] 14 | public ushort[] wszDescription; 15 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=50)] 16 | public ushort[] wszWebCharset; 17 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=50)] 18 | public ushort[] wszHeaderCharset; 19 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=50)] 20 | public ushort[] wszBodyCharset; 21 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20)] 22 | public ushort[] wszFixedWidthFont; 23 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20)] 24 | public ushort[] wszProportionalFont; 25 | public byte bGDICharset; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/tagMIMECSETINFO.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | [StructLayout(LayoutKind.Sequential, Pack=4)] 8 | public struct tagMIMECSETINFO 9 | { 10 | public uint uiCodePage; 11 | public uint uiInternetEncoding; 12 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=50)] 13 | public ushort[] wszCharset; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/tagMLCPF.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MultiLanguage 6 | { 7 | [Flags] 8 | public enum MLCPF 9 | { 10 | // Not currently supported. 11 | MLDETECTF_MAILNEWS = 0x0001, 12 | 13 | // Not currently supported. 14 | MLDETECTF_BROWSER = 0x0002, 15 | 16 | // Detection result must be valid for conversion and text rendering. 17 | MLDETECTF_VALID = 0x0004, 18 | 19 | // Detection result must be valid for conversion. 20 | MLDETECTF_VALID_NLS = 0x0008, 21 | 22 | //Preserve preferred code page order. 23 | //This is meaningful only if you have set the puiPreferredCodePages parameter in IMultiLanguage3::DetectOutboundCodePage or IMultiLanguage3::DetectOutboundCodePageInIStream. 24 | MLDETECTF_PRESERVE_ORDER = 0x0010, 25 | 26 | // Only return one of the preferred code pages as the detection result. 27 | // This is meaningful only if you have set the puiPreferredCodePages parameter in IMultiLanguage3::DetectOutboundCodePage or IMultiLanguage3::DetectOutboundCodePageInIStream. 28 | MLDETECTF_PREFERRED_ONLY = 0x0020, 29 | 30 | // Filter out graphical symbols and punctuation. 31 | MLDETECTF_FILTER_SPECIALCHAR = 0x0040, 32 | 33 | // Return only Unicode codepages if the euro character is detected. 34 | MLDETECTF_EURO_UTF8 = 0x0080 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/tagMLDETECTCP.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MultiLanguage 6 | { 7 | public enum MLDETECTCP { 8 | // Default setting will be used. 9 | MLDETECTCP_NONE = 0, 10 | 11 | // Input stream consists of 7-bit data. 12 | MLDETECTCP_7BIT = 1, 13 | 14 | // Input stream consists of 8-bit data. 15 | MLDETECTCP_8BIT = 2, 16 | 17 | // Input stream consists of double-byte data. 18 | MLDETECTCP_DBCS = 4, 19 | 20 | // Input stream is an HTML page. 21 | MLDETECTCP_HTML = 8, 22 | 23 | //Not currently supported. 24 | MLDETECTCP_NUMBER = 16 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/tagMLSTR_FLAGS.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Security; 5 | 6 | public enum tagMLSTR_FLAGS 7 | { 8 | MLSTR_READ = 1, 9 | MLSTR_WRITE = 2 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/tagRFC1766INFO.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | [StructLayout(LayoutKind.Sequential, Pack=4)] 8 | public struct tagRFC1766INFO 9 | { 10 | public uint lcid; 11 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=6)] 12 | public ushort[] wszRfc1766; 13 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20)] 14 | public ushort[] wszLocaleName; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/tagSCRIPFONTINFO.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | [StructLayout(LayoutKind.Sequential, Pack=8)] 8 | public struct tagSCRIPFONTINFO 9 | { 10 | public long scripts; 11 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20)] 12 | public ushort[] wszFont; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/tagSCRIPTINFO.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | [StructLayout(LayoutKind.Sequential, Pack=4)] 8 | public struct tagSCRIPTINFO 9 | { 10 | public byte ScriptId; 11 | public uint uiCodePage; 12 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x30)] 13 | public ushort[] wszDescription; 14 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20)] 15 | public ushort[] wszFixedWidthFont; 16 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20)] 17 | public ushort[] wszProportionalFont; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/tagSTATSTG.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | [StructLayout(LayoutKind.Sequential, Pack=8)] 8 | public struct tagSTATSTG 9 | { 10 | [MarshalAs(UnmanagedType.LPWStr)] 11 | public string pwcsName; 12 | public uint type; 13 | public _ULARGE_INTEGER cbSize; 14 | public _FILETIME mtime; 15 | public _FILETIME ctime; 16 | public _FILETIME atime; 17 | public uint grfMode; 18 | public uint grfLocksSupported; 19 | public Guid clsid; 20 | public uint grfStateBits; 21 | public uint reserved; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/EncodingTools/Multilang/tagUNICODERANGE.cs: -------------------------------------------------------------------------------- 1 | namespace MultiLanguage 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | [StructLayout(LayoutKind.Sequential, Pack=2)] 8 | public struct tagUNICODERANGE 9 | { 10 | public ushort wcFrom; 11 | public ushort wcTo; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/EncodingTools/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("EncodingTools")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("EncodingTools")] 13 | [assembly: AssemblyCopyright("Copyright © 2007")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("dbbebcd2-0c4b-4486-8c50-50668fdc04f8")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /src/FindAndReplace.App/AboutBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Diagnostics; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Reflection; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace FindAndReplace.App 12 | { 13 | partial class AboutBox : Form 14 | { 15 | public AboutBox() 16 | { 17 | InitializeComponent(); 18 | this.Text = String.Format("About {0}", AssemblyTitle); 19 | this.lblProductName.Text = AssemblyProduct; 20 | this.lnkProduct.Text = "http://findandreplace.io/"; 21 | 22 | this.lblVersion.Text = String.Format("Version {0}", AssemblyVersion); 23 | this.lblCopyright.Text = AssemblyCopyright; 24 | this.lnkCompany.Text = AssemblyCompany; 25 | this.uiSupportedBy.Text = "ZZZ Projects"; 26 | } 27 | 28 | #region Assembly Attribute Accessors 29 | 30 | public string AssemblyTitle 31 | { 32 | get 33 | { 34 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); 35 | if (attributes.Length > 0) 36 | { 37 | AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0]; 38 | if (titleAttribute.Title != "") 39 | { 40 | return titleAttribute.Title; 41 | } 42 | } 43 | return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); 44 | } 45 | } 46 | 47 | public string AssemblyVersion 48 | { 49 | get 50 | { 51 | return Assembly.GetExecutingAssembly().GetName().Version.ToString(); 52 | } 53 | } 54 | 55 | public string AssemblyDescription 56 | { 57 | get 58 | { 59 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false); 60 | if (attributes.Length == 0) 61 | { 62 | return ""; 63 | } 64 | return ((AssemblyDescriptionAttribute)attributes[0]).Description; 65 | } 66 | } 67 | 68 | public string AssemblyProduct 69 | { 70 | get 71 | { 72 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); 73 | if (attributes.Length == 0) 74 | { 75 | return ""; 76 | } 77 | return ((AssemblyProductAttribute)attributes[0]).Product; 78 | } 79 | } 80 | 81 | public string AssemblyCopyright 82 | { 83 | get 84 | { 85 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); 86 | if (attributes.Length == 0) 87 | { 88 | return ""; 89 | } 90 | return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; 91 | } 92 | } 93 | 94 | public string AssemblyCompany 95 | { 96 | get 97 | { 98 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); 99 | if (attributes.Length == 0) 100 | { 101 | return ""; 102 | } 103 | return ((AssemblyCompanyAttribute)attributes[0]).Company; 104 | } 105 | } 106 | #endregion 107 | 108 | private void lnkProduct_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 109 | { 110 | Process.Start("http://findandreplace.io/"); 111 | } 112 | 113 | private void lnkCompany_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 114 | { 115 | Process.Start("http://www.entechsolutions.com"); 116 | } 117 | 118 | private void uiSupportedBy_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 119 | { 120 | Process.Start("http://www.zzzprojects.com/"); 121 | } 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /src/FindAndReplace.App/FindAndReplace.App.csproj.vspscc: -------------------------------------------------------------------------------- 1 | "" 2 | { 3 | "FILE_VERSION" = "9237" 4 | "ENLISTMENT_CHOICE" = "NEVER" 5 | "PROJECT_FILE_RELATIVE_PATH" = "" 6 | "NUMBER_OF_EXCLUDED_FILES" = "0" 7 | "ORIGINAL_PROJECT_FILE_PATH" = "" 8 | "NUMBER_OF_NESTED_PROJECTS" = "0" 9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" 10 | } 11 | -------------------------------------------------------------------------------- /src/FindAndReplace.App/FormData.cs: -------------------------------------------------------------------------------- 1 | using FindAndReplace.App.Properties; 2 | 3 | namespace FindAndReplace.App 4 | { 5 | public class FormData 6 | { 7 | public bool IsFindOnly { get; set; } 8 | public string Dir { get; set; } 9 | public bool IncludeSubDirectories { get; set; } 10 | public string FileMask { get; set; } 11 | public string ExcludeFileMask { get; set; } 12 | public string ExcludeDir { get; set; } 13 | public string FindText { get; set; } 14 | public bool IsCaseSensitive { get; set; } 15 | public bool IsRegEx { get; set; } 16 | public bool SkipBinaryFileDetection { get; set; } 17 | public bool ShowEncoding { get; set; } 18 | public bool IncludeFilesWithoutMatches { get; set; } 19 | public string ReplaceText { get; set; } 20 | public bool UseEscapeChars { get; set; } 21 | public string Encoding { get; set; } 22 | public bool IsKeepModifiedDate { get; set; } 23 | public bool IsFirstTime { get; set; } 24 | 25 | public void SaveSetting() 26 | { 27 | Settings.Default.Dir = Dir; 28 | Settings.Default.IncludeSubDirectories = IncludeSubDirectories; 29 | Settings.Default.FileMask = FileMask; 30 | Settings.Default.ExcludeFileMask = ExcludeFileMask; 31 | Settings.Default.ExcludeDir = ExcludeDir; 32 | Settings.Default.FindText = FindText; 33 | Settings.Default.IsCaseSensitive = IsCaseSensitive; 34 | Settings.Default.IsRegEx = IsRegEx; 35 | Settings.Default.SkipBinaryFileDetection = SkipBinaryFileDetection; 36 | Settings.Default.IncludeFilesWithoutMatches = IncludeFilesWithoutMatches; 37 | Settings.Default.ShowEncoding = ShowEncoding; 38 | Settings.Default.ReplaceText = ReplaceText; 39 | Settings.Default.UseEscapeChars = UseEscapeChars; 40 | Settings.Default.Encoding = Encoding; 41 | Settings.Default.IsKeepModifiedDate = IsKeepModifiedDate; 42 | Settings.Default.IsFirstTime = IsFirstTime; 43 | 44 | Settings.Default.Save(); 45 | } 46 | 47 | public void LoadSetting() 48 | { 49 | if (Settings.Default.UpgradeRequired) 50 | { 51 | Settings.Default.Upgrade(); 52 | Settings.Default.UpgradeRequired = false; 53 | Settings.Default.Save(); 54 | } 55 | 56 | Dir = Settings.Default.Dir; 57 | IncludeSubDirectories = Settings.Default.IncludeSubDirectories; 58 | FileMask = Settings.Default.FileMask; 59 | ExcludeFileMask = Settings.Default.ExcludeFileMask; 60 | ExcludeDir = Settings.Default.ExcludeDir; 61 | FindText = Settings.Default.FindText; 62 | IsCaseSensitive = Settings.Default.IsCaseSensitive; 63 | IsRegEx = Settings.Default.IsRegEx; 64 | SkipBinaryFileDetection = Settings.Default.SkipBinaryFileDetection; 65 | IncludeFilesWithoutMatches = Settings.Default.IncludeFilesWithoutMatches; 66 | ShowEncoding = Settings.Default.ShowEncoding; 67 | ReplaceText = Settings.Default.ReplaceText; 68 | UseEscapeChars = Settings.Default.UseEscapeChars; 69 | Encoding = Settings.Default.Encoding; 70 | IsKeepModifiedDate = Settings.Default.IsKeepModifiedDate; 71 | IsFirstTime = Settings.Default.IsFirstTime; 72 | } 73 | } 74 | } -------------------------------------------------------------------------------- /src/FindAndReplace.App/ProcessExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace FindAndReplace.App 9 | { 10 | public static class ProcessExtensions 11 | { 12 | //https://stackoverflow.com/questions/394816/how-to-get-parent-process-in-net-in-managed-way 13 | private static string FindIndexedProcessName(int pid) 14 | { 15 | var processName = Process.GetProcessById(pid).ProcessName; 16 | var processesByName = Process.GetProcessesByName(processName); 17 | string processIndexdName = null; 18 | 19 | for (var index = 0; index < processesByName.Length; index++) 20 | { 21 | processIndexdName = index == 0 ? processName : processName + "#" + index; 22 | var processId = new PerformanceCounter("Process", "ID Process", processIndexdName); 23 | if ((int)processId.NextValue() == pid) 24 | { 25 | return processIndexdName; 26 | } 27 | } 28 | 29 | return processIndexdName; 30 | } 31 | 32 | private static Process FindPidFromIndexedProcessName(string indexedProcessName) 33 | { 34 | var parentId = new PerformanceCounter("Process", "Creating Process ID", indexedProcessName); 35 | return Process.GetProcessById((int)parentId.NextValue()); 36 | } 37 | 38 | public static Process Parent(this Process process) 39 | { 40 | return FindPidFromIndexedProcessName(FindIndexedProcessName(process.Id)); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/FindAndReplace.App/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("fnr.exe")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("ZZZ Projects")] 11 | [assembly: AssemblyProduct("fnr.exe")] 12 | [assembly: AssemblyCopyright("Copyright © 2018")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("baa6adf3-619b-4a41-a3f2-efef1c1a9c47")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.8.1")] 35 | [assembly: AssemblyFileVersion("1.8.1")] 36 | -------------------------------------------------------------------------------- /src/FindAndReplace.App/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | False 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | False 25 | 26 | 27 | False 28 | 29 | 30 | False 31 | 32 | 33 | False 34 | 35 | 36 | False 37 | 38 | 39 | 40 | 41 | 42 | False 43 | 44 | 45 | 46 | 47 | 48 | False 49 | 50 | 51 | True 52 | 53 | 54 | True 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/FindAndReplace.App/Resources/donate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/src/FindAndReplace.App/Resources/donate.png -------------------------------------------------------------------------------- /src/FindAndReplace.App/Resources/donate2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/src/FindAndReplace.App/Resources/donate2.png -------------------------------------------------------------------------------- /src/FindAndReplace.App/Resources/swap_icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/src/FindAndReplace.App/Resources/swap_icon.gif -------------------------------------------------------------------------------- /src/FindAndReplace.App/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | False 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | False 30 | 31 | 32 | False 33 | 34 | 35 | False 36 | 37 | 38 | False 39 | 40 | 41 | False 42 | 43 | 44 | 45 | 46 | 47 | False 48 | 49 | 50 | 51 | 52 | 53 | False 54 | 55 | 56 | True 57 | 58 | 59 | True 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/FindAndReplace.App/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/FindAndReplace.Tests.CommandLine/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/FindAndReplace.Tests.CommandLine/CommandLineOptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using CommandLine; 3 | using CommandLine.Text; 4 | 5 | 6 | namespace FindAndReplace.Tests.CommandLine 7 | { 8 | public class CommandLineOptions 9 | { 10 | #region Standard Option Attribute 11 | 12 | [ParserState] 13 | public IParserState LastParserState { get; set; } 14 | 15 | [Option("testVal", Required = true, HelpText = "Test value to parse.")] 16 | public string TestValue { get; set; } 17 | 18 | [Option("hasRegEx", HelpText = "Is Regex.")] 19 | public bool HasRegEx { get; set; } 20 | 21 | [Option("useEscapeChars", HelpText = "Use Escape Chars.")] 22 | public bool UseEscapeChars { get; set; } 23 | 24 | [Option("skipDecoding", HelpText = "Skip calling DecodeText.")] 25 | public bool SkipDecoding { get; set; } 26 | 27 | [Option("someFlag", HelpText = "Not used. For testing.")] 28 | public bool SomeFlag { get; set; } 29 | 30 | #endregion 31 | 32 | 33 | [HelpOption("help", HelpText = "Display this help screen.")] 34 | public string GetUsage() 35 | { 36 | var help = new HelpText("FindAndReplace.Tests.CommandLine"); 37 | 38 | help.Copyright = new CopyrightInfo("ENTech Solutions", DateTime.Now.Year); 39 | 40 | if (this.LastParserState != null && this.LastParserState.Errors.Count > 0) 41 | { 42 | HandleParsingErrorsInHelp(help); 43 | } 44 | 45 | 46 | return help; 47 | } 48 | 49 | 50 | private void HandleParsingErrorsInHelp(HelpText help) 51 | { 52 | var errors = help.RenderParsingErrorsText(this, 2); // indent with two spaces 53 | if (!string.IsNullOrEmpty(errors)) 54 | { 55 | help.MaximumDisplayWidth = 160; 56 | help.AddPreOptionsLine(string.Concat("\n", "ERROR(S):")); 57 | help.AddPreOptionsLine(errors); 58 | } 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/FindAndReplace.Tests.CommandLine/FindAndReplace.Tests.CommandLine.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {72B4C6BB-E2C8-4162-AE69-23B588048689} 8 | Exe 9 | Properties 10 | FindAndReplace.Tests.CommandLine 11 | FindAndReplace.Tests.CommandLine 12 | v4.5 13 | 512 14 | SAK 15 | SAK 16 | SAK 17 | SAK 18 | 19 | 20 | AnyCPU 21 | true 22 | full 23 | false 24 | bin\Debug\ 25 | DEBUG;TRACE 26 | prompt 27 | 4 28 | 29 | 30 | AnyCPU 31 | pdbonly 32 | true 33 | bin\Release\ 34 | TRACE 35 | prompt 36 | 4 37 | 38 | 39 | 40 | ..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | {4e35e2c7-099b-4356-9215-0dc77d156cfa} 62 | FindAndReplace 63 | 64 | 65 | 66 | 73 | -------------------------------------------------------------------------------- /src/FindAndReplace.Tests.CommandLine/FindAndReplace.Tests.CommandLine.csproj.vspscc: -------------------------------------------------------------------------------- 1 | "" 2 | { 3 | "FILE_VERSION" = "9237" 4 | "ENLISTMENT_CHOICE" = "NEVER" 5 | "PROJECT_FILE_RELATIVE_PATH" = "" 6 | "NUMBER_OF_EXCLUDED_FILES" = "0" 7 | "ORIGINAL_PROJECT_FILE_PATH" = "" 8 | "NUMBER_OF_NESTED_PROJECTS" = "0" 9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" 10 | } 11 | -------------------------------------------------------------------------------- /src/FindAndReplace.Tests.CommandLine/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Text.RegularExpressions; 7 | using System.Threading.Tasks; 8 | using CommandLine; 9 | using FindAndReplace; 10 | 11 | namespace FindAndReplace.Tests.CommandLine 12 | { 13 | class Program 14 | { 15 | static void Main(string[] args) 16 | { 17 | var options = new CommandLineOptions(); 18 | 19 | string result; 20 | if (Parser.Default.ParseArguments(args, options)) 21 | { 22 | if (options.SkipDecoding) 23 | result = options.TestValue; 24 | else 25 | result = CommandLineUtils.DecodeText(options.TestValue, false, options.HasRegEx, options.UseEscapeChars); 26 | } 27 | else 28 | { 29 | result = "Errors in ParseArguments: " + Environment.NewLine; 30 | if (options.LastParserState.Errors.Count > 0) 31 | { 32 | foreach (var error in options.LastParserState.Errors) 33 | result += error.BadOption.ShortName + ": " + error.ToString() + Environment.NewLine; 34 | } 35 | } 36 | 37 | using (var outfile = new StreamWriter("output.log")) 38 | { 39 | outfile.Write(result); 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/FindAndReplace.Tests.CommandLine/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("FindAndReplace.Tests.CommandLine")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FindAndReplace.Tests.CommandLine")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("bd70fb98-64e5-469e-856d-56ff2054e446")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/FindAndReplace.Tests.CommandLine/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/FindAndReplace.Tests/CommandLineUtilsTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Linq; 4 | using System.Threading; 5 | using NUnit.Framework; 6 | 7 | namespace FindAndReplace.Tests 8 | { 9 | [TestFixture] 10 | public class CommandLineUtilsTest 11 | { 12 | private string _applicationExePath = @"FindAndReplace.Tests.CommandLine.exe"; 13 | 14 | //From https://findandreplace.codeplex.com/workitem/17 15 | [Test] 16 | public void Encode_Decode_FromWorkItem17_ReturnsSameValue() 17 | { 18 | TestEncodeDecode("\\r(?!\\n)", true); 19 | } 20 | 21 | public void TestEncodeDecode(string text, bool hasRegEx = false, bool useEscapeChars = false) 22 | { 23 | var cmdText = GenCommandLine(text, hasRegEx, useEscapeChars); 24 | 25 | System.Diagnostics.Process.Start(_applicationExePath, cmdText); 26 | Thread.Sleep(1000); 27 | 28 | var decodedValue = GetValueFromOutput(); 29 | 30 | Assert.AreEqual(text, decodedValue); 31 | } 32 | 33 | [Test] 34 | public void Encode_Decode_FromDiscussions541024_ReturnsSameValue() 35 | { 36 | TestEncodeDecode("v[24].0", true); 37 | } 38 | 39 | 40 | [Test] 41 | public void Encode_Decode_FromWorkItem35_ReturnsSameValue() 42 | { 43 | TestEncodeDecode("\\n line1\r\n line2"); 44 | } 45 | 46 | 47 | [Test] 48 | public void Encode_Decode_When_backslash_followed_by_quote_Then_returns_same() 49 | { 50 | TestEncodeDecode("\\\""); 51 | 52 | } 53 | 54 | 55 | [Test] 56 | public void Encode_Decode_When_two_backslashes_followed_by_quote_Then_returns_same() 57 | { 58 | TestEncodeDecode(@"\\"""); 59 | } 60 | 61 | [Test] 62 | public void Encode_Decode_When_backslash_followed_by_quote_several_times_Then_returns_same() 63 | { 64 | TestEncodeDecode(@"\"" hello \\"" ""\"); 65 | } 66 | 67 | 68 | [Test] 69 | public void Encode_Decode_When_one_backslash_Then_returns_same() 70 | { 71 | TestEncodeDecode(@"\"); 72 | } 73 | 74 | [Test] 75 | public void Encode_Decode_When_two_backslashes_Then_return_same() 76 | { 77 | TestEncodeDecode(@"\\"); 78 | } 79 | 80 | [Test] 81 | public void Encode_Decode_When_two_backslashes_and_useEscapeChars_Then_returns_same() 82 | { 83 | TestEncodeDecode(@"\\", false, true); 84 | } 85 | 86 | 87 | private string GetValueFromOutput() 88 | { 89 | string result = String.Empty; 90 | 91 | var filename = "output.log"; 92 | 93 | if (File.Exists(filename)) 94 | { 95 | using (var outfile = new StreamReader(filename)) 96 | { 97 | result = outfile.ReadToEnd(); 98 | } 99 | } 100 | 101 | return result; 102 | } 103 | 104 | private string GenCommandLine(string value, bool hasRegEx = false, bool useEscapeChars = false) 105 | { 106 | value = CommandLineUtils.EncodeText(value, hasRegEx, useEscapeChars); 107 | 108 | return String.Format(" {0}{1}--testVal \"{2}\" --someFlag", 109 | hasRegEx ? "--hasRegEx " : "", 110 | useEscapeChars ? "--useEscapeChars " : "", 111 | value 112 | ); 113 | } 114 | 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/FindAndReplace.Tests/FindAndReplace.Tests.csproj.vspscc: -------------------------------------------------------------------------------- 1 | "" 2 | { 3 | "FILE_VERSION" = "9237" 4 | "ENLISTMENT_CHOICE" = "NEVER" 5 | "PROJECT_FILE_RELATIVE_PATH" = "" 6 | "NUMBER_OF_EXCLUDED_FILES" = "0" 7 | "ORIGINAL_PROJECT_FILE_PATH" = "" 8 | "NUMBER_OF_NESTED_PROJECTS" = "0" 9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" 10 | } 11 | -------------------------------------------------------------------------------- /src/FindAndReplace.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("FindAndReplace.Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FindAndReplace.Tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("0fb2b551-c055-4edf-8493-4687d27c0cb2")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/FindAndReplace.Tests/RegexLearningTest.cs: -------------------------------------------------------------------------------- 1 | using System.Text.RegularExpressions; 2 | using NUnit.Framework; 3 | 4 | namespace FindAndReplace.Tests 5 | { 6 | [TestFixture] 7 | public class RegexLearningTest 8 | { 9 | 10 | //This is for reasearch for https://findandreplace.codeplex.com/discussions/470706 11 | //Testing fix: http://stackoverflow.com/questions/1191014/how-to-regex-replace-named-groups 12 | [Test] 13 | public void Replace_WhenReplacingStaticPartOfPattern_ReplacesText() 14 | { 15 | string text = "A x@x.com letter --- alphabetical ---- missing ---- lack release penchant slack acryllic laundry A x@x.com hh --- cease"; 16 | string findPattern = @"(A x@x.com .*? )---"; 17 | string replaceText = "$1-B-"; 18 | 19 | var result = Regex.Replace(text, findPattern, replaceText); 20 | 21 | Assert.AreEqual("A x@x.com letter -B- alphabetical ---- missing ---- lack release penchant slack acryllic laundry A x@x.com hh -B- cease", result); 22 | } 23 | 24 | 25 | 26 | [Test] 27 | public void Replace_WhenReplacingDynamicPartOfPattern_ReplacesText() 28 | { 29 | string text = "A x@x.com letter --- alphabetical ---- missing ---- lack release penchant slack acryllic laundry A x@x.com hh --- cease"; 30 | string findPattern = @"(A x@x.com )(.*?)( ---)"; 31 | string replaceText = "$1-B-$3"; 32 | 33 | var result = Regex.Replace(text, findPattern, replaceText); 34 | 35 | Assert.AreEqual("A x@x.com -B- --- alphabetical ---- missing ---- lack release penchant slack acryllic laundry A x@x.com -B- --- cease", result); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/FindAndReplace.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/FindAndReplace/EncodingDetector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Text; 4 | 5 | using href.Utils; 6 | 7 | namespace FindAndReplace 8 | { 9 | 10 | public class EncodingDetector 11 | { 12 | 13 | [Flags] 14 | public enum Options 15 | { 16 | KlerkSoftBom = 1, 17 | KlerkSoftHeuristics = 2, 18 | MLang = 4 19 | } 20 | 21 | public static Encoding Detect(byte[] bytes, EncodingDetector.Options opts = Options.KlerkSoftBom | Options.MLang, Encoding defaultEncoding = null) 22 | { 23 | Encoding encoding = null; 24 | 25 | if ((opts & Options.KlerkSoftBom) == Options.KlerkSoftBom) 26 | { 27 | StopWatch.Start("DetectEncoding: UsingKlerksSoftBom"); 28 | 29 | encoding = DetectEncodingUsingKlerksSoftBom(bytes); 30 | 31 | StopWatch.Stop("DetectEncoding: UsingKlerksSoftBom"); 32 | } 33 | 34 | if (encoding != null) 35 | return encoding; 36 | 37 | if ((opts & Options.KlerkSoftHeuristics) == Options.KlerkSoftHeuristics) 38 | { 39 | StopWatch.Start("DetectEncoding: UsingKlerksSoftHeuristics"); 40 | encoding = DetectEncodingUsingKlerksSoftHeuristics(bytes); 41 | StopWatch.Stop("DetectEncoding: UsingKlerksSoftHeuristics"); 42 | } 43 | 44 | if (encoding != null) 45 | return encoding; 46 | 47 | if ((opts & Options.MLang) == Options.MLang) 48 | { 49 | StopWatch.Start("DetectEncoding: UsingMLang"); 50 | encoding = DetectEncodingUsingMLang(bytes); 51 | StopWatch.Stop("DetectEncoding: UsingMLang"); 52 | } 53 | 54 | if (encoding == null) 55 | encoding = defaultEncoding; 56 | 57 | return encoding; 58 | } 59 | 60 | private static Encoding DetectEncodingUsingKlerksSoftBom(byte[] bytes) 61 | { 62 | Encoding encoding = null; 63 | if (bytes.Count() >= 4) 64 | encoding = KlerksSoftEncodingDetector.DetectBOMBytes(bytes); 65 | 66 | return encoding; 67 | } 68 | 69 | 70 | private static Encoding DetectEncodingUsingKlerksSoftHeuristics(byte[] bytes) 71 | { 72 | Encoding encoding = KlerksSoftEncodingDetector.DetectUnicodeInByteSampleByHeuristics(bytes); 73 | 74 | return encoding; 75 | } 76 | 77 | private static Encoding DetectEncodingUsingMLang(Byte[] bytes) 78 | { 79 | try 80 | { 81 | Encoding[] detected = EncodingTools.DetectInputCodepages(bytes, 1); 82 | if (detected.Length > 0) 83 | { 84 | return detected[0]; 85 | } 86 | } 87 | catch //(COMException ex) 88 | { 89 | // return default codepage on error 90 | } 91 | 92 | return null; 93 | } 94 | 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/FindAndReplace/FindAndReplace.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {4E35E2C7-099B-4356-9215-0DC77D156CFA} 9 | Library 10 | Properties 11 | FindAndReplace 12 | FindAndReplace 13 | v4.0 14 | 512 15 | 16 | SAK 17 | SAK 18 | SAK 19 | SAK 20 | 21 | 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE 27 | prompt 28 | 4 29 | false 30 | 31 | 32 | pdbonly 33 | true 34 | bin\Release\ 35 | TRACE 36 | prompt 37 | 4 38 | false 39 | 40 | 41 | 42 | ..\packages\CommandLineParser.1.9.71\lib\net40\CommandLine.dll 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | {ca19d4de-b232-491a-92bf-7bf3a2758694} 69 | EncodingTools 70 | 71 | 72 | 73 | 74 | Designer 75 | 76 | 77 | 78 | 85 | -------------------------------------------------------------------------------- /src/FindAndReplace/FindAndReplace.csproj.vspscc: -------------------------------------------------------------------------------- 1 | "" 2 | { 3 | "FILE_VERSION" = "9237" 4 | "ENLISTMENT_CHOICE" = "NEVER" 5 | "PROJECT_FILE_RELATIVE_PATH" = "" 6 | "NUMBER_OF_EXCLUDED_FILES" = "0" 7 | "ORIGINAL_PROJECT_FILE_PATH" = "" 8 | "NUMBER_OF_NESTED_PROJECTS" = "0" 9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" 10 | } 11 | -------------------------------------------------------------------------------- /src/FindAndReplace/LiteMatch.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace FindAndReplace 3 | { 4 | public class LiteMatch 5 | { 6 | public int Index { get; set; } 7 | public int Length { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/FindAndReplace/MatchPreviewLineNumber.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace FindAndReplace 7 | { 8 | public class MatchPreviewLineNumber 9 | { 10 | public int LineNumber { get; set; } 11 | 12 | public bool HasMatch { get; set; } 13 | } 14 | 15 | public class LineNumberComparer : IEqualityComparer 16 | { 17 | public bool Equals(MatchPreviewLineNumber x, MatchPreviewLineNumber y) 18 | { 19 | return x.LineNumber == y.LineNumber; 20 | } 21 | 22 | public int GetHashCode(MatchPreviewLineNumber obj) 23 | { 24 | return obj.LineNumber.GetHashCode(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/FindAndReplace/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // Управление общими сведениями о сборке осуществляется с помощью 6 | // набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, 7 | // связанные со сборкой. 8 | [assembly: AssemblyTitle("FindAndReplace")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("FindAndReplace")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Параметр ComVisible со значением FALSE делает типы в сборке невидимыми 18 | // для COM-компонентов. Если требуется обратиться к типу в этой сборке через 19 | // COM, задайте атрибуту ComVisible значение TRUE для этого типа. 20 | [assembly: ComVisible(false)] 21 | 22 | // Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM 23 | [assembly: Guid("9fa9720c-8b56-428d-9cc0-3530477c08d2")] 24 | 25 | // Сведения о версии сборки состоят из следующих четырех значений: 26 | // 27 | // Основной номер версии 28 | // Дополнительный номер версии 29 | // Номер построения 30 | // Редакция 31 | // 32 | // Можно задать все значения или принять номер построения и номер редакции по умолчанию, 33 | // используя "*", как показано ниже: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/FindAndReplace/ResultItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Text.RegularExpressions; 6 | 7 | namespace FindAndReplace 8 | { 9 | abstract public class ResultItem 10 | { 11 | public string FileName { get; set; } 12 | public string FilePath { get; set; } 13 | public string FileRelativePath { get; set; } 14 | public Encoding FileEncoding { get; set; } 15 | public int NumMatches { get; set; } 16 | public List Matches { get; set; } 17 | public bool IsSuccess { get; set; } 18 | public bool IsBinaryFile { get; set; } 19 | public bool FailedToOpen { get; set; } 20 | public string ErrorMessage { get; set; } 21 | 22 | internal bool IncludeFilesWithoutMatches { get; set; } 23 | 24 | public bool IncludeInResultsList 25 | { 26 | get 27 | { 28 | if (IsSuccess && NumMatches == 0 && IncludeFilesWithoutMatches) 29 | return true; 30 | 31 | if (IsSuccess && NumMatches > 0) 32 | return true; 33 | 34 | if (!IsSuccess && !String.IsNullOrEmpty(ErrorMessage)) 35 | return true; 36 | 37 | return false; 38 | } 39 | } 40 | 41 | public bool IsReplaced 42 | { 43 | get { return this.IsSuccess && this.NumMatches > 0; } //Account for case when no matches found 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/FindAndReplace/Stats.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace FindAndReplace 7 | { 8 | public enum Status 9 | { 10 | Processing, 11 | Completed, 12 | Cancelled 13 | } 14 | 15 | public class Stats 16 | { 17 | public class StatsFiles 18 | { 19 | public int Total { get; set; } 20 | 21 | public int Processed { get; set; } 22 | 23 | public int Binary { get; set; } 24 | 25 | public int WithMatches { get; set; } 26 | 27 | public int WithoutMatches { get; set; } 28 | 29 | public int FailedToRead { get; set; } 30 | 31 | public int FailedToWrite { get; set; } 32 | } 33 | 34 | public class StatsMatches 35 | { 36 | public int Found { get; set; } 37 | 38 | public int Replaced { get; set; } 39 | } 40 | 41 | public class StatsTime 42 | { 43 | public TimeSpan Passed { get; set; } 44 | 45 | public TimeSpan Remaining { get; set; } 46 | } 47 | 48 | public StatsFiles Files { get; set; } 49 | 50 | public StatsMatches Matches { get; set; } 51 | 52 | public StatsTime Time { get; set; } 53 | 54 | public Stats() 55 | { 56 | Files = new StatsFiles(); 57 | 58 | Matches = new StatsMatches(); 59 | 60 | Time = new StatsTime(); 61 | } 62 | 63 | public void UpdateTime(DateTime startTime, DateTime startTimeProcessingFiles) 64 | { 65 | DateTime now = DateTime.Now; 66 | Time.Passed = now.Subtract(startTime); 67 | 68 | //Use startTimeProcessingFiles to figure out remaining time 69 | TimeSpan passedProcessingFiles = now.Subtract(startTimeProcessingFiles); 70 | 71 | double passedSeconds = passedProcessingFiles.TotalSeconds; 72 | 73 | int remainingFiles = Files.Total - Files.Processed; 74 | var remainingSeconds = (passedSeconds / Files.Processed) * remainingFiles; 75 | 76 | Time.Remaining = TimeSpan.FromSeconds(remainingSeconds); 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/FindAndReplace/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/MakeOneExe.bat: -------------------------------------------------------------------------------- 1 | REM Requires ILMerge from http://www.microsoft.com/download/en/confirmation.aspx?id=17630 2 | REM makes fnr2.exe that includes fnr.exe and both assemblies. Can be renamed to fnr.exe 3 | 4 | set RELEASE_DIR=C:\Users\Jonathan\Desktop\Z\GitHub\findandreplace\src\FindAndReplace.App\bin\Release 5 | 6 | cd %RELEASE_DIR% 7 | "C:\Program Files (x86)\Microsoft\ILMerge\ilmerge.exe" /log:log.txt /targetplatform:4 /out:fnr2.exe fnr.exe FindAndReplace.dll CommandLine.dll EncodingTools.dll -------------------------------------------------------------------------------- /src/log.txt: -------------------------------------------------------------------------------- 1 | ILMerge version 2.12.803.0 2 | Copyright (C) Microsoft Corporation 2004-2006. All rights reserved. 3 | ILMerge /log:log.txt /targetplatform:4 /out:fnr2.exe fnr.exe FindAndReplace.dll CommandLine.dll EncodingTools.dll 4 | Set platform to '4', using directory 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727\..\v4.0.30319' for mscorlib.dll 5 | Running on Microsoft (R) .NET Framework v2.0.50727 6 | mscorlib.dll version = 2.0.0.0 7 | The list of input assemblies is: 8 | fnr.exe 9 | FindAndReplace.dll 10 | CommandLine.dll 11 | EncodingTools.dll 12 | Could not find the file 'fnr.exe'. 13 | An exception occurred during merging: 14 | ILMerge.Merge: Could not find the file 'fnr.exe'. 15 | at ILMerging.ILMerge.Merge() 16 | at ILMerging.ILMerge.Main(String[] args) 17 | -------------------------------------------------------------------------------- /src/nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | ../lib 4 | 5 | -------------------------------------------------------------------------------- /src/sign/Certificate.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/src/sign/Certificate.p12 -------------------------------------------------------------------------------- /src/sign/Certificate.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzprojects/findandreplace/d61c079616313705af0f9a5a0e1e89bb528a11a4/src/sign/Certificate.pfx -------------------------------------------------------------------------------- /src/sign/sign.bat: -------------------------------------------------------------------------------- 1 | set PATH_TO_SIGN_EXE="C:\Program Files (x86)\Windows Kits\8.0\bin\x64\signtool.exe" 2 | 3 | set SOLUTION_DIR=F:\ENTechSolutions\FindAndREplace\ 4 | 5 | set PATH_TO_ASSEMBLY=src\FindAndReplace.App\bin\Release\ 6 | 7 | set PASSWORD="entech1234" 8 | 9 | %PATH_TO_SIGN_EXE% sign /f "%SOLUTION_DIR%sign\Certificate.pfx" /p %PASSWORD% "%SOLUTION_DIR%%PATH_TO_ASSEMBLY%FindAndReplace.dll" 10 | 11 | %PATH_TO_SIGN_EXE% sign /f "%SOLUTION_DIR%sign\Certificate.pfx" /p %PASSWORD% "%SOLUTION_DIR%%PATH_TO_ASSEMBLY%fnr.exe" 12 | 13 | pause --------------------------------------------------------------------------------