├── .gitattributes
├── .gitignore
├── App.config
├── BaseTextBox.cs
├── Form1.Designer.cs
├── Form1.cs
├── Form1.en.resx
├── Form1.resx
├── FormFAR.Designer.cs
├── FormFAR.cs
├── FormFAR.resx
├── FormLoading.Designer.cs
├── FormLoading.cs
├── FormLoading.resx
├── FormPreview.Designer.cs
├── FormPreview.cs
├── FormPreview.resx
├── FormRule.Designer.cs
├── FormRule.cs
├── FormRule.resx
├── FormWavDoesnotExists.Designer.cs
├── FormWavDoesnotExists.cs
├── FormWavDoesnotExists.resx
├── LICENSE
├── Logo.ico
├── Logo.png
├── Logo.psd
├── MyCheckBox.cs
├── NFCButton.cs
├── Program.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
├── README.md
├── Resource
├── Find_and_replace.png
├── Two_hira2roma.png
├── Two_hira2roma_1.png
├── add_button.png
├── oto2dvcfg_main_form.png
├── oto_opened.png
├── right_click_menu.png
└── wav_and_oto_in_same_dir.png
├── Resources
└── buttonAddActive.bmp
├── TransparentTextBox.cs
├── UI resource
├── Language.png
├── buttonAddActive.png
├── buttonAddNormal.png
├── buttonAddNormal.psd
├── buttonCloseActive.png
├── buttonCloseNormal.png
├── checkHI2RONormal.png
├── formBack.png
├── listBack.png
├── oto2dvfg.psd
└── otoPathBack.png
├── dvcfgCalculator.cs
├── hi-ro.txt
├── oto.ini
├── oto2dvcfg.csproj
├── oto2dvcfg.sln
├── otoCHN.ini
├── otoReader.cs
├── otoSpliter.cs
└── tranListView.cs
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Dd]ebugPublic/
19 | [Rr]elease/
20 | [Rr]eleases/
21 | x64/
22 | x86/
23 | [Aa][Rr][Mm]/
24 | [Aa][Rr][Mm]64/
25 | bld/
26 | [Bb]in/
27 | [Oo]bj/
28 | [Ll]og/
29 |
30 | # Visual Studio 2015/2017 cache/options directory
31 | .vs/
32 | # Uncomment if you have tasks that create the project's static files in wwwroot
33 | #wwwroot/
34 |
35 | # Visual Studio 2017 auto generated files
36 | Generated\ Files/
37 |
38 | # MSTest test Results
39 | [Tt]est[Rr]esult*/
40 | [Bb]uild[Ll]og.*
41 |
42 | # NUNIT
43 | *.VisualState.xml
44 | TestResult.xml
45 |
46 | # Build Results of an ATL Project
47 | [Dd]ebugPS/
48 | [Rr]eleasePS/
49 | dlldata.c
50 |
51 | # Benchmark Results
52 | BenchmarkDotNet.Artifacts/
53 |
54 | # .NET Core
55 | project.lock.json
56 | project.fragment.lock.json
57 | artifacts/
58 |
59 | # StyleCop
60 | StyleCopReport.xml
61 |
62 | # Files built by Visual Studio
63 | *_i.c
64 | *_p.c
65 | *_h.h
66 | *.ilk
67 | *.meta
68 | *.obj
69 | *.iobj
70 | *.pch
71 | *.pdb
72 | *.ipdb
73 | *.pgc
74 | *.pgd
75 | *.rsp
76 | *.sbr
77 | *.tlb
78 | *.tli
79 | *.tlh
80 | *.tmp
81 | *.tmp_proj
82 | *_wpftmp.csproj
83 | *.log
84 | *.vspscc
85 | *.vssscc
86 | .builds
87 | *.pidb
88 | *.svclog
89 | *.scc
90 |
91 | # Chutzpah Test files
92 | _Chutzpah*
93 |
94 | # Visual C++ cache files
95 | ipch/
96 | *.aps
97 | *.ncb
98 | *.opendb
99 | *.opensdf
100 | *.sdf
101 | *.cachefile
102 | *.VC.db
103 | *.VC.VC.opendb
104 |
105 | # Visual Studio profiler
106 | *.psess
107 | *.vsp
108 | *.vspx
109 | *.sap
110 |
111 | # Visual Studio Trace Files
112 | *.e2e
113 |
114 | # TFS 2012 Local Workspace
115 | $tf/
116 |
117 | # Guidance Automation Toolkit
118 | *.gpState
119 |
120 | # ReSharper is a .NET coding add-in
121 | _ReSharper*/
122 | *.[Rr]e[Ss]harper
123 | *.DotSettings.user
124 |
125 | # JustCode is a .NET coding add-in
126 | .JustCode
127 |
128 | # TeamCity is a build add-in
129 | _TeamCity*
130 |
131 | # DotCover is a Code Coverage Tool
132 | *.dotCover
133 |
134 | # AxoCover is a Code Coverage Tool
135 | .axoCover/*
136 | !.axoCover/settings.json
137 |
138 | # Visual Studio code coverage results
139 | *.coverage
140 | *.coveragexml
141 |
142 | # NCrunch
143 | _NCrunch_*
144 | .*crunch*.local.xml
145 | nCrunchTemp_*
146 |
147 | # MightyMoose
148 | *.mm.*
149 | AutoTest.Net/
150 |
151 | # Web workbench (sass)
152 | .sass-cache/
153 |
154 | # Installshield output folder
155 | [Ee]xpress/
156 |
157 | # DocProject is a documentation generator add-in
158 | DocProject/buildhelp/
159 | DocProject/Help/*.HxT
160 | DocProject/Help/*.HxC
161 | DocProject/Help/*.hhc
162 | DocProject/Help/*.hhk
163 | DocProject/Help/*.hhp
164 | DocProject/Help/Html2
165 | DocProject/Help/html
166 |
167 | # Click-Once directory
168 | publish/
169 |
170 | # Publish Web Output
171 | *.[Pp]ublish.xml
172 | *.azurePubxml
173 | # Note: Comment the next line if you want to checkin your web deploy settings,
174 | # but database connection strings (with potential passwords) will be unencrypted
175 | *.pubxml
176 | *.publishproj
177 |
178 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
179 | # checkin your Azure Web App publish settings, but sensitive information contained
180 | # in these scripts will be unencrypted
181 | PublishScripts/
182 |
183 | # NuGet Packages
184 | *.nupkg
185 | # The packages folder can be ignored because of Package Restore
186 | **/[Pp]ackages/*
187 | # except build/, which is used as an MSBuild target.
188 | !**/[Pp]ackages/build/
189 | # Uncomment if necessary however generally it will be regenerated when needed
190 | #!**/[Pp]ackages/repositories.config
191 | # NuGet v3's project.json files produces more ignorable files
192 | *.nuget.props
193 | *.nuget.targets
194 |
195 | # Microsoft Azure Build Output
196 | csx/
197 | *.build.csdef
198 |
199 | # Microsoft Azure Emulator
200 | ecf/
201 | rcf/
202 |
203 | # Windows Store app package directories and files
204 | AppPackages/
205 | BundleArtifacts/
206 | Package.StoreAssociation.xml
207 | _pkginfo.txt
208 | *.appx
209 |
210 | # Visual Studio cache files
211 | # files ending in .cache can be ignored
212 | *.[Cc]ache
213 | # but keep track of directories ending in .cache
214 | !?*.[Cc]ache/
215 |
216 | # Others
217 | ClientBin/
218 | ~$*
219 | *~
220 | *.dbmdl
221 | *.dbproj.schemaview
222 | *.jfm
223 | *.pfx
224 | *.publishsettings
225 | orleans.codegen.cs
226 |
227 | # Including strong name files can present a security risk
228 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
229 | #*.snk
230 |
231 | # Since there are multiple workflows, uncomment next line to ignore bower_components
232 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
233 | #bower_components/
234 |
235 | # RIA/Silverlight projects
236 | Generated_Code/
237 |
238 | # Backup & report files from converting an old project file
239 | # to a newer Visual Studio version. Backup files are not needed,
240 | # because we have git ;-)
241 | _UpgradeReport_Files/
242 | Backup*/
243 | UpgradeLog*.XML
244 | UpgradeLog*.htm
245 | ServiceFabricBackup/
246 | *.rptproj.bak
247 |
248 | # SQL Server files
249 | *.mdf
250 | *.ldf
251 | *.ndf
252 |
253 | # Business Intelligence projects
254 | *.rdl.data
255 | *.bim.layout
256 | *.bim_*.settings
257 | *.rptproj.rsuser
258 | *- Backup*.rdl
259 |
260 | # Microsoft Fakes
261 | FakesAssemblies/
262 |
263 | # GhostDoc plugin setting file
264 | *.GhostDoc.xml
265 |
266 | # Node.js Tools for Visual Studio
267 | .ntvs_analysis.dat
268 | node_modules/
269 |
270 | # Visual Studio 6 build log
271 | *.plg
272 |
273 | # Visual Studio 6 workspace options file
274 | *.opt
275 |
276 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
277 | *.vbw
278 |
279 | # Visual Studio LightSwitch build output
280 | **/*.HTMLClient/GeneratedArtifacts
281 | **/*.DesktopClient/GeneratedArtifacts
282 | **/*.DesktopClient/ModelManifest.xml
283 | **/*.Server/GeneratedArtifacts
284 | **/*.Server/ModelManifest.xml
285 | _Pvt_Extensions
286 |
287 | # Paket dependency manager
288 | .paket/paket.exe
289 | paket-files/
290 |
291 | # FAKE - F# Make
292 | .fake/
293 |
294 | # JetBrains Rider
295 | .idea/
296 | *.sln.iml
297 |
298 | # CodeRush personal settings
299 | .cr/personal
300 |
301 | # Python Tools for Visual Studio (PTVS)
302 | __pycache__/
303 | *.pyc
304 |
305 | # Cake - Uncomment if you are using it
306 | # tools/**
307 | # !tools/packages.config
308 |
309 | # Tabs Studio
310 | *.tss
311 |
312 | # Telerik's JustMock configuration file
313 | *.jmconfig
314 |
315 | # BizTalk build output
316 | *.btp.cs
317 | *.btm.cs
318 | *.odx.cs
319 | *.xsd.cs
320 |
321 | # OpenCover UI analysis results
322 | OpenCover/
323 |
324 | # Azure Stream Analytics local run output
325 | ASALocalRun/
326 |
327 | # MSBuild Binary and Structured Log
328 | *.binlog
329 |
330 | # NVidia Nsight GPU debugger configuration file
331 | *.nvuser
332 |
333 | # MFractors (Xamarin productivity tool) working folder
334 | .mfractor/
335 |
336 | # Local History for Visual Studio
337 | .localhistory/
338 |
339 | # BeatPulse healthcheck temp database
340 | healthchecksdb
341 |
342 | .DS_Store
--------------------------------------------------------------------------------
/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/BaseTextBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Drawing;
4 | using System.Linq;
5 | using System.Runtime.InteropServices;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using System.Windows.Forms;
9 |
10 | namespace oto2dvcfg
11 | {
12 | public class BaseTextBox : TextBox
13 | {
14 | //[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
15 | //private static extern IntPtr LoadLibrary(string lpFileName);
16 | //protected override CreateParams CreateParams
17 | //{
18 | // get
19 | // {
20 | // CreateParams prams = base.CreateParams;
21 | // if (LoadLibrary("msftedit.dll") != IntPtr.Zero)
22 | // {
23 | // prams.ExStyle |= 0x020; // transparent
24 | // prams.ClassName = "RICHEDIT50W";
25 | // }
26 | // return prams;
27 | // }
28 | //}
29 |
30 | public BaseTextBox()
31 | {
32 | //InitializeComponent();
33 | this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
34 | // | ControlStyles.UserPaint
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace oto2dvcfg
2 | {
3 | partial class Form1
4 | {
5 | ///
6 | /// 設計工具所需的變數。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清除任何使用中的資源。
12 | ///
13 | /// 如果應該處置受控資源則為 true,否則為 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form 設計工具產生的程式碼
24 |
25 | ///
26 | /// 此為設計工具支援所需的方法 - 請勿使用程式碼編輯器修改
27 | /// 這個方法的內容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
33 | this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
34 | this.Pitch = new System.Windows.Forms.Label();
35 | this.textPitch = new System.Windows.Forms.TextBox();
36 | this.Title = new System.Windows.Forms.Label();
37 | this.buttonGenerate = new System.Windows.Forms.Button();
38 | this.listView1 = new System.Windows.Forms.ListView();
39 | this.columnNo = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
40 | this.wavNameColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
41 | this.aliasColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
42 | this.offsetColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
43 | this.consonantColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
44 | this.cutoffColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
45 | this.preutteranceColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
46 | this.overlapColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
47 | this.aliasTypeColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
48 | this.columnhi2ro = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
49 | this.columnFAR = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
50 | this.columnhi2ron = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
51 | this.columnOriginal = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
52 | this.lableOTOLines = new System.Windows.Forms.Label();
53 | this.labelOTOint = new System.Windows.Forms.Label();
54 | this.checkHI2RO = new System.Windows.Forms.CheckBox();
55 | this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
56 | this.comboLang = new System.Windows.Forms.ComboBox();
57 | this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
58 | this.toolStripMenuItemDel = new System.Windows.Forms.ToolStripMenuItem();
59 | this.toolStripMenuItemTurn2INDLE = new System.Windows.Forms.ToolStripMenuItem();
60 | this.toolStripMenuItemTurn2CV = new System.Windows.Forms.ToolStripMenuItem();
61 | this.toolStripMenuItemTurn2VX = new System.Windows.Forms.ToolStripMenuItem();
62 | this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
63 | this.toolStripMenuItemCopyAlias = new System.Windows.Forms.ToolStripMenuItem();
64 | this.textOTOpath = new System.Windows.Forms.Label();
65 | this.checkFARpreview = new System.Windows.Forms.CheckBox();
66 | this.checkHI2RON = new System.Windows.Forms.CheckBox();
67 | this.button1 = new System.Windows.Forms.Button();
68 | this.buttonFindAndReplace = new oto2dvcfg.NFCButton();
69 | this.buttonClose = new oto2dvcfg.NFCButton();
70 | this.contextMenuStrip1.SuspendLayout();
71 | this.SuspendLayout();
72 | //
73 | // openFileDialog1
74 | //
75 | this.openFileDialog1.FileName = "openFileDialog1";
76 | resources.ApplyResources(this.openFileDialog1, "openFileDialog1");
77 | //
78 | // Pitch
79 | //
80 | resources.ApplyResources(this.Pitch, "Pitch");
81 | this.Pitch.BackColor = System.Drawing.Color.Transparent;
82 | this.Pitch.ForeColor = System.Drawing.Color.White;
83 | this.Pitch.Name = "Pitch";
84 | //
85 | // textPitch
86 | //
87 | this.textPitch.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
88 | this.textPitch.BorderStyle = System.Windows.Forms.BorderStyle.None;
89 | resources.ApplyResources(this.textPitch, "textPitch");
90 | this.textPitch.ForeColor = System.Drawing.Color.White;
91 | this.textPitch.Name = "textPitch";
92 | //
93 | // Title
94 | //
95 | this.Title.BackColor = System.Drawing.Color.Transparent;
96 | this.Title.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
97 | resources.ApplyResources(this.Title, "Title");
98 | this.Title.ForeColor = System.Drawing.Color.White;
99 | this.Title.Name = "Title";
100 | this.Title.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseDown);
101 | this.Title.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseMove);
102 | this.Title.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseUp);
103 | //
104 | // buttonGenerate
105 | //
106 | resources.ApplyResources(this.buttonGenerate, "buttonGenerate");
107 | this.buttonGenerate.ForeColor = System.Drawing.Color.White;
108 | this.buttonGenerate.Name = "buttonGenerate";
109 | this.buttonGenerate.UseVisualStyleBackColor = true;
110 | this.buttonGenerate.Click += new System.EventHandler(this.ButtonGenerate_Click);
111 | //
112 | // listView1
113 | //
114 | this.listView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
115 | this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
116 | this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
117 | this.columnNo,
118 | this.wavNameColumn,
119 | this.aliasColumn,
120 | this.offsetColumn,
121 | this.consonantColumn,
122 | this.cutoffColumn,
123 | this.preutteranceColumn,
124 | this.overlapColumn,
125 | this.aliasTypeColumn,
126 | this.columnhi2ro,
127 | this.columnFAR,
128 | this.columnhi2ron,
129 | this.columnOriginal});
130 | resources.ApplyResources(this.listView1, "listView1");
131 | this.listView1.ForeColor = System.Drawing.Color.White;
132 | this.listView1.HideSelection = false;
133 | this.listView1.Name = "listView1";
134 | this.listView1.UseCompatibleStateImageBehavior = false;
135 | this.listView1.View = System.Windows.Forms.View.Details;
136 | this.listView1.DoubleClick += new System.EventHandler(this.ListView1_DoubleClick);
137 | this.listView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ListView1_KeyDown);
138 | this.listView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.ListView1_MouseClick);
139 | //
140 | // columnNo
141 | //
142 | resources.ApplyResources(this.columnNo, "columnNo");
143 | //
144 | // wavNameColumn
145 | //
146 | resources.ApplyResources(this.wavNameColumn, "wavNameColumn");
147 | //
148 | // aliasColumn
149 | //
150 | resources.ApplyResources(this.aliasColumn, "aliasColumn");
151 | //
152 | // offsetColumn
153 | //
154 | resources.ApplyResources(this.offsetColumn, "offsetColumn");
155 | //
156 | // consonantColumn
157 | //
158 | resources.ApplyResources(this.consonantColumn, "consonantColumn");
159 | //
160 | // cutoffColumn
161 | //
162 | resources.ApplyResources(this.cutoffColumn, "cutoffColumn");
163 | //
164 | // preutteranceColumn
165 | //
166 | resources.ApplyResources(this.preutteranceColumn, "preutteranceColumn");
167 | //
168 | // overlapColumn
169 | //
170 | resources.ApplyResources(this.overlapColumn, "overlapColumn");
171 | //
172 | // aliasTypeColumn
173 | //
174 | resources.ApplyResources(this.aliasTypeColumn, "aliasTypeColumn");
175 | //
176 | // columnhi2ro
177 | //
178 | resources.ApplyResources(this.columnhi2ro, "columnhi2ro");
179 | //
180 | // columnFAR
181 | //
182 | resources.ApplyResources(this.columnFAR, "columnFAR");
183 | //
184 | // columnhi2ron
185 | //
186 | resources.ApplyResources(this.columnhi2ron, "columnhi2ron");
187 | //
188 | // columnOriginal
189 | //
190 | resources.ApplyResources(this.columnOriginal, "columnOriginal");
191 | //
192 | // lableOTOLines
193 | //
194 | resources.ApplyResources(this.lableOTOLines, "lableOTOLines");
195 | this.lableOTOLines.BackColor = System.Drawing.Color.Transparent;
196 | this.lableOTOLines.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
197 | this.lableOTOLines.ForeColor = System.Drawing.Color.White;
198 | this.lableOTOLines.Name = "lableOTOLines";
199 | //
200 | // labelOTOint
201 | //
202 | resources.ApplyResources(this.labelOTOint, "labelOTOint");
203 | this.labelOTOint.BackColor = System.Drawing.Color.Transparent;
204 | this.labelOTOint.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
205 | this.labelOTOint.ForeColor = System.Drawing.Color.White;
206 | this.labelOTOint.Name = "labelOTOint";
207 | //
208 | // checkHI2RO
209 | //
210 | resources.ApplyResources(this.checkHI2RO, "checkHI2RO");
211 | this.checkHI2RO.BackColor = System.Drawing.Color.Transparent;
212 | this.checkHI2RO.ForeColor = System.Drawing.Color.Black;
213 | this.checkHI2RO.Name = "checkHI2RO";
214 | this.checkHI2RO.UseVisualStyleBackColor = false;
215 | this.checkHI2RO.CheckedChanged += new System.EventHandler(this.CheckHI2RO_CheckedChanged);
216 | //
217 | // comboLang
218 | //
219 | this.comboLang.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(125)))), ((int)(((byte)(125)))), ((int)(((byte)(125)))));
220 | this.comboLang.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
221 | resources.ApplyResources(this.comboLang, "comboLang");
222 | this.comboLang.ForeColor = System.Drawing.Color.White;
223 | this.comboLang.FormattingEnabled = true;
224 | this.comboLang.Items.AddRange(new object[] {
225 | resources.GetString("comboLang.Items"),
226 | resources.GetString("comboLang.Items1")});
227 | this.comboLang.Name = "comboLang";
228 | this.comboLang.SelectedIndexChanged += new System.EventHandler(this.ComboLang_SelectedIndexChanged);
229 | //
230 | // contextMenuStrip1
231 | //
232 | this.contextMenuStrip1.BackColor = System.Drawing.Color.White;
233 | this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
234 | this.toolStripMenuItemDel,
235 | this.toolStripMenuItemTurn2INDLE,
236 | this.toolStripMenuItemTurn2CV,
237 | this.toolStripMenuItemTurn2VX,
238 | this.toolStripSeparator1,
239 | this.toolStripMenuItemCopyAlias});
240 | this.contextMenuStrip1.Name = "contextMenuStrip1";
241 | this.contextMenuStrip1.ShowImageMargin = false;
242 | resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1");
243 | //
244 | // toolStripMenuItemDel
245 | //
246 | this.toolStripMenuItemDel.Name = "toolStripMenuItemDel";
247 | resources.ApplyResources(this.toolStripMenuItemDel, "toolStripMenuItemDel");
248 | this.toolStripMenuItemDel.Click += new System.EventHandler(this.ToolStripMenuItemDel_Click);
249 | //
250 | // toolStripMenuItemTurn2INDLE
251 | //
252 | this.toolStripMenuItemTurn2INDLE.Name = "toolStripMenuItemTurn2INDLE";
253 | resources.ApplyResources(this.toolStripMenuItemTurn2INDLE, "toolStripMenuItemTurn2INDLE");
254 | this.toolStripMenuItemTurn2INDLE.Click += new System.EventHandler(this.ToolStripMenuItemTurn2INDLE_Click);
255 | //
256 | // toolStripMenuItemTurn2CV
257 | //
258 | this.toolStripMenuItemTurn2CV.Name = "toolStripMenuItemTurn2CV";
259 | resources.ApplyResources(this.toolStripMenuItemTurn2CV, "toolStripMenuItemTurn2CV");
260 | this.toolStripMenuItemTurn2CV.Click += new System.EventHandler(this.ToolStripMenuItemTurn2CV_Click);
261 | //
262 | // toolStripMenuItemTurn2VX
263 | //
264 | this.toolStripMenuItemTurn2VX.Name = "toolStripMenuItemTurn2VX";
265 | resources.ApplyResources(this.toolStripMenuItemTurn2VX, "toolStripMenuItemTurn2VX");
266 | this.toolStripMenuItemTurn2VX.Click += new System.EventHandler(this.ToolStripMenuItemTurn2VX_Click);
267 | //
268 | // toolStripSeparator1
269 | //
270 | this.toolStripSeparator1.Name = "toolStripSeparator1";
271 | resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
272 | //
273 | // toolStripMenuItemCopyAlias
274 | //
275 | this.toolStripMenuItemCopyAlias.Name = "toolStripMenuItemCopyAlias";
276 | resources.ApplyResources(this.toolStripMenuItemCopyAlias, "toolStripMenuItemCopyAlias");
277 | this.toolStripMenuItemCopyAlias.Click += new System.EventHandler(this.ToolStripMenuItemCopyAlias_Click);
278 | //
279 | // textOTOpath
280 | //
281 | this.textOTOpath.BackColor = System.Drawing.Color.Transparent;
282 | resources.ApplyResources(this.textOTOpath, "textOTOpath");
283 | this.textOTOpath.ForeColor = System.Drawing.Color.White;
284 | this.textOTOpath.Name = "textOTOpath";
285 | //
286 | // checkFARpreview
287 | //
288 | resources.ApplyResources(this.checkFARpreview, "checkFARpreview");
289 | this.checkFARpreview.BackColor = System.Drawing.Color.Transparent;
290 | this.checkFARpreview.Name = "checkFARpreview";
291 | this.checkFARpreview.UseVisualStyleBackColor = false;
292 | this.checkFARpreview.CheckedChanged += new System.EventHandler(this.CheckFARpreview_CheckedChanged);
293 | //
294 | // checkHI2RON
295 | //
296 | resources.ApplyResources(this.checkHI2RON, "checkHI2RON");
297 | this.checkHI2RON.BackColor = System.Drawing.Color.Transparent;
298 | this.checkHI2RON.ForeColor = System.Drawing.Color.Black;
299 | this.checkHI2RON.Name = "checkHI2RON";
300 | this.checkHI2RON.UseVisualStyleBackColor = false;
301 | this.checkHI2RON.CheckedChanged += new System.EventHandler(this.CheckHI2ROn_CheckedChanged);
302 | //
303 | // button1
304 | //
305 | resources.ApplyResources(this.button1, "button1");
306 | this.button1.Name = "button1";
307 | this.button1.UseVisualStyleBackColor = true;
308 | this.button1.Click += new System.EventHandler(this.Button1_Click);
309 | //
310 | // buttonFindAndReplace
311 | //
312 | this.buttonFindAndReplace.BackColor = System.Drawing.Color.Transparent;
313 | resources.ApplyResources(this.buttonFindAndReplace, "buttonFindAndReplace");
314 | this.buttonFindAndReplace.ForeColor = System.Drawing.Color.Transparent;
315 | this.buttonFindAndReplace.Name = "buttonFindAndReplace";
316 | this.buttonFindAndReplace.UseVisualStyleBackColor = false;
317 | this.buttonFindAndReplace.Click += new System.EventHandler(this.buttonFindAndReplace_Click);
318 | //
319 | // buttonClose
320 | //
321 | this.buttonClose.BackColor = System.Drawing.Color.Transparent;
322 | this.buttonClose.BackgroundImage = global::oto2dvcfg.Properties.Resources.buttonCloseNormal;
323 | resources.ApplyResources(this.buttonClose, "buttonClose");
324 | this.buttonClose.FlatAppearance.BorderSize = 0;
325 | this.buttonClose.Name = "buttonClose";
326 | this.buttonClose.UseVisualStyleBackColor = false;
327 | this.buttonClose.Click += new System.EventHandler(this.ButtonClose_Click);
328 | this.buttonClose.MouseEnter += new System.EventHandler(this.ButtonClose_MouseEnter);
329 | this.buttonClose.MouseLeave += new System.EventHandler(this.ButtonClose_MouseLeave);
330 | //
331 | // Form1
332 | //
333 | this.AllowDrop = true;
334 | resources.ApplyResources(this, "$this");
335 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
336 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(61)))), ((int)(((byte)(62)))), ((int)(((byte)(63)))));
337 | this.BackgroundImage = global::oto2dvcfg.Properties.Resources.formBack;
338 | this.Controls.Add(this.button1);
339 | this.Controls.Add(this.checkHI2RON);
340 | this.Controls.Add(this.checkFARpreview);
341 | this.Controls.Add(this.buttonFindAndReplace);
342 | this.Controls.Add(this.textOTOpath);
343 | this.Controls.Add(this.buttonClose);
344 | this.Controls.Add(this.comboLang);
345 | this.Controls.Add(this.checkHI2RO);
346 | this.Controls.Add(this.labelOTOint);
347 | this.Controls.Add(this.lableOTOLines);
348 | this.Controls.Add(this.listView1);
349 | this.Controls.Add(this.buttonGenerate);
350 | this.Controls.Add(this.Title);
351 | this.Controls.Add(this.textPitch);
352 | this.Controls.Add(this.Pitch);
353 | this.DoubleBuffered = true;
354 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
355 | this.Name = "Form1";
356 | this.Load += new System.EventHandler(this.Form1_Load);
357 | this.DoubleClick += new System.EventHandler(this.OpenOTO_Click);
358 | this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseDown);
359 | this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseMove);
360 | this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseUp);
361 | this.contextMenuStrip1.ResumeLayout(false);
362 | this.ResumeLayout(false);
363 | this.PerformLayout();
364 |
365 | }
366 |
367 | #endregion
368 | private System.Windows.Forms.OpenFileDialog openFileDialog1;
369 | private System.Windows.Forms.Label Pitch;
370 | private System.Windows.Forms.TextBox textPitch;
371 | private System.Windows.Forms.Label Title;
372 | private System.Windows.Forms.Button buttonGenerate;
373 | private System.Windows.Forms.ListView listView1;
374 | private System.Windows.Forms.ColumnHeader wavNameColumn;
375 | private System.Windows.Forms.ColumnHeader aliasColumn;
376 | private System.Windows.Forms.ColumnHeader offsetColumn;
377 | private System.Windows.Forms.ColumnHeader consonantColumn;
378 | private System.Windows.Forms.ColumnHeader cutoffColumn;
379 | private System.Windows.Forms.ColumnHeader preutteranceColumn;
380 | private System.Windows.Forms.ColumnHeader overlapColumn;
381 | private System.Windows.Forms.Label lableOTOLines;
382 | private System.Windows.Forms.Label labelOTOint;
383 | private System.Windows.Forms.ColumnHeader aliasTypeColumn;
384 | private System.Windows.Forms.ColumnHeader columnNo;
385 | private System.Windows.Forms.CheckBox checkHI2RO;
386 | private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
387 | private System.Windows.Forms.ComboBox comboLang;
388 | private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
389 | private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemTurn2INDLE;
390 | private NFCButton buttonClose;
391 | private System.Windows.Forms.Label textOTOpath;
392 | private System.Windows.Forms.ColumnHeader columnhi2ro;
393 | private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemTurn2CV;
394 | private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemTurn2VX;
395 | private NFCButton buttonFindAndReplace;
396 | private System.Windows.Forms.CheckBox checkFARpreview;
397 | private System.Windows.Forms.ColumnHeader columnFAR;
398 | private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
399 | private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemDel;
400 | private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemCopyAlias;
401 | private System.Windows.Forms.CheckBox checkHI2RON;
402 | private System.Windows.Forms.ColumnHeader columnhi2ron;
403 | private System.Windows.Forms.Button button1;
404 | private System.Windows.Forms.ColumnHeader columnOriginal;
405 | }
406 | }
407 |
408 |
--------------------------------------------------------------------------------
/Form1.en.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 |
123 | AAABAAEAAAAAAAEAIABGCAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgCAAAA0xA/MQAAAAlw
124 | SFlzAAAOxAAADsQBlSsOGwAAB/hJREFUeJzt3U1rE2sYh/FbOFQtUaFGsUZBwSQQfOlCCiK6qYKbFlwV
125 | /Ex+jS5cFwSFLlqEUHVThUJTioLia1qoLVW78SxunRPT03SmmWcy6f/6LWQGp8mzufLMTDIzh0qlkgGq
126 | /un1AIBeIgBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBISxZAuVwONA4gLcvLy/E3
127 | ZgaANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKAtJQDKBaLZjY0
128 | NBRn40ajke67d1CpVOJstra2ZmbNZjPwcJAXzACQRgCQlnIAtVrNzEZHR+Ns/PDhw3TfvYOJiYk4mz1/
129 | /tzM5ubmAg8HecEMAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkE
130 | AGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkE
131 | AGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkpB/Dp
132 | 06d0XzBj/T5+JMUMAGkEAGm9DKBYLPpCs9kM9Bbnz58P9Mo4GJgBIC3lABqNRvyNa7WaL8zNzaU7jMjF
133 | ixfjbLa9ve0LicaPA4AZANIIANKCBLC0tOQL1Wq1w2ZBd4EGBwfNbGRkJM7Gb968SX0A6AvMAJDWyxmg
134 | UCj4wvj4uJlNT0+nOIaxsTEzGxgYiLNxvV5P8a1TtLy83OF/y+VyZiM5qJgBII0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EgjAGTBj4knJyfjbHzjxg1fyOBomAAg
148 | jQCQBf+9XXQPlbYLiNuUSqUsxmRmBABxBABpBIDsrKys+ELnXaBCoeALft1ZokvVkiIASCMAZCfpzb+G
149 | hoaMGQAIhwAgjQCQnbW1tUTbnzhxItBIIgQAaQQAaQSA7OThbrhtCADSCAD5dfr06dBvQQCQRgCQRgDI
150 | r8OHD4d+CwKANAKANAKANAKANAJAfn39+jX0WxAApBEA8uvHjx+h34IAII0AII0AkJ1KpdLrIbQjAEgj
151 | AGTnzJkzibZPehuVfSAASCMASCMAZCfpFV6NRiPQSCIEAGkEAGkEgCwMDg6a2YULF+Js/Pbt26CDaUUA
152 | kEYAyML169fjbxz0fuhtCADSCADSCAABFYtFXxgZGYmz/ebmppnNz88HHNPfCADSCABB+HnP8fFxXx0Y
153 | GIjzV/V6PeCY/g8BQBoBQBoBIE3+aGszu3Pnju31QOzI0tKSLywsLAQa2G4IANIIAF2JPvL9RGe1Wo3/
154 | t6urq74wMzOT+sBiIgBIIwBIIwBYrVazlp2ZOIaHh7t5R//B8+PHj311a2urm1frBgFAGgHACoVC9G8g
155 | 29vbZjY7O+ur2Z/u3A0BQBoBQBoBIAg/x7+4uOirr1+/tp4e7O6GACCNACCNAJCMX7S1sbHhq9FjvNbX
156 | 181sZWXFV5vNZi9GlxgBQBoBHGRTU1O9HkLeEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCk
157 | EQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkHSqVSr0eA9AzzACQRgCQRgCQRgCQRgCQRgCQRgCQRgCQ
158 | RgCQRgCQRgCQRgCQRgCQRgCQ9i/FIco8cnWw6gAAAABJRU5ErkJggg==
159 |
160 |
161 |
--------------------------------------------------------------------------------
/FormFAR.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace oto2dvcfg
2 | {
3 | partial class FormFAR
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormFAR));
32 | this.listView1 = new System.Windows.Forms.ListView();
33 | this.columnName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
34 | this.columnFind = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
35 | this.columnReplace = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
36 | this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
37 | this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
38 | this.nfcButton2 = new oto2dvcfg.NFCButton();
39 | this.nfcButton1 = new oto2dvcfg.NFCButton();
40 | this.buttonLoad = new oto2dvcfg.NFCButton();
41 | this.buttonSave = new oto2dvcfg.NFCButton();
42 | this.buttonDel = new oto2dvcfg.NFCButton();
43 | this.buttonEdit = new oto2dvcfg.NFCButton();
44 | this.buttonAdd = new oto2dvcfg.NFCButton();
45 | this.comboPR = new System.Windows.Forms.ComboBox();
46 | this.SuspendLayout();
47 | //
48 | // listView1
49 | //
50 | this.listView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
51 | this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
52 | this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
53 | this.columnName,
54 | this.columnFind,
55 | this.columnReplace});
56 | this.listView1.ForeColor = System.Drawing.Color.White;
57 | this.listView1.FullRowSelect = true;
58 | this.listView1.HideSelection = false;
59 | this.listView1.Location = new System.Drawing.Point(12, 12);
60 | this.listView1.Name = "listView1";
61 | this.listView1.Size = new System.Drawing.Size(494, 544);
62 | this.listView1.TabIndex = 31;
63 | this.listView1.UseCompatibleStateImageBehavior = false;
64 | this.listView1.View = System.Windows.Forms.View.Details;
65 | //
66 | // columnName
67 | //
68 | this.columnName.Text = "Name";
69 | this.columnName.Width = 234;
70 | //
71 | // columnFind
72 | //
73 | this.columnFind.Text = "Find";
74 | this.columnFind.Width = 130;
75 | //
76 | // columnReplace
77 | //
78 | this.columnReplace.Text = "Replace";
79 | this.columnReplace.Width = 130;
80 | //
81 | // openFileDialog1
82 | //
83 | this.openFileDialog1.FileName = "openFileDialog1";
84 | //
85 | // nfcButton2
86 | //
87 | this.nfcButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
88 | this.nfcButton2.ForeColor = System.Drawing.Color.White;
89 | this.nfcButton2.Location = new System.Drawing.Point(598, 528);
90 | this.nfcButton2.Name = "nfcButton2";
91 | this.nfcButton2.Size = new System.Drawing.Size(83, 28);
92 | this.nfcButton2.TabIndex = 38;
93 | this.nfcButton2.Text = "Cancel";
94 | this.nfcButton2.UseVisualStyleBackColor = true;
95 | this.nfcButton2.Click += new System.EventHandler(this.NfcButton2_Click);
96 | //
97 | // nfcButton1
98 | //
99 | this.nfcButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
100 | this.nfcButton1.ForeColor = System.Drawing.Color.White;
101 | this.nfcButton1.Location = new System.Drawing.Point(512, 528);
102 | this.nfcButton1.Name = "nfcButton1";
103 | this.nfcButton1.Size = new System.Drawing.Size(83, 28);
104 | this.nfcButton1.TabIndex = 37;
105 | this.nfcButton1.Text = "OK";
106 | this.nfcButton1.UseVisualStyleBackColor = true;
107 | this.nfcButton1.Click += new System.EventHandler(this.NfcButton1_Click);
108 | //
109 | // buttonLoad
110 | //
111 | this.buttonLoad.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
112 | this.buttonLoad.ForeColor = System.Drawing.Color.White;
113 | this.buttonLoad.Location = new System.Drawing.Point(512, 479);
114 | this.buttonLoad.Name = "buttonLoad";
115 | this.buttonLoad.Size = new System.Drawing.Size(169, 43);
116 | this.buttonLoad.TabIndex = 36;
117 | this.buttonLoad.Text = "Load from template ";
118 | this.buttonLoad.UseVisualStyleBackColor = true;
119 | this.buttonLoad.Click += new System.EventHandler(this.ButtonLoad_Click);
120 | //
121 | // buttonSave
122 | //
123 | this.buttonSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
124 | this.buttonSave.ForeColor = System.Drawing.Color.White;
125 | this.buttonSave.Location = new System.Drawing.Point(512, 430);
126 | this.buttonSave.Name = "buttonSave";
127 | this.buttonSave.Size = new System.Drawing.Size(169, 43);
128 | this.buttonSave.TabIndex = 35;
129 | this.buttonSave.Text = "Save to template ";
130 | this.buttonSave.UseVisualStyleBackColor = true;
131 | this.buttonSave.Click += new System.EventHandler(this.ButtonSave_Click);
132 | //
133 | // buttonDel
134 | //
135 | this.buttonDel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
136 | this.buttonDel.ForeColor = System.Drawing.Color.White;
137 | this.buttonDel.Location = new System.Drawing.Point(512, 86);
138 | this.buttonDel.Name = "buttonDel";
139 | this.buttonDel.Size = new System.Drawing.Size(169, 31);
140 | this.buttonDel.TabIndex = 34;
141 | this.buttonDel.Text = "Delete rule";
142 | this.buttonDel.UseVisualStyleBackColor = true;
143 | this.buttonDel.Click += new System.EventHandler(this.ButtonDel_Click);
144 | //
145 | // buttonEdit
146 | //
147 | this.buttonEdit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
148 | this.buttonEdit.ForeColor = System.Drawing.Color.White;
149 | this.buttonEdit.Location = new System.Drawing.Point(512, 49);
150 | this.buttonEdit.Name = "buttonEdit";
151 | this.buttonEdit.Size = new System.Drawing.Size(169, 31);
152 | this.buttonEdit.TabIndex = 33;
153 | this.buttonEdit.Text = "Edit rule";
154 | this.buttonEdit.UseVisualStyleBackColor = true;
155 | this.buttonEdit.Click += new System.EventHandler(this.ButtonEdit_Click);
156 | //
157 | // buttonAdd
158 | //
159 | this.buttonAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
160 | this.buttonAdd.ForeColor = System.Drawing.Color.White;
161 | this.buttonAdd.Location = new System.Drawing.Point(512, 12);
162 | this.buttonAdd.Name = "buttonAdd";
163 | this.buttonAdd.Size = new System.Drawing.Size(169, 31);
164 | this.buttonAdd.TabIndex = 32;
165 | this.buttonAdd.Text = "Add rule";
166 | this.buttonAdd.UseVisualStyleBackColor = true;
167 | this.buttonAdd.Click += new System.EventHandler(this.ButtonAdd_Click);
168 | //
169 | // comboPR
170 | //
171 | this.comboPR.FormattingEnabled = true;
172 | this.comboPR.Items.AddRange(new object[] {
173 | "R to -",
174 | "息R to H"});
175 | this.comboPR.Location = new System.Drawing.Point(513, 124);
176 | this.comboPR.Name = "comboPR";
177 | this.comboPR.Size = new System.Drawing.Size(168, 28);
178 | this.comboPR.TabIndex = 39;
179 | this.comboPR.Text = "Preset rules...";
180 | //
181 | // FormFAR
182 | //
183 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
184 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
185 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(27)))), ((int)(((byte)(27)))));
186 | this.ClientSize = new System.Drawing.Size(696, 568);
187 | this.Controls.Add(this.comboPR);
188 | this.Controls.Add(this.nfcButton2);
189 | this.Controls.Add(this.nfcButton1);
190 | this.Controls.Add(this.buttonLoad);
191 | this.Controls.Add(this.buttonSave);
192 | this.Controls.Add(this.buttonDel);
193 | this.Controls.Add(this.buttonEdit);
194 | this.Controls.Add(this.buttonAdd);
195 | this.Controls.Add(this.listView1);
196 | this.Font = new System.Drawing.Font("Adobe Fan Heiti Std B", 12F, System.Drawing.FontStyle.Bold);
197 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
198 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
199 | this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
200 | this.Name = "FormFAR";
201 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
202 | this.Text = "FormFAR";
203 | this.Load += new System.EventHandler(this.FormFAR_Load);
204 | this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseDown);
205 | this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseMove);
206 | this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseUp);
207 | this.ResumeLayout(false);
208 |
209 | }
210 |
211 | #endregion
212 | private System.Windows.Forms.ListView listView1;
213 | private System.Windows.Forms.ColumnHeader columnName;
214 | private System.Windows.Forms.ColumnHeader columnFind;
215 | private System.Windows.Forms.ColumnHeader columnReplace;
216 | private NFCButton buttonAdd;
217 | private NFCButton buttonEdit;
218 | private NFCButton buttonDel;
219 | private NFCButton buttonSave;
220 | private NFCButton buttonLoad;
221 | private NFCButton nfcButton1;
222 | private NFCButton nfcButton2;
223 | private System.Windows.Forms.SaveFileDialog saveFileDialog1;
224 | private System.Windows.Forms.OpenFileDialog openFileDialog1;
225 | private System.Windows.Forms.ComboBox comboPR;
226 | }
227 | }
--------------------------------------------------------------------------------
/FormFAR.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.IO;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 |
12 | namespace oto2dvcfg
13 | {
14 | public partial class FormFAR : Form
15 | {
16 | FormRule formRule = new FormRule();
17 | public FormFAR()
18 | {
19 | InitializeComponent();
20 | }
21 | #region Draggable form
22 | private bool mouseDown; //For draggble form
23 | private Point lastLocation;
24 | private void Form1_MouseDown(object sender, MouseEventArgs e)
25 | {
26 | mouseDown = true;
27 | lastLocation = e.Location;
28 | }
29 |
30 | private void Form1_MouseMove(object sender, MouseEventArgs e)
31 | {
32 | if (mouseDown)
33 | {
34 | Location = new Point(
35 | (Location.X - lastLocation.X) + e.X, (Location.Y - lastLocation.Y) + e.Y);
36 |
37 | Update();
38 | }
39 | }
40 | private void Form1_MouseUp(object sender, MouseEventArgs e)
41 | {
42 | mouseDown = false;
43 | }
44 | #endregion
45 |
46 | private void ButtonAdd_Click(object sender, EventArgs e)
47 | {
48 | formRule.ShowDialog(this);
49 | if (FormRule.boolAdd == true)
50 | {
51 | string[] input = FormRule.sendtext.Split(',');
52 | ListViewItem[] lvs = new ListViewItem[1];
53 | lvs[0] = new ListViewItem(new string[]
54 | {
55 | input[0],
56 | input[1],
57 | input[2],
58 | });
59 | listView1.Items.AddRange(lvs);
60 | FormRule.SetAdd2false();
61 | }
62 | else
63 | {
64 |
65 | }
66 | }
67 | private void ButtonEdit_Click(object sender, EventArgs e)
68 | {
69 | if (listView1.SelectedItems.Count == 1 && listView1.SelectedItems.Count > 0)
70 | {
71 | FormRule.editMode = true;
72 | FormRule.ruleName = listView1.SelectedItems[0].SubItems[0].Text;
73 | FormRule.ruleFind = listView1.SelectedItems[0].SubItems[1].Text;
74 | FormRule.ruleReplace = listView1.SelectedItems[0].SubItems[2].Text;
75 | formRule.ShowDialog(this);
76 | string[] input = FormRule.sendtext.Split(',');
77 | listView1.SelectedItems[0].SubItems[0].Text = input[0];
78 | listView1.SelectedItems[0].SubItems[1].Text = input[1];
79 | listView1.SelectedItems[0].SubItems[2].Text = input[2];
80 | FormRule.editMode = false;
81 | FormRule.SetAdd2false();
82 | }
83 | else if (listView1.SelectedItems.Count > 1)
84 | {
85 | MessageBox.Show("You can only select one rule to edit", "~~>_<~~", MessageBoxButtons.OK, MessageBoxIcon.Warning);
86 | }
87 | else
88 | {
89 |
90 | }
91 | }
92 |
93 | private void NfcButton2_Click(object sender, EventArgs e)
94 | {
95 | Close();
96 | }
97 |
98 | private void NfcButton1_Click(object sender, EventArgs e)
99 | {
100 | if (listView1.Items.Count >= 1)
101 | {
102 | StreamWriter writeTmp = new StreamWriter(File.OpenWrite("FindAndReplace.tmp"), Encoding.Default);
103 |
104 | foreach (ListViewItem item in listView1.Items)
105 | {
106 | writeTmp.WriteLine(item.SubItems[0].Text + "," + item.SubItems[1].Text + "," + item.SubItems[2].Text);
107 | }
108 | writeTmp.Flush();
109 | writeTmp.Close();
110 | Close();
111 | }
112 | else
113 | {
114 | Close();
115 | }
116 | }
117 |
118 | private void ButtonSave_Click(object sender, EventArgs e)
119 | {
120 | if (listView1.Items.Count >= 1)
121 | {
122 | SaveFileDialog saveFileDialog1 = new SaveFileDialog();
123 | saveFileDialog1.Filter = "Template file|*.txt";
124 | saveFileDialog1.Title = "Save template file";
125 | if (saveFileDialog1.ShowDialog() == DialogResult.OK)
126 | {
127 | StreamWriter writeTemplate = new StreamWriter(File.OpenWrite(saveFileDialog1.FileName), Encoding.Default);
128 | foreach (ListViewItem item in listView1.Items)
129 | {
130 | writeTemplate.WriteLine(item.SubItems[0].Text + "," + item.SubItems[1].Text + "," + item.SubItems[2].Text);
131 | }
132 | writeTemplate.Flush();
133 | writeTemplate.Close();
134 | }
135 | else
136 | {
137 | return;
138 | }
139 | }
140 | else
141 | {
142 |
143 | }
144 | }
145 |
146 | private void ButtonLoad_Click(object sender, EventArgs e)
147 | {
148 | string line = String.Empty;
149 | OpenFileDialog openFileDialog1 = new OpenFileDialog();
150 | openFileDialog1.Filter = "Template file|*.txt";
151 | openFileDialog1.Title = "Open template file";
152 | if (openFileDialog1.ShowDialog() == DialogResult.OK)
153 | {
154 | listView1.Items.Clear();
155 | StreamReader readTemplate = new StreamReader(openFileDialog1.FileName, Encoding.Default);
156 | while ((line = readTemplate.ReadLine()) != null)
157 | {
158 | string[] input = line.Split(',');
159 | ListViewItem[] lvs = new ListViewItem[1];
160 | lvs[0] = new ListViewItem(new string[]
161 | {
162 | input[0],
163 | input[1],
164 | input[2],
165 | });
166 | listView1.Items.AddRange(lvs);
167 | }
168 | readTemplate.Close();
169 | }
170 | }
171 |
172 | private void ButtonDel_Click(object sender, EventArgs e)
173 | {
174 | foreach (ListViewItem eachItem in listView1.SelectedItems)
175 | {
176 | listView1.Items.Remove(eachItem);
177 | }
178 | }
179 |
180 | private void FormFAR_Load(object sender, EventArgs e)
181 | {
182 | if (File.Exists("FindAndReplace.tmp"))
183 | {
184 | string line = String.Empty;
185 | StreamReader readTMP = new StreamReader("FindAndReplace.tmp", Encoding.Default);
186 | while ((line = readTMP.ReadLine()) != null && line != String.Empty)
187 | {
188 | string[] input = line.Split(',');
189 | ListViewItem[] lvs = new ListViewItem[1];
190 | lvs[0] = new ListViewItem(new string[]
191 | {
192 | input[0],
193 | input[1],
194 | input[2],
195 | });
196 | listView1.Items.AddRange(lvs);
197 | }
198 | readTMP.Close();
199 | }
200 | }
201 | }
202 | }
203 |
--------------------------------------------------------------------------------
/FormFAR.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 17
122 |
123 |
124 | 159, 17
125 |
126 |
127 |
128 |
129 | AAABAAEAAAAAAAEAIABGCAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgCAAAA0xA/MQAAAAlw
130 | SFlzAAAOxAAADsQBlSsOGwA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CQRgCQRgDI
156 | r8OHD4d+CwKANAKANAKANAKANAJAfn39+jX0WxAApBEA8uvHjx+h34IAII0AII0AkJ1KpdLrIbQjAEgj
157 | AGTnzJkzibZPehuVfSAASCMASCMAZCfpFV6NRiPQSCIEAGkEAGkEgCwMDg6a2YULF+Js/Pbt26CDaUUA
158 | kEYAyML169fjbxz0fuhtCADSCADSCAABFYtFXxgZGYmz/ebmppnNz88HHNPfCADSCABB+HnP8fFxXx0Y
159 | GIjzV/V6PeCY/g8BQBoBQBoBIE3+aGszu3Pnju31QOzI0tKSLywsLAQa2G4IANIIAF2JPvL9RGe1Wo3/
160 | t6urq74wMzOT+sBiIgBIIwBIIwBYrVazlp2ZOIaHh7t5R//B8+PHj311a2urm1frBgFAGgHACoVC9G8g
161 | 29vbZjY7O+ur2Z/u3A0BQBoBQBoBIAg/x7+4uOirr1+/tp4e7O6GACCNACCNAJCMX7S1sbHhq9FjvNbX
162 | 181sZWXFV5vNZi9GlxgBQBoBHGRTU1O9HkLeEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCk
163 | EQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkHSqVSr0eA9AzzACQRgCQRgCQRgCQRgCQRgCQRgCQRgCQ
164 | RgCQRgCQRgCQRgCQRgCQRgCQ9i/FIco8cnWw6gAAAABJRU5ErkJggg==
165 |
166 |
167 |
--------------------------------------------------------------------------------
/FormLoading.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace oto2dvcfg
2 | {
3 | partial class FormLoading
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormLoading));
32 | this.label1 = new System.Windows.Forms.Label();
33 | this.panelLoadBack = new System.Windows.Forms.Panel();
34 | this.panelLoad = new System.Windows.Forms.Panel();
35 | this.SuspendLayout();
36 | //
37 | // label1
38 | //
39 | this.label1.AutoSize = true;
40 | this.label1.Font = new System.Drawing.Font("Adobe Fan Heiti Std B", 12F, System.Drawing.FontStyle.Bold);
41 | this.label1.ForeColor = System.Drawing.Color.White;
42 | this.label1.Location = new System.Drawing.Point(202, 15);
43 | this.label1.Name = "label1";
44 | this.label1.Size = new System.Drawing.Size(161, 20);
45 | this.label1.TabIndex = 0;
46 | this.label1.Text = "Loading, please wait";
47 | //
48 | // panelLoadBack
49 | //
50 | this.panelLoadBack.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42)))));
51 | this.panelLoadBack.Location = new System.Drawing.Point(52, 92);
52 | this.panelLoadBack.Name = "panelLoadBack";
53 | this.panelLoadBack.Size = new System.Drawing.Size(461, 12);
54 | this.panelLoadBack.TabIndex = 1;
55 | //
56 | // panelLoad
57 | //
58 | this.panelLoad.BackColor = System.Drawing.Color.Silver;
59 | this.panelLoad.Location = new System.Drawing.Point(52, 92);
60 | this.panelLoad.Name = "panelLoad";
61 | this.panelLoad.Size = new System.Drawing.Size(0, 12);
62 | this.panelLoad.TabIndex = 0;
63 | //
64 | // FormLoading
65 | //
66 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
67 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
68 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(27)))), ((int)(((byte)(27)))));
69 | this.ClientSize = new System.Drawing.Size(565, 139);
70 | this.Controls.Add(this.panelLoad);
71 | this.Controls.Add(this.panelLoadBack);
72 | this.Controls.Add(this.label1);
73 | this.Font = new System.Drawing.Font("Adobe Fan Heiti Std B", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
74 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
75 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
76 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
77 | this.MaximizeBox = false;
78 | this.MinimizeBox = false;
79 | this.Name = "FormLoading";
80 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
81 | this.Text = "FormLoading";
82 | this.Load += new System.EventHandler(this.FormLoading_Load);
83 | this.ResumeLayout(false);
84 | this.PerformLayout();
85 |
86 | }
87 |
88 | #endregion
89 |
90 | private System.Windows.Forms.Label label1;
91 | private System.Windows.Forms.Panel panelLoadBack;
92 | public System.Windows.Forms.Panel panelLoad;
93 | }
94 | }
--------------------------------------------------------------------------------
/FormLoading.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace oto2dvcfg
12 | {
13 | public partial class FormLoading : Form
14 | {
15 | public FormLoading()
16 | {
17 | InitializeComponent();
18 | //while (Form1.LoadingPerCentSend < 1)
19 | //{
20 | // panelLoad.Width = Convert.ToInt32(461 * Form1.LoadingPerCentSend);
21 | //}
22 | }
23 | private void FormLoading_Load(object sender, EventArgs e)
24 | {
25 |
26 | }
27 | public static void PCrefresh()
28 | {
29 | //461
30 |
31 | //Console.WriteLine(Form1.LoadingPerCentSend);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/FormLoading.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 |
123 | AAABAAEAAAAAAAEAIABGCAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgCAAAA0xA/MQAAAAlw
124 | SFlzAAAOxAAADsQBlSsOGwAAB/hJREFUeJzt3U1rE2sYh/FbOFQtUaFGsUZBwSQQfOlCCiK6qYKbFlwV
125 | /Ex+jS5cFwSFLlqEUHVThUJTioLia1qoLVW78SxunRPT03SmmWcy6f/6LWQGp8mzufLMTDIzh0qlkgGq
126 | /un1AIBeIgBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBISxZAuVwONA4gLcvLy/E3
127 | ZgaANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKAtJQDKBaLZjY0
128 | NBRn40ajke67d1CpVOJstra2ZmbNZjPwcJAXzACQRgCQlnIAtVrNzEZHR+Ns/PDhw3TfvYOJiYk4mz1/
129 | /tzM5ubmAg8HecEMAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkE
130 | AGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkE
131 | AGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEA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CkEQCkHSqVSr0eA9AzzACQRgCQRgCQRgCQRgCQRgCQRgCQRgCQ
158 | RgCQRgCQRgCQRgCQRgCQRgCQ9i/FIco8cnWw6gAAAABJRU5ErkJggg==
159 |
160 |
161 |
--------------------------------------------------------------------------------
/FormPreview.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace oto2dvcfg
2 | {
3 | partial class FormPreview
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormPreview));
32 | this.buttonClose = new System.Windows.Forms.Button();
33 | this.label1 = new System.Windows.Forms.Label();
34 | this.button1 = new System.Windows.Forms.Button();
35 | this.richTextBox1 = new System.Windows.Forms.RichTextBox();
36 | this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
37 | this.SuspendLayout();
38 | //
39 | // buttonClose
40 | //
41 | this.buttonClose.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("buttonClose.BackgroundImage")));
42 | this.buttonClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
43 | this.buttonClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
44 | this.buttonClose.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(27)))), ((int)(((byte)(27)))));
45 | this.buttonClose.Location = new System.Drawing.Point(877, 12);
46 | this.buttonClose.Name = "buttonClose";
47 | this.buttonClose.Size = new System.Drawing.Size(40, 40);
48 | this.buttonClose.TabIndex = 0;
49 | this.buttonClose.UseVisualStyleBackColor = true;
50 | this.buttonClose.Click += new System.EventHandler(this.ButtonClose_Click);
51 | //
52 | // label1
53 | //
54 | this.label1.AutoSize = true;
55 | this.label1.ForeColor = System.Drawing.Color.White;
56 | this.label1.Location = new System.Drawing.Point(13, 13);
57 | this.label1.Name = "label1";
58 | this.label1.Size = new System.Drawing.Size(125, 20);
59 | this.label1.TabIndex = 1;
60 | this.label1.Text = "DVCFG preview";
61 | this.label1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.FormPreview_MouseDown);
62 | this.label1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FormPreview_MouseMove);
63 | this.label1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.FormPreview_MouseUp);
64 | //
65 | // button1
66 | //
67 | this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
68 | this.button1.ForeColor = System.Drawing.Color.White;
69 | this.button1.Location = new System.Drawing.Point(12, 521);
70 | this.button1.Name = "button1";
71 | this.button1.Size = new System.Drawing.Size(859, 35);
72 | this.button1.TabIndex = 4;
73 | this.button1.Text = "Save!";
74 | this.button1.UseVisualStyleBackColor = true;
75 | this.button1.Click += new System.EventHandler(this.Button1_Click);
76 | //
77 | // richTextBox1
78 | //
79 | this.richTextBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
80 | this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
81 | this.richTextBox1.ForeColor = System.Drawing.Color.White;
82 | this.richTextBox1.Location = new System.Drawing.Point(17, 37);
83 | this.richTextBox1.Name = "richTextBox1";
84 | this.richTextBox1.ReadOnly = true;
85 | this.richTextBox1.Size = new System.Drawing.Size(854, 478);
86 | this.richTextBox1.TabIndex = 5;
87 | this.richTextBox1.Text = "";
88 | //
89 | // FormPreview
90 | //
91 | this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 20F);
92 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
93 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(27)))), ((int)(((byte)(27)))));
94 | this.ClientSize = new System.Drawing.Size(929, 568);
95 | this.Controls.Add(this.richTextBox1);
96 | this.Controls.Add(this.button1);
97 | this.Controls.Add(this.label1);
98 | this.Controls.Add(this.buttonClose);
99 | this.Font = new System.Drawing.Font("Microsoft JhengHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
100 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
101 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
102 | this.Margin = new System.Windows.Forms.Padding(5);
103 | this.Name = "FormPreview";
104 | this.Text = "FormPreview";
105 | this.Load += new System.EventHandler(this.FormPreview_Load);
106 | this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.FormPreview_MouseDown);
107 | this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FormPreview_MouseMove);
108 | this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.FormPreview_MouseUp);
109 | this.ResumeLayout(false);
110 | this.PerformLayout();
111 |
112 | }
113 |
114 | #endregion
115 |
116 | private System.Windows.Forms.Button buttonClose;
117 | private System.Windows.Forms.Label label1;
118 | private System.Windows.Forms.Button button1;
119 | private System.Windows.Forms.RichTextBox richTextBox1;
120 | private System.Windows.Forms.SaveFileDialog saveFileDialog1;
121 | }
122 | }
--------------------------------------------------------------------------------
/FormPreview.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using System.IO;
11 | using NAudio;
12 | using System.Globalization;
13 |
14 | namespace oto2dvcfg
15 | {
16 | public partial class FormPreview : Form
17 | {
18 | private bool mouseDown;
19 | private Point lastLocation;
20 | public string DVCFGoutput;
21 |
22 | public FormPreview()
23 | {
24 | InitializeComponent();
25 | }
26 | public void FormPreview_Load(object sender, EventArgs e)
27 | {
28 | string settings = String.Empty;
29 | if (Form1.sendtext.Length > 0)
30 | {
31 | settings = Form1.sendtext.Remove(Form1.sendtext.Length - 2);
32 | }
33 | else
34 | {
35 | MessageBox.Show("Failed to generate.", "(╯°□°)╯︵ ┻━┻", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
36 | this.Close();
37 | return;
38 | }
39 | richTextBox1.Text = "{\n" + settings + "\n" + "}";
40 | Form1.formLoading.Hide();
41 | }
42 |
43 | private void FormPreview_MouseDown(object sender, MouseEventArgs e)
44 | {
45 | mouseDown = true;
46 | lastLocation = e.Location;
47 | }
48 |
49 | private void FormPreview_MouseMove(object sender, MouseEventArgs e)
50 | {
51 | if (mouseDown)
52 | {
53 | this.Location = new Point(
54 | (this.Location.X - lastLocation.X) + e.X, (this.Location.Y - lastLocation.Y) + e.Y);
55 |
56 | this.Update();
57 | }
58 | }
59 |
60 | private void FormPreview_MouseUp(object sender, MouseEventArgs e)
61 | {
62 | mouseDown = false;
63 | }
64 |
65 | private void ButtonClose_Click(object sender, EventArgs e)
66 | {
67 | this.Close();
68 | }
69 |
70 | public static string[] dvcfgWriter
71 | (
72 | string wavPath,
73 | string[] srcType,
74 | string[] wavName,
75 | string[] symbol,
76 | string[] offset,
77 | string[] consonant,
78 | string[] cutoff,
79 | string[] Upreutterance,
80 | string[] Overlap,
81 | int otoLinesCount,
82 | string pitch
83 | )
84 | {
85 | List settings = new List();
86 | for (int i = 0; i < otoLinesCount+1; i++)
87 | {
88 | if (!File.Exists(wavPath + wavName[i])) continue;
89 | NAudio.Wave.WaveFileReader waveFileReader = new NAudio.Wave.WaveFileReader(wavPath + wavName[i]);
90 | TimeSpan wavTimeSpan = waveFileReader.TotalTime;
91 |
92 | dvcfgCalculator DC = new dvcfgCalculator
93 | {
94 | SrcType = srcType[i],
95 | Offset = Convert.ToDouble(offset[i]),
96 | Consonant = Convert.ToDouble(consonant[i]),
97 | Cutoff = Convert.ToDouble(cutoff[i]),
98 | UTAUPreutterance = Convert.ToDouble(Upreutterance[i]),
99 | Overlap = Convert.ToDouble(Overlap[i]),
100 | WavTime = Convert.ToDouble(wavTimeSpan.TotalSeconds) * 1000
101 | };
102 |
103 | switch (srcType[i])
104 | {
105 | case "CV":
106 | settings.Add(
107 | $" \"{pitch}->{DC.StartNoteDetact(symbol[i])}\" : {{\n" +
108 | $" \"connectPoint\" : {DC.ToString(DC.ConnectPoint)},\n" +
109 | $" \"endTime\" : {DC.ToString(DC.EndTime)},\n" +
110 | $" \"pitch\" : \"{pitch}\",\n" +
111 | $" \"preutterance\" : {DC.ToString(DC.DVPreuttrance)},\n" +
112 | $" \"srcType\" : \"CV\",\n" +
113 | $" \"startTime\" : {DC.ToString(DC.StartTime)},\n" +
114 | $" \"symbol\" : \"{DC.StartNoteDetact(symbol[i])}\",\n" +
115 | $" \"tailPoint\" : {DC.ToString(DC.TailPoint)},\n" +
116 | $" \"updateTime\" : \"{DC.UpdateTime}\",\n" +
117 | $" \"vowelEnd\" : {DC.ToString(DC.VowelEnd)},\n" +
118 | $" \"vowelStart\" : {DC.ToString(DC.VowelStart)},\n" +
119 | $" \"wavName\" : \"{wavName[i]}\"\n" +
120 | $" }},\n"
121 | );
122 | break;
123 | case "VX":
124 | settings.Add(
125 | $" \"{pitch}->{symbol[i].Replace(" ", "_")}\" : {{\n" +
126 | $" \"connectPoint\" : {DC.ToString(DC.ConnectPoint)},\n" +
127 | $" \"endTime\" : {DC.ToString(DC.EndTime)},\n" +
128 | $" \"pitch\" : \"{pitch}\",\n" +
129 | $" \"srcType\" : \"VX\",\n" +
130 | $" \"startTime\" : {DC.ToString(DC.StartTime)},\n" +
131 | $" \"symbol\" : \"{symbol[i].Replace(" ", "_")}\",\n" +
132 | $" \"tailPoint\" : {DC.ToString(DC.TailPoint)},\n" +
133 | $" \"updateTime\" : \"{DC.UpdateTime}\",\n" +
134 | $" \"wavName\" : \"{wavName[i]}\"\n" +
135 | $" }},\n"
136 | );
137 | break;
138 | case "INDIE":
139 | settings.Add(
140 | $" \"{pitch}->{symbol[i]}\" : {{\n" +
141 | $" \"endPoint\" : {DC.ToString(DC.VowelEnd + DC.ConnectPoint)},\n" +
142 | $" \"endTime\" : {DC.ToString(DC.EndTime)},\n" +
143 | $" \"pitch\" : \"{pitch}\",\n" +
144 | $" \"srcType\" : \"INDIE\",\n" +
145 | $" \"startPoint\" : {DC.ToString(DC.ConnectPoint)},\n" +
146 | $" \"startTime\" : {DC.ToString(DC.StartTime)},\n" +
147 | $" \"symbol\" : \"{symbol[i]}\",\n" +
148 | $" \"updateTime\" : \"{DC.UpdateTime}\",\n" +
149 | $" \"wavName\" : \"{wavName[i]}\"\n" +
150 | $" }},\n"
151 | );
152 | break;
153 | default:
154 | throw new Exception("Unable to parse src type");
155 | }
156 |
157 | DC.Clear();
158 | }
159 |
160 | return settings.ToArray();
161 | }
162 |
163 | private void Button1_Click(object sender, EventArgs e)
164 | {
165 | SaveFileDialog saveFileDialog1 = new SaveFileDialog();
166 | saveFileDialog1.Filter = "DeepVocal Config file|*.dvcfg";
167 | saveFileDialog1.Title = "Save DVCFG file";
168 | saveFileDialog1.FileName = "voice.dvcfg";
169 | if (saveFileDialog1.FileName != String.Empty)
170 | {
171 | if (saveFileDialog1.ShowDialog() == DialogResult.OK)
172 | {
173 | StreamWriter streamWriter = new StreamWriter(saveFileDialog1.FileName);
174 | streamWriter.WriteLine(richTextBox1.Text);
175 | streamWriter.Flush();
176 | streamWriter.Close();
177 | MessageBox.Show("Save success", "^_^", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
178 | this.Close();
179 | }
180 | else
181 | {
182 |
183 | }
184 | }
185 | }
186 | }
187 | }
188 |
--------------------------------------------------------------------------------
/FormPreview.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 |
123 | iVBORw0KGgoAAAANSUhEUgAAAEwAAABMCAYAAADHl1ErAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
124 | wwAADsMBx2+oZAAAAS1JREFUeF7t2kFOwzAQRuEcjSNwBMQREBydDUlobepfQhEFjzNFzcz7pCxSWVbm
125 | SfUmmQAAAAAAAAAAAID/syzLc7ke262beZ4f1nV9abcx1FifFx+e0Wqssuf76eKt/XxsitWGOnlF28SS
126 | Y0fbxpK90a7EkmNGK0Gefoolo9H+iPWlnGmvbflx9AxmjXaLPe+K54DhY4nHoGliyZ6B08WSkcHTxhJL
127 | gPSxpDcEsb7pifabVLFkNFrKWGKNljqW9EYjVkMwA/6SBhz6BqOxJFW0nlg1SM+a8NF6Y9UQlrVt+1hG
128 | AqSNtmfwdNE8Bk4TzXPQ8NFuMWDoaOWhec1mVYLwItdqG21vLLkSLdb3FYXr+bKJFiOW1GiesaRGC/e5
129 | EwAAAAAAAAAAAO7aNJ0Bv2Mltfrot+UAAAAASUVORK5CYII=
130 |
131 |
132 |
133 | 17, 17
134 |
135 |
136 |
137 | AAABAAEAAAAAAAEAIABGCAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgCAAAA0xA/MQAAAAlw
138 | SFlzAAAOxAAADsQBlSsOGwAAB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RgCQRgDI
164 | r8OHD4d+CwKANAKANAKANAKANAJAfn39+jX0WxAApBEA8uvHjx+h34IAII0AII0AkJ1KpdLrIbQjAEgj
165 | AGTnzJkzibZPehuVfSAASCMASCMAZCfpFV6NRiPQSCIEAGkEAGkEgCwMDg6a2YULF+Js/Pbt26CDaUUA
166 | kEYAyML169fjbxz0fuhtCADSCADSCAABFYtFXxgZGYmz/ebmppnNz88HHNPfCADSCABB+HnP8fFxXx0Y
167 | GIjzV/V6PeCY/g8BQBoBQBoBIE3+aGszu3Pnju31QOzI0tKSLywsLAQa2G4IANIIAF2JPvL9RGe1Wo3/
168 | t6urq74wMzOT+sBiIgBIIwBIIwBYrVazlp2ZOIaHh7t5R//B8+PHj311a2urm1frBgFAGgHACoVC9G8g
169 | 29vbZjY7O+ur2Z/u3A0BQBoBQBoBIAg/x7+4uOirr1+/tp4e7O6GACCNACCNAJCMX7S1sbHhq9FjvNbX
170 | 181sZWXFV5vNZi9GlxgBQBoBHGRTU1O9HkLeEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCk
171 | EQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkHSqVSr0eA9AzzACQRgCQRgCQRgCQRgCQRgCQRgCQRgCQ
172 | RgCQRgCQRgCQRgCQRgCQRgCQ9i/FIco8cnWw6gAAAABJRU5ErkJggg==
173 |
174 |
175 |
--------------------------------------------------------------------------------
/FormRule.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace oto2dvcfg
2 | {
3 | partial class FormRule
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormRule));
32 | this.textName = new System.Windows.Forms.TextBox();
33 | this.Pitch = new System.Windows.Forms.Label();
34 | this.textFind = new System.Windows.Forms.TextBox();
35 | this.label1 = new System.Windows.Forms.Label();
36 | this.textReplace = new System.Windows.Forms.TextBox();
37 | this.label2 = new System.Windows.Forms.Label();
38 | this.nfcButton1 = new oto2dvcfg.NFCButton();
39 | this.SuspendLayout();
40 | //
41 | // textName
42 | //
43 | this.textName.BackColor = System.Drawing.SystemColors.ControlLight;
44 | this.textName.BorderStyle = System.Windows.Forms.BorderStyle.None;
45 | this.textName.Font = new System.Drawing.Font("Microsoft JhengHei", 12F, System.Drawing.FontStyle.Bold);
46 | this.textName.ForeColor = System.Drawing.Color.Black;
47 | this.textName.Location = new System.Drawing.Point(86, 23);
48 | this.textName.Name = "textName";
49 | this.textName.Size = new System.Drawing.Size(157, 22);
50 | this.textName.TabIndex = 8;
51 | //
52 | // Pitch
53 | //
54 | this.Pitch.AutoSize = true;
55 | this.Pitch.BackColor = System.Drawing.Color.Transparent;
56 | this.Pitch.Font = new System.Drawing.Font("Adobe Fan Heiti Std B", 12F, System.Drawing.FontStyle.Bold);
57 | this.Pitch.ForeColor = System.Drawing.Color.Black;
58 | this.Pitch.ImeMode = System.Windows.Forms.ImeMode.NoControl;
59 | this.Pitch.Location = new System.Drawing.Point(12, 25);
60 | this.Pitch.Name = "Pitch";
61 | this.Pitch.Size = new System.Drawing.Size(52, 20);
62 | this.Pitch.TabIndex = 7;
63 | this.Pitch.Text = "Name";
64 | //
65 | // textFind
66 | //
67 | this.textFind.BackColor = System.Drawing.SystemColors.ControlLight;
68 | this.textFind.BorderStyle = System.Windows.Forms.BorderStyle.None;
69 | this.textFind.Font = new System.Drawing.Font("Microsoft JhengHei", 12F, System.Drawing.FontStyle.Bold);
70 | this.textFind.ForeColor = System.Drawing.Color.Black;
71 | this.textFind.Location = new System.Drawing.Point(86, 51);
72 | this.textFind.Name = "textFind";
73 | this.textFind.Size = new System.Drawing.Size(157, 22);
74 | this.textFind.TabIndex = 10;
75 | //
76 | // label1
77 | //
78 | this.label1.AutoSize = true;
79 | this.label1.BackColor = System.Drawing.Color.Transparent;
80 | this.label1.Font = new System.Drawing.Font("Adobe Fan Heiti Std B", 12F, System.Drawing.FontStyle.Bold);
81 | this.label1.ForeColor = System.Drawing.Color.Black;
82 | this.label1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
83 | this.label1.Location = new System.Drawing.Point(12, 53);
84 | this.label1.Name = "label1";
85 | this.label1.Size = new System.Drawing.Size(41, 20);
86 | this.label1.TabIndex = 9;
87 | this.label1.Text = "Find";
88 | //
89 | // textReplace
90 | //
91 | this.textReplace.BackColor = System.Drawing.SystemColors.ControlLight;
92 | this.textReplace.BorderStyle = System.Windows.Forms.BorderStyle.None;
93 | this.textReplace.Font = new System.Drawing.Font("Microsoft JhengHei", 12F, System.Drawing.FontStyle.Bold);
94 | this.textReplace.ForeColor = System.Drawing.Color.Black;
95 | this.textReplace.Location = new System.Drawing.Point(86, 79);
96 | this.textReplace.Name = "textReplace";
97 | this.textReplace.Size = new System.Drawing.Size(157, 22);
98 | this.textReplace.TabIndex = 12;
99 | //
100 | // label2
101 | //
102 | this.label2.AutoSize = true;
103 | this.label2.BackColor = System.Drawing.Color.Transparent;
104 | this.label2.Font = new System.Drawing.Font("Adobe Fan Heiti Std B", 12F, System.Drawing.FontStyle.Bold);
105 | this.label2.ForeColor = System.Drawing.Color.Black;
106 | this.label2.ImeMode = System.Windows.Forms.ImeMode.NoControl;
107 | this.label2.Location = new System.Drawing.Point(12, 81);
108 | this.label2.Name = "label2";
109 | this.label2.Size = new System.Drawing.Size(68, 20);
110 | this.label2.TabIndex = 11;
111 | this.label2.Text = "Replace";
112 | //
113 | // nfcButton1
114 | //
115 | this.nfcButton1.Location = new System.Drawing.Point(16, 110);
116 | this.nfcButton1.Name = "nfcButton1";
117 | this.nfcButton1.Size = new System.Drawing.Size(227, 30);
118 | this.nfcButton1.TabIndex = 13;
119 | this.nfcButton1.Text = "Add";
120 | this.nfcButton1.UseVisualStyleBackColor = true;
121 | this.nfcButton1.Click += new System.EventHandler(this.NfcButton1_Click);
122 | //
123 | // FormRule
124 | //
125 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
126 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
127 | this.BackColor = System.Drawing.SystemColors.Window;
128 | this.ClientSize = new System.Drawing.Size(261, 152);
129 | this.Controls.Add(this.nfcButton1);
130 | this.Controls.Add(this.textReplace);
131 | this.Controls.Add(this.label2);
132 | this.Controls.Add(this.textFind);
133 | this.Controls.Add(this.label1);
134 | this.Controls.Add(this.textName);
135 | this.Controls.Add(this.Pitch);
136 | this.Font = new System.Drawing.Font("Adobe Fan Heiti Std B", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
137 | this.ForeColor = System.Drawing.Color.Black;
138 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
139 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
140 | this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
141 | this.Name = "FormRule";
142 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
143 | this.Text = "Add rule...";
144 | this.Load += new System.EventHandler(this.FormRule_Load);
145 | this.ResumeLayout(false);
146 | this.PerformLayout();
147 |
148 | }
149 |
150 | #endregion
151 |
152 | private System.Windows.Forms.TextBox textName;
153 | private System.Windows.Forms.Label Pitch;
154 | private System.Windows.Forms.TextBox textFind;
155 | private System.Windows.Forms.Label label1;
156 | private System.Windows.Forms.TextBox textReplace;
157 | private System.Windows.Forms.Label label2;
158 | private NFCButton nfcButton1;
159 | }
160 | }
--------------------------------------------------------------------------------
/FormRule.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace oto2dvcfg
12 | {
13 | public partial class FormRule : Form
14 | {
15 | public static string sendtext = String.Empty;
16 | public static bool boolAdd = false;
17 | public static bool editMode = false;
18 | public static string ruleName = String.Empty;
19 | public static string ruleFind = String.Empty;
20 | public static string ruleReplace = String.Empty;
21 | public FormRule()
22 | {
23 | InitializeComponent();
24 | }
25 | private void FormRule_Load(object sender, EventArgs e)
26 | {
27 | FormRule formRule = new FormRule();
28 | if (editMode == true)
29 | {
30 | formRule.Text = "Edit rule";
31 | nfcButton1.Text = "Edit";
32 | textName.Text = ruleName;
33 | textFind.Text = ruleFind;
34 | textReplace.Text = ruleReplace;
35 | }
36 | else
37 | {
38 | textName.Text = String.Empty;
39 | textFind.Text = String.Empty;
40 | textReplace.Text = String.Empty;
41 | }
42 | nfcButton1.Focus();
43 | }
44 |
45 | private void NfcButton1_Click(object sender, EventArgs e)
46 | {
47 | if (!String.IsNullOrEmpty(textFind.Text))
48 | {
49 | sendtext = textName.Text + "," + textFind.Text + "," + textReplace.Text;
50 | Console.WriteLine(sendtext);
51 | boolAdd = true;
52 | this.Close();
53 | }
54 | else if(String.IsNullOrEmpty(textFind.Text))
55 | {
56 | MessageBox.Show("Find text box is empty!", "ヽ(≧□≦)ノ", MessageBoxButtons.OK, MessageBoxIcon.Warning);
57 | }
58 | else
59 | {
60 | MessageBox.Show("Invalid input!", "ヽ(≧□≦)ノ", MessageBoxButtons.OK, MessageBoxIcon.Error);
61 | }
62 | }
63 | public static void SetAdd2false()
64 | {
65 | boolAdd = false;
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/FormRule.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 |
123 | AAABAAEAAAAAAAEAIABGCAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgCAAAA0xA/MQAAAAlw
124 | SFlzAAAOxAAADsQBlSsOGwAAB/hJREFUeJzt3U1rE2sYh/FbOFQtUaFGsUZBwSQQfOlCCiK6qYKbFlwV
125 | /Ex+jS5cFwSFLlqEUHVThUJTioLia1qoLVW78SxunRPT03SmmWcy6f/6LWQGp8mzufLMTDIzh0qlkgGq
126 | /un1AIBeIgBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBIIwBISxZAuVwONA4gLcvLy/E3
127 | ZgaANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKANAKAtJQDKBaLZjY0
128 | NBRn40ajke67d1CpVOJstra2ZmbNZjPwcJAXzACQRgCQlnIAtVrNzEZHR+Ns/PDhw3TfvYOJiYk4mz1/
129 | /tzM5ubmAg8HecEMAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkE
130 | AGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkE
131 | AGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGkEAGk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T548sXwcIhMApBEApBEAfu+ZJHoyeXQv++jYN87t7KM9ogcPHpjZ
145 | 7Oysr6by4JL9IQBIIwD8/uyPHlyyP9euXTOzy5cv+2rnr599urh7966vfv/+3ReyP09KAJBGAJBGAEiH
146 | H8hGh7P+Ozz/PnhP9+7d84Xsf2tNAJBGAJBGAHsrl8u9HkL/8XNKP3/+9NVbt2512Dj6DmFsbMzMpqen
147 | A4/uPwQAaQSAgKInf166dMliXJtWrVbNrF6v+2oGv5YjAEgjAEgjAGTBj4knJyfjbHzjxg1fyOBomAAg
148 | jQCQBf+9XXQPlbYLiNuUSqUsxmRmBABxBABpBIDsrKys+ELnXaBCoeALft1ZokvVkiIASCMAZCfpzb+G
149 | hoaMGQAIhwAgjQCQnbW1tUTbnzhxItBIIgQAaQQAaQSA7OThbrhtCADSCAD5dfr06dBvQQCQRgCQRgDI
150 | r8OHD4d+CwKANAKANAKANAKANAJAfn39+jX0WxAApBEA8uvHjx+h34IAII0AII0AkJ1KpdLrIbQjAEgj
151 | AGTnzJkzibZPehuVfSAASCMASCMAZCfpFV6NRiPQSCIEAGkEAGkEgCwMDg6a2YULF+Js/Pbt26CDaUUA
152 | kEYAyML169fjbxz0fuhtCADSCADSCAABFYtFXxgZGYmz/ebmppnNz88HHNPfCADSCABB+HnP8fFxXx0Y
153 | GIjzV/V6PeCY/g8BQBoBQBoBIE3+aGszu3Pnju31QOzI0tKSLywsLAQa2G4IANIIAF2JPvL9RGe1Wo3/
154 | t6urq74wMzOT+sBiIgBIIwBIIwBYrVazlp2ZOIaHh7t5R//B8+PHj311a2urm1frBgFAGgHACoVC9G8g
155 | 29vbZjY7O+ur2Z/u3A0BQBoBQBoBIAg/x7+4uOirr1+/tp4e7O6GACCNACCNAJCMX7S1sbHhq9FjvNbX
156 | 181sZWXFV5vNZi9GlxgBQBoBHGRTU1O9HkLeEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCk
157 | EQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkEQCkHSqVSr0eA9AzzACQRgCQRgCQRgCQRgCQRgCQRgCQRgCQ
158 | RgCQRgCQRgCQRgCQRgCQRgCQ9i/FIco8cnWw6gAAAABJRU5ErkJggg==
159 |
160 |
161 |
--------------------------------------------------------------------------------
/FormWavDoesnotExists.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace oto2dvcfg
2 | {
3 | partial class FormWavDoesnotExists
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.label1 = new System.Windows.Forms.Label();
32 | this.listBox1 = new System.Windows.Forms.ListBox();
33 | this.label2 = new System.Windows.Forms.Label();
34 | this.buttonOK = new System.Windows.Forms.Button();
35 | this.SuspendLayout();
36 | //
37 | // label1
38 | //
39 | this.label1.AutoSize = true;
40 | this.label1.Font = new System.Drawing.Font("Adobe Fan Heiti Std B", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
41 | this.label1.Location = new System.Drawing.Point(12, 28);
42 | this.label1.Name = "label1";
43 | this.label1.Size = new System.Drawing.Size(326, 48);
44 | this.label1.TabIndex = 0;
45 | this.label1.Text = "The following wav files do not exist. \r\nPlease ensure that all wav files required" +
46 | " by the oto file\r\nare stored in the same folder as the oto file.";
47 | //
48 | // listBox1
49 | //
50 | this.listBox1.FormattingEnabled = true;
51 | this.listBox1.ItemHeight = 12;
52 | this.listBox1.Location = new System.Drawing.Point(12, 113);
53 | this.listBox1.Name = "listBox1";
54 | this.listBox1.Size = new System.Drawing.Size(377, 184);
55 | this.listBox1.TabIndex = 1;
56 | //
57 | // label2
58 | //
59 | this.label2.AutoSize = true;
60 | this.label2.Font = new System.Drawing.Font("Adobe Fan Heiti Std B", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
61 | this.label2.Location = new System.Drawing.Point(12, 95);
62 | this.label2.Name = "label2";
63 | this.label2.Size = new System.Drawing.Size(112, 15);
64 | this.label2.TabIndex = 2;
65 | this.label2.Text = "Unreadable wav list";
66 | //
67 | // buttonOK
68 | //
69 | this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.Cancel;
70 | this.buttonOK.Location = new System.Drawing.Point(314, 312);
71 | this.buttonOK.Name = "buttonOK";
72 | this.buttonOK.Size = new System.Drawing.Size(75, 23);
73 | this.buttonOK.TabIndex = 3;
74 | this.buttonOK.Text = "OK";
75 | this.buttonOK.UseVisualStyleBackColor = true;
76 | //
77 | // FormWavDoesnotExists
78 | //
79 | this.AcceptButton = this.buttonOK;
80 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
81 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
82 | this.CancelButton = this.buttonOK;
83 | this.ClientSize = new System.Drawing.Size(401, 347);
84 | this.Controls.Add(this.buttonOK);
85 | this.Controls.Add(this.label2);
86 | this.Controls.Add(this.listBox1);
87 | this.Controls.Add(this.label1);
88 | this.Name = "FormWavDoesnotExists";
89 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
90 | this.Text = "FormWavExists";
91 | this.Load += new System.EventHandler(this.FormWavDoesnotExists_Load);
92 | this.ResumeLayout(false);
93 | this.PerformLayout();
94 |
95 | }
96 |
97 | #endregion
98 |
99 | private System.Windows.Forms.Label label1;
100 | private System.Windows.Forms.ListBox listBox1;
101 | private System.Windows.Forms.Label label2;
102 | private System.Windows.Forms.Button buttonOK;
103 | }
104 | }
--------------------------------------------------------------------------------
/FormWavDoesnotExists.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace oto2dvcfg
12 | {
13 | public partial class FormWavDoesnotExists : Form
14 | {
15 | public static List notExistsList = new List();
16 | public FormWavDoesnotExists()
17 | {
18 | InitializeComponent();
19 | }
20 |
21 | private void FormWavDoesnotExists_Load(object sender, EventArgs e)
22 | {
23 | foreach (string notExists in notExistsList)
24 | {
25 | listBox1.Items.Add(notExists);
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/FormWavDoesnotExists.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/Logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/Logo.ico
--------------------------------------------------------------------------------
/Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/Logo.png
--------------------------------------------------------------------------------
/Logo.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/Logo.psd
--------------------------------------------------------------------------------
/MyCheckBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows.Forms;
7 |
8 | namespace oto2dvcfg
9 | {
10 | class MyCheckBox : CheckBox
11 | {
12 | protected override bool ShowFocusCues
13 | {
14 | get { return false; }
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/NFCButton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows.Forms;
7 |
8 | namespace oto2dvcfg
9 | {
10 | public class NFCButton : Button //NoFocusCueButton
11 | {
12 | protected override bool ShowFocusCues
13 | {
14 | get
15 | {
16 | return false;
17 | }
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace oto2dvcfg
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 應用程式的主要進入點。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 組件的一般資訊是由下列的屬性集控制。
6 | // 變更這些屬性的值即可修改組件的相關
7 | // 資訊。
8 | [assembly: AssemblyTitle("oto2dvcfg")]
9 | [assembly: AssemblyDescription("utau voicebank config to deepvocal voicebank config converter")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Taiwan VUS Team")]
12 | [assembly: AssemblyProduct("oto2dvcfg")]
13 | [assembly: AssemblyCopyright("Copyright © 2020 justln1113")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 將 ComVisible 設為 false 可對 COM 元件隱藏
18 | // 組件中的類型。若必須從 COM 存取此組件中的類型,
19 | // 的類型,請在該類型上將 ComVisible 屬性設定為 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID
23 | [assembly: Guid("46e07337-7525-45c8-92a6-d320ba7d5882")]
24 |
25 | // 組件的版本資訊由下列四個值所組成:
26 | //
27 | // 主要版本
28 | // 次要版本
29 | // 組建編號
30 | // 修訂編號
31 | //
32 | // 您可以指定所有的值,也可以使用 '*' 將組建和修訂編號
33 | // 設為預設,如下所示:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.3.1.0")]
36 | [assembly: AssemblyFileVersion("1.3.1.0")]
37 |
--------------------------------------------------------------------------------
/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 這段程式碼是由工具產生的。
4 | // 執行階段版本:4.0.30319.42000
5 | //
6 | // 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼,
7 | // 變更將會遺失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace oto2dvcfg.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 用於查詢當地語系化字串等的強類型資源類別。
17 | ///
18 | // 這個類別是自動產生的,是利用 StronglyTypedResourceBuilder
19 | // 類別透過 ResGen 或 Visual Studio 這類工具。
20 | // 若要加入或移除成員,請編輯您的 .ResX 檔,然後重新執行 ResGen
21 | // (利用 /str 選項),或重建您的 VS 專案。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 傳回這個類別使用的快取的 ResourceManager 執行個體。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("oto2dvcfg.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 覆寫目前執行緒的 CurrentUICulture 屬性,對象是所有
51 | /// 使用這個強類型資源類別的資源查閱。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
65 | ///
66 | internal static System.Drawing.Bitmap buttonAddActive {
67 | get {
68 | object obj = ResourceManager.GetObject("buttonAddActive", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
75 | ///
76 | internal static System.Drawing.Bitmap buttonAddNormal {
77 | get {
78 | object obj = ResourceManager.GetObject("buttonAddNormal", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 |
83 | ///
84 | /// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
85 | ///
86 | internal static System.Drawing.Bitmap buttonCloseActive {
87 | get {
88 | object obj = ResourceManager.GetObject("buttonCloseActive", resourceCulture);
89 | return ((System.Drawing.Bitmap)(obj));
90 | }
91 | }
92 |
93 | ///
94 | /// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
95 | ///
96 | internal static System.Drawing.Bitmap buttonCloseNormal {
97 | get {
98 | object obj = ResourceManager.GetObject("buttonCloseNormal", resourceCulture);
99 | return ((System.Drawing.Bitmap)(obj));
100 | }
101 | }
102 |
103 | ///
104 | /// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
105 | ///
106 | internal static System.Drawing.Bitmap checkHI2RONormal {
107 | get {
108 | object obj = ResourceManager.GetObject("checkHI2RONormal", resourceCulture);
109 | return ((System.Drawing.Bitmap)(obj));
110 | }
111 | }
112 |
113 | ///
114 | /// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
115 | ///
116 | internal static System.Drawing.Bitmap formBack {
117 | get {
118 | object obj = ResourceManager.GetObject("formBack", resourceCulture);
119 | return ((System.Drawing.Bitmap)(obj));
120 | }
121 | }
122 |
123 | ///
124 | /// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
125 | ///
126 | internal static System.Drawing.Bitmap Language {
127 | get {
128 | object obj = ResourceManager.GetObject("Language", resourceCulture);
129 | return ((System.Drawing.Bitmap)(obj));
130 | }
131 | }
132 |
133 | ///
134 | /// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
135 | ///
136 | internal static System.Drawing.Bitmap listBack {
137 | get {
138 | object obj = ResourceManager.GetObject("listBack", resourceCulture);
139 | return ((System.Drawing.Bitmap)(obj));
140 | }
141 | }
142 |
143 | ///
144 | /// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
145 | ///
146 | internal static System.Drawing.Bitmap otoPathBack {
147 | get {
148 | object obj = ResourceManager.GetObject("otoPathBack", resourceCulture);
149 | return ((System.Drawing.Bitmap)(obj));
150 | }
151 | }
152 | }
153 | }
154 |
--------------------------------------------------------------------------------
/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\UI resource\buttonCloseActive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | ..\UI resource\formBack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
128 | ..\UI resource\buttonAddNormal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
129 |
130 |
131 | ..\UI resource\buttonCloseNormal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
132 |
133 |
134 | ..\UI resource\buttonAddActive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
135 |
136 |
137 | ..\UI resource\Language.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
138 |
139 |
140 | ..\UI resource\otoPathBack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
141 |
142 |
143 | ..\UI resource\checkHI2RONormal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
144 |
145 |
146 | ..\UI resource\listBack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
147 |
148 |
--------------------------------------------------------------------------------
/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 這段程式碼是由工具產生的。
4 | // 執行階段版本:4.0.30319.42000
5 | //
6 | // 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼,
7 | // 變更將會遺失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace oto2dvcfg.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # oto2dvcfg
2 | A program for UTAU oto config to DeepVocal dvcfg config conversion.
3 | 一支可以把UTAU音源設定檔轉成DeepVocal音源設定檔的程式。
4 | [最新版本(latest version)](https://github.com/justln1113/oto2dvcfg/releases/download/Beta_V1.3.1/oto2dvcfg_Beta_V1.3.1.zip)
5 |
6 | **目錄 - Table of Contents**
7 | * [中文](#中文)
8 | * [使用教學](#使用教學)
9 | * [前置準備](#前置準備)
10 | * [開始轉換](#開始轉換)
11 | * [後續修正](#後續修正)
12 | * [注意事項]()
13 | * [開發教學]()
14 | * issues
15 | * 其他
16 | * [English](#English)
17 | * [User's guide](#User-guide)
18 | * [Preparation](#Preparation)
19 | * [Start convertion](#Start-convertion)
20 | ## 中文
21 |
22 | ### 使用教學
23 |
24 | #### 前置準備
25 |
26 | 請確保音源所有(單音階或單音色)wav檔和oto.ini在同一個資料夾下,且輸出的voice.dvcfg檔案也必須在同一個資料夾(因為voice.dvcfg的位置對應到了DeepVocal ToolBox的wav location)。
27 | 請勿直接轉換```Program files(x86)\UTAU\Voice```資料夾下的音源,避免權限錯誤。
28 | 
29 | >**提示**:可先刪除掉frq等引擎產生的週波數表
30 |
31 | #### 開始轉換
32 |
33 | >程式主畫面
34 |
35 | 
36 |
37 | 按下加號按鈕開啟oto.ini
38 | 
39 |
40 | 這裡使用```句音コノ。弱CVVC```A3音階的oto作為範例
41 | 
42 |
43 | ##### 列表編輯
44 | 選取後按右鍵可呼叫選單,有刪除和轉換格式等功能,這裡使用Delete select settings來刪除不必要的設定(也可直接按下鍵盤上的Delete按鍵)
45 | 
46 |
47 | ##### 尋找與取代
48 | 此功能可以透過新增```取代規則```對設定名稱(alias)進行尋找與取代,可利用此功能代換文字或移除掉前綴後綴等。
49 | >**注意**:目前此功能有尚未解決的bug,新增取代規則時一定要輸入名稱,否則無法取代。
50 | >**提示**:不同順序會有不同效果喔,程式進行取代的順序為由上往下,請注意新增規則的順序。
51 |
52 | 
53 |
54 | ##### 假名轉羅馬拼音
55 | 可用此功能將oto內帶假名的設定名稱轉換成羅馬拼音,在DeepVocal設定上會較為方便。
56 | 轉換器提供了兩種方案如下:
57 | - ```n to N```:將元音```ん```轉換為拼音```N```
58 | - ```consonant n to n'```:將連接音中的子音```n```(VC,如```a_na.....ra.wav```錄音的```a n```)轉換為```n'```(如```a n'```)
59 |
60 | 
61 | 
62 |
63 | ##### 音高定義
64 | 因為目前程式並無自動偵測前後綴來定義音高的功能,因此無論先前是否有移除前後綴,在生成dvcfg前請記得在Pitch文字框中輸入音高
65 | 
66 |
67 | ##### 輸出檔案
68 | 按下Generate!!之後,會出現預覽視窗,確認基本內容無誤後即可按下Save保存
69 | >**注意**:若要讓DeepVocal toolbox讀取,請將檔案命名為```voice.dvcfg```,並且請將voice.dvcfg與wav檔案放在同一個資料夾
70 |
71 | 
72 |
73 | #### 後續修正
74 |
75 |
76 | ## English
77 |
78 | ### User Guide
79 |
80 | #### Preparation
81 |
82 | Ensure that all the wav files and oto.ini are under the same folder.
83 | Don't direct convert voice bank under ```Program files(x86)\UTAU\Voice``` to avoid permission errors.
84 | 
85 |
86 | #### Start Convertion
87 |
88 | Program screenshot
89 | 
90 |
91 | Press the add button to open oto.ini file
92 | 
93 |
94 | Here we take ```Kuon kono。raku-CVVC (句音コノ。弱CVVC)``` oto on A3 for example.
95 | 
96 |
97 | ##### List Edit
98 | After picked and clicked right mouse botton, it can call the menu which has delete, form transform functions, etc. Here we used "Delete select settings" to remove unimportant settings.
99 | (You can also press the delete button on keyboard instead)
100 | 
101 |
102 | ##### Find and Replace
103 | Let alias can be replaced, removed prefixes or suffixes functions, ect., via adding ```Find and Replace rules```.
104 | >**Mention**:This function has an unsloved bug, which must enter rule name, or it can't be replaced.
105 | >**Hint**:Different orders have different results. The order of replacing is from top to bottom, please notice this when you adding rules.
106 | 
107 |
108 | ##### Hiragana to Romaji
109 | Let oto which have Hiragana setting alias can be transformed to Romaji. It can be helped when using DeepVocal settings.
110 | Converter has two plans:
111 | - ```n to N```: Convert vowel ```ん``` into ```N```.
112 | - ```Consonant n to n'```: Convert consonant ```n``` in VC part into ```n'```. (e.g. Convert ```a n``` alias in```a_na_ha_ma_ba_pa_ra.wav``` into ```a n'```)
113 |
114 | 
115 | 
116 |
117 | ##### Pitch definition
118 | Because this program can't detect prefixes or suffixes to definite the pitch automatically, before you start to create dvcfg, please enter pitch in the Pitch textbox no matter if you removed suffixes
119 | 
120 |
121 | ##### Output dvcfg
122 | It will appear a preview screen after clicked "Generate!!" botton. Click "Save" botton to save files if you ensure the content is correct.
123 | >**Mention**:If you want to let DeepVocal toolbox can read your files, please name your file ```voice.dvcfg```, and put your ```voice.dvcfg``` in same folder with wav files.
124 |
125 | 
126 |
--------------------------------------------------------------------------------
/Resource/Find_and_replace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/Resource/Find_and_replace.png
--------------------------------------------------------------------------------
/Resource/Two_hira2roma.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/Resource/Two_hira2roma.png
--------------------------------------------------------------------------------
/Resource/Two_hira2roma_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/Resource/Two_hira2roma_1.png
--------------------------------------------------------------------------------
/Resource/add_button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/Resource/add_button.png
--------------------------------------------------------------------------------
/Resource/oto2dvcfg_main_form.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/Resource/oto2dvcfg_main_form.png
--------------------------------------------------------------------------------
/Resource/oto_opened.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/Resource/oto_opened.png
--------------------------------------------------------------------------------
/Resource/right_click_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/Resource/right_click_menu.png
--------------------------------------------------------------------------------
/Resource/wav_and_oto_in_same_dir.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/Resource/wav_and_oto_in_same_dir.png
--------------------------------------------------------------------------------
/Resources/buttonAddActive.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/Resources/buttonAddActive.bmp
--------------------------------------------------------------------------------
/TransparentTextBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows.Forms;
7 | using System.Drawing;
8 |
9 | namespace oto2dvcfg
10 | {
11 | public partial class TransparentTextBox : TextBox
12 | {
13 | public TransparentTextBox()
14 | {
15 | SetStyle(ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint, true);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/UI resource/Language.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/UI resource/Language.png
--------------------------------------------------------------------------------
/UI resource/buttonAddActive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/UI resource/buttonAddActive.png
--------------------------------------------------------------------------------
/UI resource/buttonAddNormal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/UI resource/buttonAddNormal.png
--------------------------------------------------------------------------------
/UI resource/buttonAddNormal.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/UI resource/buttonAddNormal.psd
--------------------------------------------------------------------------------
/UI resource/buttonCloseActive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/UI resource/buttonCloseActive.png
--------------------------------------------------------------------------------
/UI resource/buttonCloseNormal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/UI resource/buttonCloseNormal.png
--------------------------------------------------------------------------------
/UI resource/checkHI2RONormal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/UI resource/checkHI2RONormal.png
--------------------------------------------------------------------------------
/UI resource/formBack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/UI resource/formBack.png
--------------------------------------------------------------------------------
/UI resource/listBack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/UI resource/listBack.png
--------------------------------------------------------------------------------
/UI resource/oto2dvfg.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/UI resource/oto2dvfg.psd
--------------------------------------------------------------------------------
/UI resource/otoPathBack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/UI resource/otoPathBack.png
--------------------------------------------------------------------------------
/dvcfgCalculator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using UTAUVoiceBankConfig;
7 |
8 | namespace oto2dvcfg
9 | {
10 | class dvcfgCalculator
11 | {
12 | #region Variables
13 | private double offset = 0;
14 | private bool offsetSetted = false;
15 | private double consonant = 0;
16 | private bool consonantSetted = false;
17 | private double cutoff = 0;
18 | private bool cutoffSetted = false;
19 | private double utauPreutterance = 0;
20 | private bool preutteranceSetted = false;
21 | private double overlap = 0;
22 | private bool overlapSetted = false;
23 | private double wavTime = 0;
24 | private bool wavTimeSetted = false;
25 |
26 | private double connectPoint = 0.05999999865889549;
27 | private double endTime = 0;
28 | private double deepVocalPreutterance = 0;
29 | private double startTime = 0;
30 | private double tailPoint = 0;
31 | private double vowelEnd = 0;
32 | private double vowelStart = 0;
33 | private string srcType = string.Empty;
34 | #endregion
35 |
36 | #region UTAU variables setting
37 | public double Offset
38 | {
39 | get
40 | {
41 | if (offsetSetted) return offset;
42 | else throw new Exception("Unable to get offset.");
43 | }
44 | set
45 | {
46 | offset = value;
47 | offsetSetted = true;
48 | }
49 | }
50 | public double Consonant
51 | {
52 | get
53 | {
54 | if (consonantSetted) return consonant;
55 | else throw new Exception("Unable to get consonant.");
56 | }
57 | set
58 | {
59 | consonant = value;
60 | consonantSetted = true;
61 | }
62 | }
63 | public double Cutoff
64 | {
65 | get
66 | {
67 | if (cutoffSetted) return cutoff;
68 | else throw new Exception("Unable to get cutoff.");
69 | }
70 | set
71 | {
72 | cutoff = value;
73 | cutoffSetted = true;
74 | }
75 | }
76 | public double UTAUPreutterance
77 | {
78 | get
79 | {
80 | if (preutteranceSetted) return utauPreutterance;
81 | else throw new Exception("Unable to get preuttrance.");
82 | }
83 | set
84 | {
85 | utauPreutterance = value;
86 | preutteranceSetted = true;
87 | }
88 | }
89 | public double Overlap
90 | {
91 | get
92 | {
93 | if (overlapSetted) return overlap;
94 | else throw new Exception("Unable to get overlap.");
95 | }
96 | set
97 | {
98 | overlap = value;
99 | overlapSetted = true;
100 | }
101 | }
102 |
103 | public double WavTime
104 | {
105 | get
106 | {
107 | if (wavTimeSetted) return wavTime;
108 | else throw new Exception("Unable to get wav time.");
109 | }
110 | set
111 | {
112 | wavTime = value;
113 | wavTimeSetted = true;
114 | }
115 | }
116 | public string SrcType
117 | {
118 | get
119 | {
120 | if (string.IsNullOrEmpty(srcType)) throw new Exception("Unable to get src type.");
121 | return srcType;
122 | }
123 | set
124 | {
125 | srcType = value;
126 | }
127 | }
128 | #endregion
129 |
130 | #region DeepVocal variables calculation
131 | public double ConnectPoint
132 | {
133 | get
134 | {
135 | return connectPoint;
136 | }
137 | }
138 | public double EndTime
139 | {
140 | get
141 | {
142 | if (!offsetSetted | !cutoffSetted | string.IsNullOrEmpty(srcType))
143 | throw new Exception("Variable exception");
144 |
145 | switch (srcType)
146 | {
147 | case "CV":
148 | return 0;
149 | case "VX":
150 | if (cutoff < 0) return offset / 1000 - cutoff / 1000 + connectPoint;
151 | else return wavTime / 1000 - offset / 1000 - cutoff / 1000 + connectPoint;
152 | case "INDIE":
153 | return 0;
154 | default:
155 | throw new Exception("Unable to parse src type");
156 | }
157 | }
158 | set
159 | {
160 | endTime = value;
161 | }
162 | }
163 | public double DVPreuttrance
164 | {
165 | get
166 | {
167 | if(!preutteranceSetted | !overlapSetted | string.IsNullOrEmpty(srcType))
168 | throw new Exception("Variable exception");
169 | switch (srcType)
170 | {
171 | case "CV":
172 | if (utauPreutterance == overlap) return utauPreutterance / 1000 + 0.06 + connectPoint;
173 | else return utauPreutterance / 1000 + 0.06;
174 | case "VX":
175 | throw new Exception("Preuttrance is not avilable in VX");
176 | case "INDIE":
177 | throw new Exception("Preuttrance is not avilable in INDIE");
178 | default:
179 | throw new Exception("Unable to parse src type");
180 | }
181 | }
182 | set
183 | {
184 | deepVocalPreutterance = value;
185 | }
186 | }
187 | public double StartTime
188 | {
189 | get
190 | {
191 | if(!offsetSetted | !overlapSetted | !preutteranceSetted | string.IsNullOrEmpty(srcType))
192 | throw new Exception("Variable exception");
193 | switch (srcType)
194 | {
195 | case "CV":
196 | if (utauPreutterance == overlap) return offset / 1000 - 0.06 - connectPoint;
197 | else return offset / 1000 - 0.06;
198 | case "VX":
199 | return offset / 1000 + overlap / 1000 - 0.06;
200 | case "INDIE":
201 | return offset / 1000 - connectPoint;
202 | default:
203 | throw new Exception("Unable to parse src type");
204 | }
205 | }
206 | set
207 | {
208 | startTime = value;
209 | }
210 | }
211 | public double TailPoint
212 | {
213 | get
214 | {
215 | if (!cutoffSetted || !overlapSetted || !preutteranceSetted || !consonantSetted || !wavTimeSetted)
216 | {
217 | throw new Exception("Variable exception");
218 | }
219 | switch (srcType)
220 | {
221 | case "CV":
222 | if (cutoff < 0)
223 | {
224 | if (utauPreutterance == overlap) return -cutoff / 1000 - Overlap / 1000 + 0.115 + connectPoint;
225 | else return -cutoff / 1000 - Overlap / 1000 + 0.115;
226 | }
227 | else
228 | {
229 | if (utauPreutterance == overlap) return wavTime / 1000 - offset / 1000 - cutoff / 1000 + 0.115 + connectPoint;
230 | else return wavTime / 1000 - offset / 1000 - cutoff / 1000 + 0.115;
231 | }
232 | case "VX":
233 | return consonant / 1000 - Overlap / 1000 + 0.06;
234 | case "INDIE":
235 | throw new Exception("VowelEnd is not avilable in INDIE");
236 | default:
237 | throw new Exception("Unable to parse src type");
238 | }
239 | }
240 | set
241 | {
242 | tailPoint = value;
243 | }
244 | }
245 | public double VowelEnd
246 | {
247 | get
248 | {
249 | if (!cutoffSetted | !preutteranceSetted | !overlapSetted | string.IsNullOrEmpty(srcType))
250 | throw new Exception("Variable exception");
251 | switch (srcType)
252 | {
253 | case "CV":
254 | if (cutoff < 0)
255 | {
256 | if (utauPreutterance == overlap) return -cutoff / 1000 - Overlap / 1000 + 0.06 + connectPoint;
257 | else return -cutoff / 1000 - overlap / 1000 + 0.06;
258 | }
259 | else
260 | {
261 | if (utauPreutterance == overlap) return wavTime / 1000 - offset / 1000 - cutoff / 1000 + 0.06 + connectPoint;
262 | else return wavTime / 1000 - offset / 1000 - cutoff / 1000 + 0.06;
263 | }
264 | case "VX":
265 | throw new Exception("VowelEnd is not avilable in VX");
266 | case "INDIE":
267 | if (cutoff < 0)
268 | {
269 | if (utauPreutterance == overlap) return -cutoff / 1000 - Overlap / 1000 + 0.06 + connectPoint;
270 | else return -cutoff / 1000 - overlap / 1000 + 0.06;
271 | }
272 | else
273 | {
274 | if (utauPreutterance == overlap) return wavTime / 1000 - offset / 1000 - cutoff / 1000 + 0.06 + connectPoint;
275 | else return wavTime / 1000 - offset / 1000 - cutoff / 1000 + 0.06;
276 | }
277 | default:
278 | throw new Exception("Unable to parse src type");
279 | }
280 | }
281 | set
282 | {
283 | vowelEnd = value;
284 | }
285 | }
286 | public double VowelStart
287 | {
288 | get
289 | {
290 | if (!consonantSetted | string.IsNullOrEmpty(srcType))
291 | throw new Exception("Variable exception");
292 | switch (srcType)
293 | {
294 | case "CV":
295 | if (utauPreutterance == overlap) return consonant / 1000 + 0.06 + connectPoint;
296 | else return consonant / 1000 + 0.06;
297 | case "VX":
298 | throw new Exception("VowelStart is not avilable in VX");
299 | case "INDIE":
300 | throw new Exception("VowelStart is not avilable in INDIE");
301 | default:
302 | throw new Exception("Unable to parse src type");
303 | }
304 | }
305 | set
306 | {
307 | vowelStart = value;
308 | }
309 | }
310 | #endregion
311 |
312 | public string UpdateTime
313 | {
314 | get
315 | {
316 | DateTime updateTime = DateTime.Now;
317 | return updateTime.ToString("yyyy-MM-dd HH:mm:ss");
318 | }
319 | }
320 | public string ToString (double input)
321 | {
322 | if (input > 1)
323 | {
324 | return input.ToString("F15").Replace("\n", "").Replace("\r", "").Replace("\t", "");
325 | }
326 | else
327 | {
328 | return input.ToString("F16").Replace("\n", "").Replace("\r", "").Replace("\t", "");
329 | }
330 | }
331 | public string StartNoteDetact(string input)
332 | {
333 | if (input.Contains(" ") && input.IndexOf("-") == 0) return input.Replace(" ", "");
334 | if (input.Contains(" ") && input.IndexOf("・") == 0) return input.Replace(" ", "");
335 | else return input;
336 | }
337 | ///
338 | /// Clear all variable.
339 | ///
340 | public void Clear()
341 | {
342 | offset = 0;
343 | offsetSetted = false;
344 | consonant = 0;
345 | consonantSetted = false;
346 | cutoff = 0;
347 | cutoffSetted = false;
348 | utauPreutterance = 0;
349 | preutteranceSetted = false;
350 | overlap = 0;
351 | overlapSetted = false;
352 | wavTime = 0;
353 | wavTimeSetted = false;
354 |
355 | connectPoint = 0.05999999865889549;
356 | endTime = 0;
357 | deepVocalPreutterance = 0;
358 | startTime = 0;
359 | tailPoint = 0;
360 | vowelEnd = 0;
361 | vowelStart = 0;
362 | }
363 | ///
364 | /// Reset all variable.
365 | ///
366 | public void Reset()
367 | {
368 | Clear();
369 | }
370 | }
371 | }
372 |
--------------------------------------------------------------------------------
/hi-ro.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/hi-ro.txt
--------------------------------------------------------------------------------
/oto.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/oto.ini
--------------------------------------------------------------------------------
/oto2dvcfg.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {46E07337-7525-45C8-92A6-D320BA7D5882}
8 | WinExe
9 | oto2dvcfg
10 | oto2dvcfg
11 | v4.0
12 | 512
13 | true
14 | true
15 |
16 |
17 |
18 | AnyCPU
19 | true
20 | full
21 | false
22 | bin\Debug\
23 | DEBUG;TRACE
24 | prompt
25 | 4
26 |
27 |
28 | AnyCPU
29 | pdbonly
30 | true
31 | bin\Release\
32 | TRACE
33 | prompt
34 | 4
35 |
36 |
37 | true
38 | bin\x64\Debug\
39 | DEBUG;TRACE
40 | full
41 | x64
42 | prompt
43 | MinimumRecommendedRules.ruleset
44 | true
45 | true
46 | true
47 |
48 |
49 | bin\x64\Release\
50 | TRACE
51 | true
52 | pdbonly
53 | x64
54 | prompt
55 | MinimumRecommendedRules.ruleset
56 | true
57 |
58 |
59 |
60 | Logo.ico
61 |
62 |
63 |
64 |
65 | False
66 | bin\Release\NAudio.dll
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | Component
84 |
85 |
86 |
87 | Form
88 |
89 |
90 | Form1.cs
91 |
92 |
93 | Form
94 |
95 |
96 | FormFAR.cs
97 |
98 |
99 | Form
100 |
101 |
102 | FormLoading.cs
103 |
104 |
105 | Form
106 |
107 |
108 | FormPreview.cs
109 |
110 |
111 | Form
112 |
113 |
114 | FormRule.cs
115 |
116 |
117 | Form
118 |
119 |
120 | FormWavDoesnotExists.cs
121 |
122 |
123 | Component
124 |
125 |
126 | Component
127 |
128 |
129 |
130 |
131 |
132 | Form1.cs
133 |
134 |
135 | Form1.cs
136 |
137 |
138 | FormFAR.cs
139 |
140 |
141 | FormLoading.cs
142 |
143 |
144 | FormPreview.cs
145 |
146 |
147 | FormRule.cs
148 |
149 |
150 | FormWavDoesnotExists.cs
151 |
152 |
153 | ResXFileCodeGenerator
154 | Resources.Designer.cs
155 | Designer
156 |
157 |
158 | True
159 | Resources.resx
160 | True
161 |
162 |
163 | SettingsSingleFileGenerator
164 | Settings.Designer.cs
165 |
166 |
167 | True
168 | Settings.settings
169 | True
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 | {c0ac9774-d17c-4b0b-9fef-962267d54d87}
196 | UTAUVoiceBankConfig
197 |
198 |
199 |
200 |
--------------------------------------------------------------------------------
/oto2dvcfg.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.28803.202
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "oto2dvcfg", "oto2dvcfg.csproj", "{46E07337-7525-45C8-92A6-D320BA7D5882}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UTAUVoiceBankConfig", "..\UTAUVoiceBankConfig\UTAUVoiceBankConfig.csproj", "{C0AC9774-D17C-4B0B-9FEF-962267D54D87}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Debug|x64 = Debug|x64
14 | Release|Any CPU = Release|Any CPU
15 | Release|x64 = Release|x64
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {46E07337-7525-45C8-92A6-D320BA7D5882}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {46E07337-7525-45C8-92A6-D320BA7D5882}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {46E07337-7525-45C8-92A6-D320BA7D5882}.Debug|x64.ActiveCfg = Debug|x64
21 | {46E07337-7525-45C8-92A6-D320BA7D5882}.Debug|x64.Build.0 = Debug|x64
22 | {46E07337-7525-45C8-92A6-D320BA7D5882}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {46E07337-7525-45C8-92A6-D320BA7D5882}.Release|Any CPU.Build.0 = Release|Any CPU
24 | {46E07337-7525-45C8-92A6-D320BA7D5882}.Release|x64.ActiveCfg = Release|x64
25 | {46E07337-7525-45C8-92A6-D320BA7D5882}.Release|x64.Build.0 = Release|x64
26 | {C0AC9774-D17C-4B0B-9FEF-962267D54D87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27 | {C0AC9774-D17C-4B0B-9FEF-962267D54D87}.Debug|Any CPU.Build.0 = Debug|Any CPU
28 | {C0AC9774-D17C-4B0B-9FEF-962267D54D87}.Debug|x64.ActiveCfg = Debug|Any CPU
29 | {C0AC9774-D17C-4B0B-9FEF-962267D54D87}.Debug|x64.Build.0 = Debug|Any CPU
30 | {C0AC9774-D17C-4B0B-9FEF-962267D54D87}.Release|Any CPU.ActiveCfg = Release|Any CPU
31 | {C0AC9774-D17C-4B0B-9FEF-962267D54D87}.Release|Any CPU.Build.0 = Release|Any CPU
32 | {C0AC9774-D17C-4B0B-9FEF-962267D54D87}.Release|x64.ActiveCfg = Release|Any CPU
33 | {C0AC9774-D17C-4B0B-9FEF-962267D54D87}.Release|x64.Build.0 = Release|Any CPU
34 | EndGlobalSection
35 | GlobalSection(SolutionProperties) = preSolution
36 | HideSolutionNode = FALSE
37 | EndGlobalSection
38 | GlobalSection(ExtensibilityGlobals) = postSolution
39 | SolutionGuid = {6060A0CB-E08D-4C6D-8AD3-73239994BB8C}
40 | EndGlobalSection
41 | EndGlobal
42 |
--------------------------------------------------------------------------------
/otoCHN.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justln1113/oto2dvcfg/6a312ab2683787f9be4a20f1e60fe5f5428cde44/otoCHN.ini
--------------------------------------------------------------------------------
/otoReader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace oto2dvcfg
9 | {
10 | class otoReader
11 | {
12 | public static string get_aliasType(string input)
13 | {
14 | string aliasType = String.Empty;
15 | if (input.Contains(" "))
16 | {
17 | if (input.Contains("-") || input.Contains("・"))
18 | {
19 | if ((input.IndexOf("-") > 1) || (input.IndexOf("・") > 1))
20 | {
21 | aliasType = "VX";
22 | }
23 | else
24 | {
25 | aliasType = "CV";
26 | }
27 |
28 | }
29 | else
30 | {
31 | aliasType = "VX";
32 | }
33 | }
34 | else
35 | {
36 | aliasType = "CV";
37 | }
38 |
39 | return aliasType;
40 | }
41 |
42 | public static string[] ReadDict()
43 | {
44 | StreamReader hi2roRead = new StreamReader("hi-ro.txt", System.Text.Encoding.Default); //讀取假名轉羅馬字典檔
45 | string[] output = hi2roRead.ReadToEnd().Split('\n');
46 | hi2roRead.Close();
47 | return output;
48 | }
49 |
50 | public static string[] ReadDict_n()
51 | {
52 | StreamReader hi2roRead = new StreamReader("hi-ro-n.txt", System.Text.Encoding.Default); //讀取假名轉羅馬字典檔
53 | string[] output = hi2roRead.ReadToEnd().Split('\n');
54 | hi2roRead.Close();
55 | return output;
56 | }
57 |
58 | public static int lineCount(string path)
59 | {
60 | StreamReader counter = new StreamReader(path, System.Text.Encoding.Default);
61 | int otoLinesCount = counter.ReadToEnd().Split('\n').Length - 1; //計算oto行數
62 | return otoLinesCount;
63 | }
64 |
65 | public static string FindAndReplace(string input)
66 | {
67 | if (File.Exists("FindAndReplace.tmp"))
68 | {
69 | string line = String.Empty;
70 | StreamReader readTMP = new StreamReader("FindAndReplace.tmp", Encoding.Default);
71 | while ((line = readTMP.ReadLine()) != null && line != String.Empty)
72 | {
73 | if (!String.IsNullOrEmpty(line))
74 | {
75 | string[] D = line.Split(',');
76 | input = input.Replace(D[1], D[2]);
77 | }
78 | else
79 | {
80 | continue;
81 | }
82 | }
83 | readTMP.Close();
84 | }
85 | return input;
86 | }
87 |
88 | public static string hi2ro(string input)
89 | {
90 | foreach (string lineDict in ReadDict())
91 | {
92 | string[] D = lineDict.Split('=');
93 | input = input.Replace(D[0], D[1]);
94 | }
95 | return input;
96 | }
97 |
98 | public static string hi2ron(string input, string aliasType)
99 | {
100 | List replaceN = new List();
101 | replaceN.Add("ん");
102 | replaceN.Add("n");
103 | foreach (string lineDict in ReadDict_n())
104 | {
105 | if (input.Contains(" ") && input.IndexOf("y", input.IndexOf(" ")) >= 1) continue;
106 | string[] D = lineDict.Split('=');
107 | input = input.Replace(D[0], D[1]);
108 | }
109 | foreach (string lineDict in ReadDict())
110 | {
111 | string[] D = lineDict.Split('=');
112 | input = input.Replace(D[0], D[1].Replace("N", "n"));
113 | }
114 | return input;
115 | }
116 |
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/otoSpliter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Runtime.InteropServices;
7 |
8 | namespace oto2dvcfg
9 | {
10 | class otoSpliter
11 | {
12 |
13 |
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/tranListView.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows.Forms;
7 |
8 | namespace oto2dvcfg
9 | {
10 | public class tranListView : ListView
11 | {
12 | public void TransparantBackground()
13 | {
14 | this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------