Browse Source

commit: first push

HOME 3 years ago
parent
commit
6d2939116f

+ 6 - 0
NuGet.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<configuration> 
+  <config> 
+    <add key="repositorypath" value="C:\NuGetLocalRepo" /> 
+  </config> 
+</configuration>

+ 25 - 0
OCR.sln

@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29920.165
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TesseractScreenReader", "TesseractScreenReader\TesseractScreenReader.csproj", "{70B65817-3B66-4822-9D87-62C9E703F377}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{70B65817-3B66-4822-9D87-62C9E703F377}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{70B65817-3B66-4822-9D87-62C9E703F377}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{70B65817-3B66-4822-9D87-62C9E703F377}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{70B65817-3B66-4822-9D87-62C9E703F377}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {71104D47-3AB1-48D7-8FF1-7B263D918070}
+	EndGlobalSection
+EndGlobal

+ 36 - 0
TesseractScreenReader/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("Tesseract-OCR Screen Reader")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Tesseract-OCR Screen Reader")]
+[assembly: AssemblyCopyright("Copyright ©  2020")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("70b65817-3b66-4822-9d87-62c9e703f377")]
+
+// 程序集的版本信息由下列四个值组成: 
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+//通过使用 "*",如下所示:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 77 - 0
TesseractScreenReader/TesseractScreenReader.csproj

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{70B65817-3B66-4822-9D87-62C9E703F377}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>TesseractScreenReader</RootNamespace>
+    <AssemblyName>TSR</AssemblyName>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+    <Reference Include="Tesseract, Version=4.1.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\Tesseract.4.1.0-beta1\lib\net45\Tesseract.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="TsrMainForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="TsrMainForm.Designer.cs">
+      <DependentUpon>TsrMainForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="TsrProgram.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="TsrMainForm.resx">
+      <DependentUpon>TsrMainForm.cs</DependentUpon>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('C:\NuGetLocalRepo\Tesseract.4.1.0-beta1\build\Tesseract.targets')" Text="$([System.String]::Format('$(ErrorText)', 'C:\NuGetLocalRepo\Tesseract.4.1.0-beta1\build\Tesseract.targets'))" />
+  </Target>
+  <Import Project="C:\NuGetLocalRepo\Tesseract.4.1.0-beta1\build\Tesseract.targets" Condition="Exists('C:\NuGetLocalRepo\Tesseract.4.1.0-beta1\build\Tesseract.targets')" />
+</Project>

+ 139 - 0
TesseractScreenReader/TsrMainForm.Designer.cs

@@ -0,0 +1,139 @@
+namespace TesseractScreenReader
+{
+    partial class TsrMainForm
+    {
+        /// <summary>
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows 窗体设计器生成的代码
+
+        /// <summary>
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.ReadClipBoardPicture = new System.Windows.Forms.Button();
+            this.WatchingClipBoard = new System.Windows.Forms.CheckBox();
+            this.OutputRichTextBox = new System.Windows.Forms.RichTextBox();
+            this.SpaceCheckBox = new System.Windows.Forms.CheckBox();
+            this.ClearButton = new System.Windows.Forms.Button();
+            this.TopMostCheckBox = new System.Windows.Forms.CheckBox();
+            this.SuspendLayout();
+            // 
+            // ReadClipBoardPicture
+            // 
+            this.ReadClipBoardPicture.Location = new System.Drawing.Point(102, 9);
+            this.ReadClipBoardPicture.Name = "ReadClipBoardPicture";
+            this.ReadClipBoardPicture.Size = new System.Drawing.Size(130, 23);
+            this.ReadClipBoardPicture.TabIndex = 0;
+            this.ReadClipBoardPicture.Text = "读取剪贴板图片";
+            this.ReadClipBoardPicture.UseVisualStyleBackColor = true;
+            this.ReadClipBoardPicture.Click += new System.EventHandler(this.ReadClipBoardPicture_Click);
+            // 
+            // WatchingClipBoard
+            // 
+            this.WatchingClipBoard.AutoSize = true;
+            this.WatchingClipBoard.Location = new System.Drawing.Point(12, 12);
+            this.WatchingClipBoard.Name = "WatchingClipBoard";
+            this.WatchingClipBoard.Size = new System.Drawing.Size(84, 16);
+            this.WatchingClipBoard.TabIndex = 1;
+            this.WatchingClipBoard.Text = "监视剪贴板";
+            this.WatchingClipBoard.UseVisualStyleBackColor = true;
+            this.WatchingClipBoard.CheckedChanged += new System.EventHandler(this.WatchingClipBoard_CheckedChanged);
+            // 
+            // OutputRichTextBox
+            // 
+            this.OutputRichTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.OutputRichTextBox.EnableAutoDragDrop = true;
+            this.OutputRichTextBox.Location = new System.Drawing.Point(12, 41);
+            this.OutputRichTextBox.Name = "OutputRichTextBox";
+            this.OutputRichTextBox.ReadOnly = true;
+            this.OutputRichTextBox.Size = new System.Drawing.Size(750, 415);
+            this.OutputRichTextBox.TabIndex = 2;
+            this.OutputRichTextBox.Text = "";
+            // 
+            // SpaceCheckBox
+            // 
+            this.SpaceCheckBox.AutoSize = true;
+            this.SpaceCheckBox.Checked = true;
+            this.SpaceCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.SpaceCheckBox.Location = new System.Drawing.Point(238, 12);
+            this.SpaceCheckBox.Name = "SpaceCheckBox";
+            this.SpaceCheckBox.Size = new System.Drawing.Size(60, 16);
+            this.SpaceCheckBox.TabIndex = 1;
+            this.SpaceCheckBox.Text = "去空格";
+            this.SpaceCheckBox.UseVisualStyleBackColor = true;
+            // 
+            // ClearButton
+            // 
+            this.ClearButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.ClearButton.Location = new System.Drawing.Point(673, 8);
+            this.ClearButton.Name = "ClearButton";
+            this.ClearButton.Size = new System.Drawing.Size(89, 23);
+            this.ClearButton.TabIndex = 0;
+            this.ClearButton.Text = "清空";
+            this.ClearButton.UseVisualStyleBackColor = true;
+            this.ClearButton.Click += new System.EventHandler(this.ClearButton_Click);
+            // 
+            // TopMostCheckBox
+            // 
+            this.TopMostCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.TopMostCheckBox.AutoSize = true;
+            this.TopMostCheckBox.Checked = true;
+            this.TopMostCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.TopMostCheckBox.Location = new System.Drawing.Point(595, 13);
+            this.TopMostCheckBox.Name = "TopMostCheckBox";
+            this.TopMostCheckBox.Size = new System.Drawing.Size(72, 16);
+            this.TopMostCheckBox.TabIndex = 1;
+            this.TopMostCheckBox.Text = "窗口置顶";
+            this.TopMostCheckBox.UseVisualStyleBackColor = true;
+            this.TopMostCheckBox.CheckedChanged += new System.EventHandler(this.TopMostCheckBox_CheckedChanged);
+            // 
+            // TsrMainForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(774, 468);
+            this.Controls.Add(this.OutputRichTextBox);
+            this.Controls.Add(this.TopMostCheckBox);
+            this.Controls.Add(this.SpaceCheckBox);
+            this.Controls.Add(this.WatchingClipBoard);
+            this.Controls.Add(this.ClearButton);
+            this.Controls.Add(this.ReadClipBoardPicture);
+            this.Name = "TsrMainForm";
+            this.Text = "TSR截图识字(简体中文)";
+            this.TopMost = true;
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button ReadClipBoardPicture;
+        private System.Windows.Forms.CheckBox WatchingClipBoard;
+        private System.Windows.Forms.RichTextBox OutputRichTextBox;
+        private System.Windows.Forms.CheckBox SpaceCheckBox;
+        private System.Windows.Forms.Button ClearButton;
+        private System.Windows.Forms.CheckBox TopMostCheckBox;
+    }
+}
+

+ 92 - 0
TesseractScreenReader/TsrMainForm.cs

@@ -0,0 +1,92 @@
+using System;
+using System.Drawing;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Windows.Forms;
+using Tesseract;
+
+namespace TesseractScreenReader
+{
+    public partial class TsrMainForm : Form
+    {
+        private readonly string _origWindowTitle;
+
+        private string AppendTitle
+        {
+            set => Text = $"{_origWindowTitle} - {value}";
+        }
+
+        public TsrMainForm()
+        {
+            InitializeComponent();
+            _origWindowTitle = Text;
+            AppendTitle = "就绪";
+        }
+
+        private void ReadClipBoardPicture_Click(object sender, EventArgs e) => OcrImage(Clipboard.GetImage());
+
+        private void TopMostCheckBox_CheckedChanged(object sender, EventArgs e) => TopMost = TopMostCheckBox.Checked;
+
+        private void ClearButton_Click(object sender, EventArgs e) => OutputRichTextBox.Clear();
+
+        private void OcrImage(Image img)
+        {
+
+            AppendTitle = "正在处理…";
+            try
+            {
+                if (null == img) throw new InvalidOperationException("无图片");
+                if (false == File.Exists("chi_sim.traineddata")) throw new FileNotFoundException("缺少数据文件,请前 https://github.com/tesseract-ocr/tessdata/blob/master/chi_sim.traineddata 往下载,然后放到exe旁", "chi_sim.traineddata");
+
+                using (var tess = new TesseractEngine(@".", "chi_sim"))
+                {
+                    tess.SetVariable("preserve_interword_spaces", SpaceCheckBox.Checked ? 1 : 0);
+                    var result = tess.Process((Bitmap)img, PageSegMode.Auto);
+                    OutputRichTextBox.Text =
+                        "========== " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ff") + " =========="
+                        + Environment.NewLine + result.GetText().Trim()
+                        + Environment.NewLine + OutputRichTextBox.Text
+                        ;
+                }
+            }
+            catch (Exception exception)
+            {
+                OutputRichTextBox.Text =
+                    "========== " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ff") + " =========="
+                    + Environment.NewLine + "错误:" + exception.Message
+                    + Environment.NewLine + OutputRichTextBox.Text
+                    ;
+            }
+            finally
+            {
+                AppendTitle = "就绪";
+            }
+        }
+
+        private void WatchingClipBoard_CheckedChanged(object sender, EventArgs e)
+        {
+            if (WatchingClipBoard.Checked) AddClipboardFormatListener(Handle);
+            else RemoveClipboardFormatListener(Handle);
+        }
+
+        protected override void WndProc(ref Message m)
+        {
+            base.WndProc(ref m);
+
+            if (m.Msg == WM_CLIPBOARDUPDATE)
+            {
+                OcrImage(Clipboard.GetImage());
+            }
+        }
+
+        [DllImport("user32.dll", SetLastError = true)]
+        [return: MarshalAs(UnmanagedType.Bool)]
+        private static extern bool AddClipboardFormatListener(IntPtr hwnd);
+
+        [DllImport("user32.dll", SetLastError = true)]
+        [return: MarshalAs(UnmanagedType.Bool)]
+        private static extern bool RemoveClipboardFormatListener(IntPtr hwnd);
+
+        private const int WM_CLIPBOARDUPDATE = 0x031D;
+    }
+}

+ 120 - 0
TesseractScreenReader/TsrMainForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 22 - 0
TesseractScreenReader/TsrProgram.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace TesseractScreenReader
+{
+    static class TsrProgram
+    {
+        /// <summary>
+        /// 应用程序的主入口点。
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new TsrMainForm());
+        }
+    }
+}

+ 4 - 0
TesseractScreenReader/packages.config

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Tesseract" version="4.1.0-beta1" targetFramework="net461" />
+</packages>