├── ReadMe.txt ├── Source ├── TS4Editor.ico ├── TS4 STBL Editor.v12.suo ├── s4piDLLs │ ├── s4pi.Commons.dll │ ├── s4pi.Helpers.dll │ ├── s4pi.Package.dll │ ├── System.Custom.dll │ ├── s4pi.Controls.dll │ ├── s4pi.Filetable.dll │ ├── s4pi.Settings.dll │ ├── s4pi.CustomForms.dll │ ├── s4pi.DataResource.dll │ ├── s4pi.Extensions.dll │ ├── s4pi.Interfaces.dll │ ├── s4pi.JazzResource.dll │ ├── s4pi.MeshChunks.dll │ ├── s4pi.RCOLChunks.dll │ ├── s4pi.RigResource.dll │ ├── s4pi.StblResource.dll │ ├── s4pi.TextResource.dll │ ├── s4pi.TxtcResource.dll │ ├── s4pi.ImageResource.dll │ ├── s4pi.WrapperDealer.dll │ ├── s4pi.CASPartResource.dll │ ├── s4pi.CatalogResource.dll │ ├── s4pi.ComplateResource.dll │ ├── s4pi.DefaultResource.dll │ ├── s4pi.ModularResource.dll │ ├── s4pi.NameMapResource.dll │ ├── s4pi.Resource.Commons.dll │ ├── s4pi.AnimationResources.dll │ ├── s4pi.GenericRCOLResource.dll │ ├── s4pi.NGMPHashMapResource.dll │ └── s4pi.MiscellaneousResources.dll ├── MTS_ArtUrlWWW_FNVHasherDLL.dll ├── Resources │ └── Imgs │ │ └── howToCopyMultipleRows.gif ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── app.manifest │ └── Resources.resx ├── StringHolder.cs ├── HowToCopyMultipleRows.cs ├── Program.cs ├── AboutEditorForm.cs ├── TS4 STBL Editor.sln ├── LangCodesHelp.cs ├── LangCodesList.xml ├── SelectSTBLfileinPackage.cs ├── StringPicker.cs ├── HowToCopyMultipleRows.Designer.cs ├── SelectSTBLfileinPackage.Designer.cs ├── LangCodesHelp.Designer.cs ├── AboutEditorForm.Designer.cs ├── StringPicker.Designer.cs ├── .gitignore ├── AddString.Designer.cs ├── HowToCopyMultipleRows.resx ├── SelectSTBLfileinPackage.resx ├── AboutEditorForm.en.resx ├── LangCodesHelp.zh-Hans.resx ├── LangCodesHelp.zh-Hant.resx ├── AboutEditorForm.zh-Hans.resx ├── AboutEditorForm.zh-Hant.resx ├── StringPicker.zh-Hans.resx ├── StringPicker.zh-Hant.resx ├── AddString.cs ├── LangCodesHelp.resx ├── StringPicker.resx ├── Editor.Designer.cs ├── AboutEditorForm.resx ├── AddString.en.resx ├── Editor.cs └── TS4 STBL Editor.csproj ├── README.md └── LICENSE /ReadMe.txt: -------------------------------------------------------------------------------- 1 | FNVHasherDLL is here https://github.com/KhArtNJava/FNVHasherDLL -------------------------------------------------------------------------------- /Source/TS4Editor.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/TS4Editor.ico -------------------------------------------------------------------------------- /Source/TS4 STBL Editor.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/TS4 STBL Editor.v12.suo -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.Commons.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.Commons.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.Helpers.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.Package.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.Package.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/System.Custom.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/System.Custom.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.Controls.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.Controls.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.Filetable.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.Filetable.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.Settings.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.Settings.dll -------------------------------------------------------------------------------- /Source/MTS_ArtUrlWWW_FNVHasherDLL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/MTS_ArtUrlWWW_FNVHasherDLL.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.CustomForms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.CustomForms.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.DataResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.DataResource.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.Extensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.Extensions.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.Interfaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.Interfaces.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.JazzResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.JazzResource.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.MeshChunks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.MeshChunks.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.RCOLChunks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.RCOLChunks.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.RigResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.RigResource.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.StblResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.StblResource.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.TextResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.TextResource.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.TxtcResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.TxtcResource.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.ImageResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.ImageResource.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.WrapperDealer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.WrapperDealer.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.CASPartResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.CASPartResource.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.CatalogResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.CatalogResource.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.ComplateResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.ComplateResource.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.DefaultResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.DefaultResource.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.ModularResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.ModularResource.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.NameMapResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.NameMapResource.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.Resource.Commons.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.Resource.Commons.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.AnimationResources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.AnimationResources.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.GenericRCOLResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.GenericRCOLResource.dll -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.NGMPHashMapResource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.NGMPHashMapResource.dll -------------------------------------------------------------------------------- /Source/Resources/Imgs/howToCopyMultipleRows.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/Resources/Imgs/howToCopyMultipleRows.gif -------------------------------------------------------------------------------- /Source/s4piDLLs/s4pi.MiscellaneousResources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbatch/TS4-STBL-Editor/HEAD/Source/s4piDLLs/s4pi.MiscellaneousResources.dll -------------------------------------------------------------------------------- /Source/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Source/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Source/StringHolder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace TS4_STBL_Editor 8 | { 9 | public class StringHolder 10 | { 11 | public String textIDFld = ""; 12 | public String displayTextFld = ""; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/HowToCopyMultipleRows.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 TS4_STBL_Editor 12 | { 13 | public partial class HowToCopyMultipleRows : Form 14 | { 15 | public HowToCopyMultipleRows() 16 | { 17 | InitializeComponent(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Source/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 TS4_STBL_Editor 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 MainUI()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Source/AboutEditorForm.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 TS4_STBL_Editor 12 | { 13 | public partial class AboutEditorForm : Form 14 | { 15 | public AboutEditorForm() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | private void button1_Click(object sender, EventArgs e) 21 | { 22 | Close(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | TS4 STBL Editor 2 | =============== 3 | You can translate the strings in STBL file with this tool. 4 | Home page: http://arturlwww.tumblr.com/post/162176967969/ts4-stbl-editor 5 | 6 | 7 | License 8 | ---- 9 | You can refer to the LICENSE file. 10 | 11 | 12 | System Requrements 13 | ---- 14 | Windows Vista and Windows 7: .Net Framework 4.5
15 | 16 | Windows 8 and above: None
17 | (.NET Framework 4.5 is already a component of Windows 8.x)
18 | 19 | Development Tool 20 | ---- 21 | Visual Studio 2013, or Visual Studio Express 2013 for Windows Desktop 22 | 23 | 24 | Available GUI Languages 25 | ---- 26 | 31 | -------------------------------------------------------------------------------- /Source/TS4 STBL Editor.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TS4 STBL Editor", "TS4 STBL Editor.csproj", "{8DB258C2-72B6-4A6F-ADCD-5B0ECFA78764}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {8DB258C2-72B6-4A6F-ADCD-5B0ECFA78764}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {8DB258C2-72B6-4A6F-ADCD-5B0ECFA78764}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {8DB258C2-72B6-4A6F-ADCD-5B0ECFA78764}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {8DB258C2-72B6-4A6F-ADCD-5B0ECFA78764}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Source/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.18444 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace TS4_STBL_Editor.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.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 | -------------------------------------------------------------------------------- /Source/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过以下 6 | // 特性集控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("TS4 STBL Editor")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("ArtUrlWWW")] 12 | [assembly: AssemblyProduct("TS4 STBL Editor")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("93ca26b5-fd7c-4d0d-8010-4b5e6ce49ba7")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("11.0.0.0")] 36 | [assembly: AssemblyFileVersion("11.0.0.0")] 37 | -------------------------------------------------------------------------------- /Source/LangCodesHelp.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.Reflection; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | using System.Windows.Forms; 12 | 13 | namespace TS4_STBL_Editor 14 | { 15 | public partial class LangCodesHelp : Form 16 | { 17 | public LangCodesHelp() 18 | { 19 | InitializeComponent(); 20 | } 21 | 22 | private void LangCodesHelp_Load(object sender, EventArgs e) 23 | { 24 | var assembly = Assembly.GetExecutingAssembly(); 25 | var resourceName = "TS4_STBL_Editor.LangCodesList.xml"; 26 | 27 | using (Stream stream = assembly.GetManifestResourceStream(resourceName)) 28 | using (StreamReader reader = new StreamReader(stream)) 29 | { 30 | string result = reader.ReadToEnd(); 31 | 32 | TextReader tr = new StringReader(result); 33 | 34 | LangCodesDS.ReadXml(tr); 35 | 36 | dataGridView1.DataSource = LangCodesDS; 37 | dataGridView1.DataMember = "lang"; 38 | } 39 | 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Source/LangCodesList.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 0x00 5 | ENG_US 6 | 7 | 8 | 0x02 9 | CHT_CN 10 | 11 | 12 | 0x03 13 | CZE_CZ 14 | 15 | 16 | 0x04 17 | DAN_DK 18 | 19 | 20 | 0x05 21 | DUT_NL 22 | 23 | 24 | 0x06 25 | FIN_FI 26 | 27 | 28 | 0x07 29 | FRE_FR 30 | 31 | 32 | 0x08 33 | GER_DE 34 | 35 | 36 | 0x0B 37 | ITA_IT 38 | 39 | 40 | 0x0C 41 | JPN_JP 42 | 43 | 44 | 0x0D 45 | KOR_KR 46 | 47 | 48 | 0x0E 49 | NOR_NO 50 | 51 | 52 | 0x0F 53 | POL_PL 54 | 55 | 56 | 0x11 57 | POR_BR 58 | 59 | 60 | 0x12 61 | RUS_RU 62 | 63 | 64 | 0x13 65 | SPA_ES 66 | 67 | 68 | 0x15 69 | SWE_SE 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, cnbatch & C major 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the cnbatch & C major nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | -------------------------------------------------------------------------------- /Source/SelectSTBLfileinPackage.cs: -------------------------------------------------------------------------------- 1 | using s4pi.Interfaces; 2 | using s4pi.WrapperDealer; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.ComponentModel; 6 | using System.Data; 7 | using System.Drawing; 8 | using System.Linq; 9 | using System.Numerics; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | using System.Windows.Forms; 13 | 14 | namespace TS4_STBL_Editor 15 | { 16 | public partial class SelectSTBLfileinPackage : Form 17 | { 18 | List lrie; 19 | IPackage imppkg; 20 | 21 | public string selectedElement = ""; 22 | 23 | public SelectSTBLfileinPackage(List lrieInp, IPackage imppkgInp) 24 | { 25 | InitializeComponent(); 26 | 27 | this.lrie = lrieInp; 28 | this.imppkg = imppkgInp; 29 | 30 | foreach (IResourceIndexEntry rie in lrie) 31 | { 32 | IResource res = WrapperDealer.GetResource(0, imppkg, rie, true); 33 | 34 | BigInteger bi = BigInteger.Parse(rie.Instance.ToString()); 35 | 36 | String fileName = "0x"+bi.ToString("X"); 37 | 38 | 39 | listBox1.Items.Add(fileName); 40 | } 41 | } 42 | 43 | private void button1_Click(object sender, EventArgs e) 44 | { 45 | selectedElement = listBox1.SelectedItem.ToString(); 46 | this.Close(); 47 | } 48 | 49 | private void listBox1_DoubleClick(object sender, EventArgs e) 50 | { 51 | selectedElement = listBox1.SelectedItem.ToString(); 52 | this.Close(); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Source/StringPicker.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 TS4_STBL_Editor 12 | { 13 | public partial class StringPicker : Form 14 | { 15 | private AddString addstr; 16 | 17 | public StringPicker(AddString addstrInp) 18 | { 19 | addstr = addstrInp; 20 | InitializeComponent(); 21 | } 22 | 23 | private void StringPicker_Load(object sender, EventArgs e) 24 | { 25 | reloadListView(); 26 | } 27 | 28 | private void reloadListView() 29 | { 30 | listView1.Items.Clear(); 31 | listView1.View = View.List; 32 | for (int x = 0; x < MainUI.copiedValuesStrHolders.Count; x++) 33 | { 34 | StringHolder sh = MainUI.copiedValuesStrHolders[x]; 35 | listView1.Items.Add(sh.textIDFld + " - " + sh.displayTextFld); 36 | 37 | } 38 | } 39 | 40 | private void listView1_MouseClick(object sender, MouseEventArgs e) 41 | { 42 | if (listView1.SelectedIndices.Count > 0) 43 | { 44 | if (e.Button == MouseButtons.Left) 45 | { 46 | if (addstr != null) 47 | { 48 | addstr.setFldsValues(MainUI.copiedValuesStrHolders[listView1.SelectedIndices[0]]); 49 | } 50 | } 51 | else 52 | { 53 | MainUI.copiedValuesStrHolders.RemoveAt(listView1.SelectedIndices[0]); 54 | reloadListView(); 55 | } 56 | } 57 | } 58 | 59 | private void listView1_MouseDoubleClick(object sender, MouseEventArgs e) 60 | { 61 | if (addstr != null) 62 | { 63 | addstr.setFldsValues(MainUI.copiedValuesStrHolders[listView1.SelectedIndices[0]]); 64 | } 65 | 66 | this.Close(); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Source/HowToCopyMultipleRows.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace TS4_STBL_Editor 2 | { 3 | partial class HowToCopyMultipleRows 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.pictureBox1 = new System.Windows.Forms.PictureBox(); 32 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 33 | this.SuspendLayout(); 34 | // 35 | // pictureBox1 36 | // 37 | this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill; 38 | this.pictureBox1.Image = global::TS4_STBL_Editor.Properties.Resources.howToCopyMultipleRows; 39 | this.pictureBox1.Location = new System.Drawing.Point(0, 0); 40 | this.pictureBox1.Name = "pictureBox1"; 41 | this.pictureBox1.Size = new System.Drawing.Size(784, 521); 42 | this.pictureBox1.TabIndex = 0; 43 | this.pictureBox1.TabStop = false; 44 | // 45 | // HowToCopyMultipleRows 46 | // 47 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 48 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 49 | this.ClientSize = new System.Drawing.Size(784, 521); 50 | this.Controls.Add(this.pictureBox1); 51 | this.Name = "HowToCopyMultipleRows"; 52 | this.Text = "HowToCopyMultipleRows"; 53 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 54 | this.ResumeLayout(false); 55 | 56 | } 57 | 58 | #endregion 59 | 60 | private System.Windows.Forms.PictureBox pictureBox1; 61 | } 62 | } -------------------------------------------------------------------------------- /Source/SelectSTBLfileinPackage.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace TS4_STBL_Editor 2 | { 3 | partial class SelectSTBLfileinPackage 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.listBox1 = new System.Windows.Forms.ListBox(); 32 | this.button1 = new System.Windows.Forms.Button(); 33 | this.SuspendLayout(); 34 | // 35 | // listBox1 36 | // 37 | this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 38 | | System.Windows.Forms.AnchorStyles.Left) 39 | | System.Windows.Forms.AnchorStyles.Right))); 40 | this.listBox1.FormattingEnabled = true; 41 | this.listBox1.Location = new System.Drawing.Point(12, 12); 42 | this.listBox1.Name = "listBox1"; 43 | this.listBox1.Size = new System.Drawing.Size(260, 212); 44 | this.listBox1.TabIndex = 0; 45 | this.listBox1.DoubleClick += new System.EventHandler(this.listBox1_DoubleClick); 46 | // 47 | // button1 48 | // 49 | this.button1.Location = new System.Drawing.Point(100, 230); 50 | this.button1.Name = "button1"; 51 | this.button1.Size = new System.Drawing.Size(75, 23); 52 | this.button1.TabIndex = 1; 53 | this.button1.Text = "Submit"; 54 | this.button1.UseVisualStyleBackColor = true; 55 | this.button1.Click += new System.EventHandler(this.button1_Click); 56 | // 57 | // SelectSTBLfileinPackage 58 | // 59 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 60 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 61 | this.ClientSize = new System.Drawing.Size(284, 261); 62 | this.Controls.Add(this.button1); 63 | this.Controls.Add(this.listBox1); 64 | this.Name = "SelectSTBLfileinPackage"; 65 | this.Text = "SelectSTBLfileinPackageForm"; 66 | this.ResumeLayout(false); 67 | 68 | } 69 | 70 | #endregion 71 | 72 | private System.Windows.Forms.ListBox listBox1; 73 | private System.Windows.Forms.Button button1; 74 | } 75 | } -------------------------------------------------------------------------------- /Source/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace TS4_STBL_Editor.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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 | /// Returns the cached ResourceManager instance used by this class. 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("TS4_STBL_Editor.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 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 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap howToCopyMultipleRows { 67 | get { 68 | object obj = ResourceManager.GetObject("howToCopyMultipleRows", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Source/LangCodesHelp.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace TS4_STBL_Editor 2 | { 3 | partial class LangCodesHelp 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.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LangCodesHelp)); 33 | this.dataGridView1 = new System.Windows.Forms.DataGridView(); 34 | this.LangCodesDS = new System.Data.DataSet(); 35 | this.aboutEditorFormBindingSource = new System.Windows.Forms.BindingSource(this.components); 36 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); 37 | ((System.ComponentModel.ISupportInitialize)(this.LangCodesDS)).BeginInit(); 38 | ((System.ComponentModel.ISupportInitialize)(this.aboutEditorFormBindingSource)).BeginInit(); 39 | this.SuspendLayout(); 40 | // 41 | // dataGridView1 42 | // 43 | resources.ApplyResources(this.dataGridView1, "dataGridView1"); 44 | this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 45 | this.dataGridView1.Name = "dataGridView1"; 46 | // 47 | // LangCodesDS 48 | // 49 | this.LangCodesDS.DataSetName = "LangCodesDS"; 50 | // 51 | // LangCodesHelp 52 | // 53 | resources.ApplyResources(this, "$this"); 54 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 55 | this.Controls.Add(this.dataGridView1); 56 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 57 | this.MaximizeBox = false; 58 | this.MinimizeBox = false; 59 | this.Name = "LangCodesHelp"; 60 | this.Load += new System.EventHandler(this.LangCodesHelp_Load); 61 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); 62 | ((System.ComponentModel.ISupportInitialize)(this.LangCodesDS)).EndInit(); 63 | ((System.ComponentModel.ISupportInitialize)(this.aboutEditorFormBindingSource)).EndInit(); 64 | this.ResumeLayout(false); 65 | 66 | } 67 | 68 | #endregion 69 | 70 | private System.Windows.Forms.DataGridView dataGridView1; 71 | private System.Windows.Forms.BindingSource aboutEditorFormBindingSource; 72 | private System.Data.DataSet LangCodesDS; 73 | } 74 | } -------------------------------------------------------------------------------- /Source/AboutEditorForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace TS4_STBL_Editor 2 | { 3 | partial class AboutEditorForm 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(AboutEditorForm)); 32 | this.label1 = new System.Windows.Forms.Label(); 33 | this.label2 = new System.Windows.Forms.Label(); 34 | this.textBox1 = new System.Windows.Forms.TextBox(); 35 | this.button1 = new System.Windows.Forms.Button(); 36 | this.SuspendLayout(); 37 | // 38 | // label1 39 | // 40 | resources.ApplyResources(this.label1, "label1"); 41 | this.label1.Name = "label1"; 42 | this.label1.UseMnemonic = false; 43 | // 44 | // label2 45 | // 46 | resources.ApplyResources(this.label2, "label2"); 47 | this.label2.Name = "label2"; 48 | this.label2.UseMnemonic = false; 49 | // 50 | // textBox1 51 | // 52 | resources.ApplyResources(this.textBox1, "textBox1"); 53 | this.textBox1.Name = "textBox1"; 54 | this.textBox1.ReadOnly = true; 55 | // 56 | // button1 57 | // 58 | resources.ApplyResources(this.button1, "button1"); 59 | this.button1.Name = "button1"; 60 | this.button1.UseVisualStyleBackColor = true; 61 | this.button1.Click += new System.EventHandler(this.button1_Click); 62 | // 63 | // AboutEditorForm 64 | // 65 | resources.ApplyResources(this, "$this"); 66 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; 67 | this.Controls.Add(this.button1); 68 | this.Controls.Add(this.textBox1); 69 | this.Controls.Add(this.label2); 70 | this.Controls.Add(this.label1); 71 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 72 | this.MaximizeBox = false; 73 | this.MinimizeBox = false; 74 | this.Name = "AboutEditorForm"; 75 | this.ShowInTaskbar = false; 76 | this.ResumeLayout(false); 77 | this.PerformLayout(); 78 | 79 | } 80 | 81 | #endregion 82 | 83 | private System.Windows.Forms.Label label1; 84 | private System.Windows.Forms.Label label2; 85 | private System.Windows.Forms.TextBox textBox1; 86 | private System.Windows.Forms.Button button1; 87 | } 88 | } -------------------------------------------------------------------------------- /Source/StringPicker.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace TS4_STBL_Editor 2 | { 3 | partial class StringPicker 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(StringPicker)); 32 | this.listView1 = new System.Windows.Forms.ListView(); 33 | this.label1 = new System.Windows.Forms.Label(); 34 | this.label2 = new System.Windows.Forms.Label(); 35 | this.label3 = new System.Windows.Forms.Label(); 36 | this.SuspendLayout(); 37 | // 38 | // listView1 39 | // 40 | resources.ApplyResources(this.listView1, "listView1"); 41 | this.listView1.FullRowSelect = true; 42 | this.listView1.GridLines = true; 43 | this.listView1.MultiSelect = false; 44 | this.listView1.Name = "listView1"; 45 | this.listView1.UseCompatibleStateImageBehavior = false; 46 | this.listView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseClick); 47 | this.listView1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseDoubleClick); 48 | // 49 | // label1 50 | // 51 | resources.ApplyResources(this.label1, "label1"); 52 | this.label1.Name = "label1"; 53 | // 54 | // label2 55 | // 56 | resources.ApplyResources(this.label2, "label2"); 57 | this.label2.Name = "label2"; 58 | // 59 | // label3 60 | // 61 | resources.ApplyResources(this.label3, "label3"); 62 | this.label3.Name = "label3"; 63 | // 64 | // StringPicker 65 | // 66 | resources.ApplyResources(this, "$this"); 67 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 68 | this.Controls.Add(this.label3); 69 | this.Controls.Add(this.label2); 70 | this.Controls.Add(this.label1); 71 | this.Controls.Add(this.listView1); 72 | this.Name = "StringPicker"; 73 | this.Load += new System.EventHandler(this.StringPicker_Load); 74 | this.ResumeLayout(false); 75 | this.PerformLayout(); 76 | 77 | } 78 | 79 | #endregion 80 | 81 | private System.Windows.Forms.ListView listView1; 82 | private System.Windows.Forms.Label label1; 83 | private System.Windows.Forms.Label label2; 84 | private System.Windows.Forms.Label label3; 85 | } 86 | } -------------------------------------------------------------------------------- /Source/Properties/app.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 48 | 55 | 56 | 70 | -------------------------------------------------------------------------------- /Source/.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | [Xx]64/ 19 | [Xx]86/ 20 | [Bb]uild/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | artifacts/ 46 | 47 | *_i.c 48 | *_p.c 49 | *_i.h 50 | *.ilk 51 | *.meta 52 | *.obj 53 | *.pch 54 | *.pdb 55 | *.pgc 56 | *.pgd 57 | *.rsp 58 | *.sbr 59 | *.tlb 60 | *.tli 61 | *.tlh 62 | *.tmp 63 | *.tmp_proj 64 | *.log 65 | *.vspscc 66 | *.vssscc 67 | .builds 68 | *.pidb 69 | *.svclog 70 | *.scc 71 | 72 | # Chutzpah Test files 73 | _Chutzpah* 74 | 75 | # Visual C++ cache files 76 | ipch/ 77 | *.aps 78 | *.ncb 79 | *.opendb 80 | *.opensdf 81 | *.sdf 82 | *.cachefile 83 | *.VC.db 84 | 85 | # Visual Studio profiler 86 | *.psess 87 | *.vsp 88 | *.vspx 89 | *.sap 90 | 91 | # TFS 2012 Local Workspace 92 | $tf/ 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | *.DotSettings.user 101 | 102 | # JustCode is a .NET coding add-in 103 | .JustCode 104 | 105 | # TeamCity is a build add-in 106 | _TeamCity* 107 | 108 | # DotCover is a Code Coverage Tool 109 | *.dotCover 110 | 111 | # NCrunch 112 | _NCrunch_* 113 | .*crunch*.local.xml 114 | nCrunchTemp_* 115 | 116 | # MightyMoose 117 | *.mm.* 118 | AutoTest.Net/ 119 | 120 | # Web workbench (sass) 121 | .sass-cache/ 122 | 123 | # Installshield output folder 124 | [Ee]xpress/ 125 | 126 | # DocProject is a documentation generator add-in 127 | DocProject/buildhelp/ 128 | DocProject/Help/*.HxT 129 | DocProject/Help/*.HxC 130 | DocProject/Help/*.hhc 131 | DocProject/Help/*.hhk 132 | DocProject/Help/*.hhp 133 | DocProject/Help/Html2 134 | DocProject/Help/html 135 | 136 | # Click-Once directory 137 | publish/ 138 | 139 | # Publish Web Output 140 | *.[Pp]ublish.xml 141 | *.azurePubxml 142 | 143 | # TODO: Un-comment the next line if you do not want to checkin 144 | # your web deploy settings because they may include unencrypted 145 | # passwords 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # NuGet Packages 150 | *.nupkg 151 | # The packages folder can be ignored because of Package Restore 152 | **/packages/* 153 | # except build/, which is used as an MSBuild target. 154 | !**/packages/build/ 155 | # Uncomment if necessary however generally it will be regenerated when needed 156 | #!**/packages/repositories.config 157 | # NuGet v3's project.json files produces more ignoreable files 158 | *.nuget.props 159 | *.nuget.targets 160 | 161 | # Microsoft Azure Build Output 162 | csx/ 163 | *.build.csdef 164 | 165 | # Microsoft Azure Emulator 166 | ecf/ 167 | rcf/ 168 | 169 | # Microsoft Azure ApplicationInsights config file 170 | ApplicationInsights.config 171 | 172 | # Windows Store app package directory 173 | AppPackages/ 174 | BundleArtifacts/ 175 | 176 | # Visual Studio cache files 177 | # files ending in .cache can be ignored 178 | *.[Cc]ache 179 | # but keep track of directories ending in .cache 180 | !*.[Cc]ache/ 181 | 182 | # Others 183 | ClientBin/ 184 | [Ss]tyle[Cc]op.* 185 | ~$* 186 | *~ 187 | *.dbmdl 188 | *.dbproj.schemaview 189 | *.pfx 190 | *.publishsettings 191 | node_modules/ 192 | orleans.codegen.cs 193 | 194 | # RIA/Silverlight projects 195 | Generated_Code/ 196 | 197 | # Backup & report files from converting an old project file 198 | # to a newer Visual Studio version. Backup files are not needed, 199 | # because we have git ;-) 200 | _UpgradeReport_Files/ 201 | Backup*/ 202 | UpgradeLog*.XML 203 | UpgradeLog*.htm 204 | 205 | # SQL Server files 206 | *.mdf 207 | *.ldf 208 | 209 | # Business Intelligence projects 210 | *.rdl.data 211 | *.bim.layout 212 | *.bim_*.settings 213 | 214 | # Microsoft Fakes 215 | FakesAssemblies/ 216 | 217 | # GhostDoc plugin setting file 218 | *.GhostDoc.xml 219 | 220 | # Node.js Tools for Visual Studio 221 | .ntvs_analysis.dat 222 | 223 | # Visual Studio 6 build log 224 | *.plg 225 | 226 | # Visual Studio 6 workspace options file 227 | *.opt 228 | 229 | # Visual Studio LightSwitch build output 230 | **/*.HTMLClient/GeneratedArtifacts 231 | **/*.DesktopClient/GeneratedArtifacts 232 | **/*.DesktopClient/ModelManifest.xml 233 | **/*.Server/GeneratedArtifacts 234 | **/*.Server/ModelManifest.xml 235 | _Pvt_Extensions 236 | 237 | # LightSwitch generated files 238 | GeneratedArtifacts/ 239 | ModelManifest.xml 240 | 241 | # Paket dependency manager 242 | .paket/paket.exe 243 | 244 | # FAKE - F# Make 245 | .fake/ -------------------------------------------------------------------------------- /Source/AddString.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace TS4_STBL_Editor 2 | { 3 | partial class AddString 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(AddString)); 32 | this.button1 = new System.Windows.Forms.Button(); 33 | this.button2 = new System.Windows.Forms.Button(); 34 | this.displayTextFld = new System.Windows.Forms.TextBox(); 35 | this.label1 = new System.Windows.Forms.Label(); 36 | this.label2 = new System.Windows.Forms.Label(); 37 | this.textIDFld = new System.Windows.Forms.MaskedTextBox(); 38 | this.copyStrFldsValues = new System.Windows.Forms.Button(); 39 | this.pasteStrFldsValues = new System.Windows.Forms.Button(); 40 | this.SuspendLayout(); 41 | // 42 | // button1 43 | // 44 | resources.ApplyResources(this.button1, "button1"); 45 | this.button1.Name = "button1"; 46 | this.button1.UseVisualStyleBackColor = true; 47 | this.button1.Click += new System.EventHandler(this.button1_Click); 48 | // 49 | // button2 50 | // 51 | resources.ApplyResources(this.button2, "button2"); 52 | this.button2.Name = "button2"; 53 | this.button2.UseVisualStyleBackColor = true; 54 | this.button2.Click += new System.EventHandler(this.button2_Click); 55 | // 56 | // displayTextFld 57 | // 58 | resources.ApplyResources(this.displayTextFld, "displayTextFld"); 59 | this.displayTextFld.Name = "displayTextFld"; 60 | this.displayTextFld.KeyUp += new System.Windows.Forms.KeyEventHandler(this.calculateTextIDOfDisplayText); 61 | // 62 | // label1 63 | // 64 | resources.ApplyResources(this.label1, "label1"); 65 | this.label1.Name = "label1"; 66 | // 67 | // label2 68 | // 69 | resources.ApplyResources(this.label2, "label2"); 70 | this.label2.Name = "label2"; 71 | // 72 | // textIDFld 73 | // 74 | resources.ApplyResources(this.textIDFld, "textIDFld"); 75 | this.textIDFld.AsciiOnly = true; 76 | this.textIDFld.Culture = new System.Globalization.CultureInfo(""); 77 | this.textIDFld.CutCopyMaskFormat = System.Windows.Forms.MaskFormat.ExcludePromptAndLiterals; 78 | this.textIDFld.HidePromptOnLeave = true; 79 | this.textIDFld.Name = "textIDFld"; 80 | this.textIDFld.ResetOnPrompt = false; 81 | this.textIDFld.ResetOnSpace = false; 82 | this.textIDFld.TextMaskFormat = System.Windows.Forms.MaskFormat.ExcludePromptAndLiterals; 83 | // 84 | // copyStrFldsValues 85 | // 86 | resources.ApplyResources(this.copyStrFldsValues, "copyStrFldsValues"); 87 | this.copyStrFldsValues.Name = "copyStrFldsValues"; 88 | this.copyStrFldsValues.UseVisualStyleBackColor = true; 89 | this.copyStrFldsValues.Click += new System.EventHandler(this.copyStrFldsValues_Click); 90 | // 91 | // pasteStrFldsValues 92 | // 93 | resources.ApplyResources(this.pasteStrFldsValues, "pasteStrFldsValues"); 94 | this.pasteStrFldsValues.Name = "pasteStrFldsValues"; 95 | this.pasteStrFldsValues.UseVisualStyleBackColor = true; 96 | this.pasteStrFldsValues.Click += new System.EventHandler(this.pasteStrFldsValues_Click); 97 | // 98 | // AddString 99 | // 100 | resources.ApplyResources(this, "$this"); 101 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; 102 | this.Controls.Add(this.pasteStrFldsValues); 103 | this.Controls.Add(this.copyStrFldsValues); 104 | this.Controls.Add(this.textIDFld); 105 | this.Controls.Add(this.label2); 106 | this.Controls.Add(this.label1); 107 | this.Controls.Add(this.displayTextFld); 108 | this.Controls.Add(this.button2); 109 | this.Controls.Add(this.button1); 110 | this.Name = "AddString"; 111 | this.ResumeLayout(false); 112 | this.PerformLayout(); 113 | 114 | } 115 | 116 | #endregion 117 | 118 | private System.Windows.Forms.Button button1; 119 | private System.Windows.Forms.Button button2; 120 | private System.Windows.Forms.TextBox displayTextFld; 121 | private System.Windows.Forms.Label label1; 122 | private System.Windows.Forms.Label label2; 123 | private System.Windows.Forms.MaskedTextBox textIDFld; 124 | private System.Windows.Forms.Button copyStrFldsValues; 125 | private System.Windows.Forms.Button pasteStrFldsValues; 126 | } 127 | } -------------------------------------------------------------------------------- /Source/HowToCopyMultipleRows.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 | -------------------------------------------------------------------------------- /Source/SelectSTBLfileinPackage.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 | -------------------------------------------------------------------------------- /Source/AboutEditorForm.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 | 223, 19 123 | 124 | 125 | Version 10.1 by cnbatch & C major 126 | 127 | -------------------------------------------------------------------------------- /Source/LangCodesHelp.zh-Hans.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 | NoControl 123 | 124 | 125 | 语言代码表 126 | 127 | -------------------------------------------------------------------------------- /Source/LangCodesHelp.zh-Hant.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 | NoControl 123 | 124 | 125 | 語言代碼表 126 | 127 | -------------------------------------------------------------------------------- /Source/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 | ..\Resources\Imgs\howToCopyMultipleRows.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | -------------------------------------------------------------------------------- /Source/AboutEditorForm.zh-Hans.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 | 201, 9 123 | 124 | 125 | 关闭(&C) 126 | 127 | 128 | 关于 129 | 130 | -------------------------------------------------------------------------------- /Source/AboutEditorForm.zh-Hant.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 | NoControl 123 | 124 | 125 | 126 | 201, 9 127 | 128 | 129 | 關閉(&C) 130 | 131 | 132 | 關於 133 | 134 | -------------------------------------------------------------------------------- /Source/StringPicker.zh-Hans.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 | 121, 19 123 | 124 | 125 | 点击字串以便粘贴 126 | 127 | 128 | 191, 19 129 | 130 | 131 | 双击即可贴上字串并关闭窗口 132 | 133 | 134 | 219, 19 135 | 136 | 137 | 右键单击即可从列表中移除该字串 138 | 139 | 140 | 字串选取器 141 | 142 | -------------------------------------------------------------------------------- /Source/StringPicker.zh-Hant.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 | 121, 19 123 | 124 | 125 | 點擊字串以便粘貼 126 | 127 | 128 | 191, 19 129 | 130 | 131 | 雙擊即可貼上字串並關閉窗口 132 | 133 | 134 | 219, 19 135 | 136 | 137 | 右鍵單擊即可從列表中移除該字串 138 | 139 | 140 | 字串選取器 141 | 142 | -------------------------------------------------------------------------------- /Source/AddString.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.Globalization; 11 | using System.Threading; 12 | using FNVHasherDLL; 13 | 14 | namespace TS4_STBL_Editor 15 | { 16 | public partial class AddString : Form 17 | { 18 | public AddString() 19 | { 20 | InitializeComponent(); 21 | } 22 | 23 | public string textID; 24 | public string dataGridText; 25 | public bool isOK = false; 26 | public bool stopOnChangeEvent = false; 27 | 28 | private void button1_Click(object sender, EventArgs e) 29 | { 30 | if (textIDFld.Text.Trim() == String.Empty && displayTextFld.Text.Trim() == String.Empty) 31 | { 32 | switch (Thread.CurrentThread.CurrentUICulture.ThreeLetterWindowsLanguageName) 33 | { 34 | case "CHS": 35 | case "ZHI": 36 | MessageBox.Show("你未键入任何内容。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 37 | break; 38 | case "CHT": 39 | case "ZHH": 40 | case "ZHM": 41 | MessageBox.Show("你未鍵入任何內容。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 42 | break; 43 | default: 44 | MessageBox.Show("Nothing is input.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 45 | break; 46 | } 47 | isOK = false; 48 | Close(); 49 | } 50 | else if (textIDFld.Text.Trim() == String.Empty) 51 | { 52 | switch (Thread.CurrentThread.CurrentUICulture.ThreeLetterWindowsLanguageName) 53 | { 54 | case "CHS": 55 | case "ZHI": 56 | MessageBox.Show("字串索引值不能留空,请键入字串索引值。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 57 | break; 58 | case "CHT": 59 | case "ZHH": 60 | case "ZHM": 61 | MessageBox.Show("字串索引值不能留空,請鍵入字串索引值。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 62 | break; 63 | default: 64 | MessageBox.Show("Text ID is blank. Please input a Text ID", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 65 | break; 66 | } 67 | isOK = false; 68 | } 69 | else if (textIDFld.Text.Contains("G") || textIDFld.Text.Contains("H") || textIDFld.Text.Contains("I") 70 | || textIDFld.Text.Contains("J") || textIDFld.Text.Contains("K") || textIDFld.Text.Contains("L") 71 | || textIDFld.Text.Contains("M") || textIDFld.Text.Contains("N") || textIDFld.Text.Contains("O") 72 | || textIDFld.Text.Contains("P") || textIDFld.Text.Contains("Q") || textIDFld.Text.Contains("R") 73 | || textIDFld.Text.Contains("S") || textIDFld.Text.Contains("T") || textIDFld.Text.Contains("U") 74 | || textIDFld.Text.Contains("V") || textIDFld.Text.Contains("W") || textIDFld.Text.Contains("X") 75 | || textIDFld.Text.Contains("Y") || textIDFld.Text.Contains("Z")) 76 | { 77 | switch (Thread.CurrentThread.CurrentUICulture.ThreeLetterWindowsLanguageName) 78 | { 79 | case "CHS": 80 | case "ZHI": 81 | MessageBox.Show("请在“字串索引”中键入十六进制字串(0-9, A-F)。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 82 | break; 83 | case "CHT": 84 | case "ZHH": 85 | case "ZHM": 86 | MessageBox.Show("請在「字串索引」中鍵入十六進制字串(0-9, A-F)。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 87 | break; 88 | default: 89 | MessageBox.Show("Please input Hexadecimal String (0-9, A-F) in Text ID.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 90 | break; 91 | } 92 | isOK = false; 93 | } 94 | else if (textIDFld.TextLength < 8) 95 | { 96 | switch (Thread.CurrentThread.CurrentUICulture.ThreeLetterWindowsLanguageName) 97 | { 98 | case "CHS": 99 | case "ZHI": 100 | MessageBox.Show("字串索引值太短。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 101 | break; 102 | case "CHT": 103 | case "ZHH": 104 | case "ZHM": 105 | MessageBox.Show("字串索引值太短。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 106 | break; 107 | default: 108 | MessageBox.Show("Text ID is too less.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 109 | break; 110 | } 111 | isOK = false; 112 | } 113 | else 114 | { 115 | textID = "0x" + textIDFld.Text.Trim(); 116 | dataGridText = displayTextFld.Text; 117 | isOK = true; 118 | Close(); 119 | } 120 | } 121 | 122 | private void button2_Click(object sender, EventArgs e) 123 | { 124 | isOK = false; 125 | Close(); 126 | } 127 | 128 | private void calculateTextIDOfDisplayText(object sender, EventArgs e) 129 | { 130 | if (!stopOnChangeEvent) 131 | { 132 | textIDFld.Text = FNVHasherStrFunctions.fnv32HexString(displayTextFld.Text).Replace("0x", ""); 133 | } 134 | } 135 | 136 | private void copyStrFldsValues_Click(object sender, EventArgs e) 137 | { 138 | StringHolder sh = new StringHolder(); 139 | sh.textIDFld = textIDFld.Text; 140 | sh.displayTextFld = displayTextFld.Text; 141 | 142 | MainUI.copiedValuesStrHolders.Add(sh); 143 | } 144 | 145 | private void pasteStrFldsValues_Click(object sender, EventArgs e) 146 | { 147 | StringPicker sp = new StringPicker(this); 148 | sp.Show(); 149 | } 150 | 151 | public void setFldsValues(StringHolder sh) 152 | { 153 | stopOnChangeEvent = true; 154 | 155 | displayTextFld.Text = sh.displayTextFld; 156 | 157 | stopOnChangeEvent = false; 158 | 159 | textIDFld.Text = sh.textIDFld.Replace("0x", ""); 160 | 161 | } 162 | 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /Source/LangCodesHelp.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 | 0 122 | 123 | 124 | LangCodesHelp 125 | 126 | 127 | 128 | Fill 129 | 130 | 131 | System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 132 | 133 | 134 | dataGridView1 135 | 136 | 137 | $this 138 | 139 | 140 | System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 141 | 142 | 143 | 3, 4, 3, 4 144 | 145 | 146 | 147 | 284, 461 148 | 149 | 150 | System.Windows.Forms.BindingSource, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 151 | 152 | 153 | 3, 4, 3, 4 154 | 155 | 156 | LangCodesHelp 157 | 158 | 159 | System.Data.DataSet, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 160 | 161 | 162 | 0, 0 163 | 164 | 165 | 7, 17 166 | 167 | 168 | 169 | 0 170 | 171 | 172 | 284, 461 173 | 174 | 175 | CenterParent 176 | 177 | 178 | aboutEditorFormBindingSource 179 | 180 | 181 | Segoe UI, 10pt 182 | 183 | 184 | LangCodesDS 185 | 186 | 187 | True 188 | 189 | 190 | 17, 17 191 | 192 | 193 | 240, 17 194 | 195 | -------------------------------------------------------------------------------- /Source/StringPicker.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 | Top, Bottom, Left, Right 123 | 124 | 125 | 126 | 17, 92 127 | 128 | 129 | 410, 268 130 | 131 | 132 | 133 | 0 134 | 135 | 136 | listView1 137 | 138 | 139 | System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 140 | 141 | 142 | $this 143 | 144 | 145 | 3 146 | 147 | 148 | True 149 | 150 | 151 | 14, 11 152 | 153 | 154 | 186, 19 155 | 156 | 157 | 1 158 | 159 | 160 | Click on the string to paste it 161 | 162 | 163 | label1 164 | 165 | 166 | System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 167 | 168 | 169 | $this 170 | 171 | 172 | 2 173 | 174 | 175 | True 176 | 177 | 178 | 14, 42 179 | 180 | 181 | 372, 19 182 | 183 | 184 | 2 185 | 186 | 187 | Double Click on the string to paste it and close this window 188 | 189 | 190 | label2 191 | 192 | 193 | System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 194 | 195 | 196 | $this 197 | 198 | 199 | 1 200 | 201 | 202 | True 203 | 204 | 205 | 14, 70 206 | 207 | 208 | 315, 19 209 | 210 | 211 | 3 212 | 213 | 214 | Right Click on the string to remove it from this list 215 | 216 | 217 | label3 218 | 219 | 220 | System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 221 | 222 | 223 | $this 224 | 225 | 226 | 0 227 | 228 | 229 | True 230 | 231 | 232 | 7, 17 233 | 234 | 235 | 439, 376 236 | 237 | 238 | Segoe UI, 10pt 239 | 240 | 241 | CenterParent 242 | 243 | 244 | StringPicker 245 | 246 | 247 | StringPicker 248 | 249 | 250 | System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 251 | 252 | -------------------------------------------------------------------------------- /Source/Editor.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace TS4_STBL_Editor 2 | { 3 | partial class Editor 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.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Editor)); 33 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); 34 | this.dataGridView1 = new System.Windows.Forms.DataGridView(); 35 | this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 36 | this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 37 | this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 38 | this.OKBtn = new System.Windows.Forms.Button(); 39 | this.CancelBtn = new System.Windows.Forms.Button(); 40 | this.label1 = new System.Windows.Forms.Label(); 41 | this.Add_New_String = new System.Windows.Forms.Button(); 42 | this.label2 = new System.Windows.Forms.Label(); 43 | this.Paste_ALL_copied_values = new System.Windows.Forms.Button(); 44 | this.Show_copied_values = new System.Windows.Forms.Button(); 45 | this.Copy_Values_By_IDs = new System.Windows.Forms.Button(); 46 | this.Copy_selected_rows = new System.Windows.Forms.Button(); 47 | this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); 48 | this.deleteThisElementToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 49 | this.copyThisRowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 50 | this.label4 = new System.Windows.Forms.Label(); 51 | this.label5 = new System.Windows.Forms.Label(); 52 | this.copySelectedRowsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 53 | this.label3 = new System.Windows.Forms.Label(); 54 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); 55 | this.contextMenuStrip1.SuspendLayout(); 56 | this.SuspendLayout(); 57 | // 58 | // dataGridView1 59 | // 60 | resources.ApplyResources(this.dataGridView1, "dataGridView1"); 61 | this.dataGridView1.AllowUserToAddRows = false; 62 | this.dataGridView1.AllowUserToDeleteRows = false; 63 | this.dataGridView1.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders; 64 | this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 65 | this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { 66 | this.Column1, 67 | this.Column2, 68 | this.Column3}); 69 | this.dataGridView1.Name = "dataGridView1"; 70 | dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; 71 | this.dataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle4; 72 | this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick); 73 | this.dataGridView1.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseClick); 74 | this.dataGridView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.dataGridView1_MouseClick); 75 | // 76 | // Column1 77 | // 78 | resources.ApplyResources(this.Column1, "Column1"); 79 | this.Column1.Name = "Column1"; 80 | this.Column1.ReadOnly = true; 81 | this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; 82 | // 83 | // Column2 84 | // 85 | this.Column2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; 86 | resources.ApplyResources(this.Column2, "Column2"); 87 | this.Column2.Name = "Column2"; 88 | this.Column2.ReadOnly = true; 89 | this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; 90 | // 91 | // Column3 92 | // 93 | this.Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; 94 | resources.ApplyResources(this.Column3, "Column3"); 95 | this.Column3.Name = "Column3"; 96 | this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; 97 | // 98 | // OKBtn 99 | // 100 | resources.ApplyResources(this.OKBtn, "OKBtn"); 101 | this.OKBtn.Name = "OKBtn"; 102 | this.OKBtn.UseVisualStyleBackColor = true; 103 | this.OKBtn.Click += new System.EventHandler(this.OKBtn_Click); 104 | // 105 | // CancelBtn 106 | // 107 | resources.ApplyResources(this.CancelBtn, "CancelBtn"); 108 | this.CancelBtn.Name = "CancelBtn"; 109 | this.CancelBtn.UseVisualStyleBackColor = true; 110 | this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click); 111 | // 112 | // label1 113 | // 114 | resources.ApplyResources(this.label1, "label1"); 115 | this.label1.Name = "label1"; 116 | // 117 | // Add_New_String 118 | // 119 | resources.ApplyResources(this.Add_New_String, "Add_New_String"); 120 | this.Add_New_String.Name = "Add_New_String"; 121 | this.Add_New_String.UseVisualStyleBackColor = true; 122 | this.Add_New_String.Click += new System.EventHandler(this.Add_New_String_Click); 123 | // 124 | // label2 125 | // 126 | resources.ApplyResources(this.label2, "label2"); 127 | this.label2.Name = "label2"; 128 | // 129 | // Paste_ALL_copied_values 130 | // 131 | resources.ApplyResources(this.Paste_ALL_copied_values, "Paste_ALL_copied_values"); 132 | this.Paste_ALL_copied_values.Name = "Paste_ALL_copied_values"; 133 | this.Paste_ALL_copied_values.UseVisualStyleBackColor = true; 134 | this.Paste_ALL_copied_values.Click += new System.EventHandler(this.Paste_ALL_copied_values_Click); 135 | // 136 | // Show_copied_values 137 | // 138 | resources.ApplyResources(this.Show_copied_values, "Show_copied_values"); 139 | this.Show_copied_values.Name = "Show_copied_values"; 140 | this.Show_copied_values.UseVisualStyleBackColor = true; 141 | this.Show_copied_values.Click += new System.EventHandler(this.Show_copied_values_Click); 142 | // 143 | // Copy_Values_By_IDs 144 | // 145 | resources.ApplyResources(this.Copy_Values_By_IDs, "Copy_Values_By_IDs"); 146 | this.Copy_Values_By_IDs.Name = "Copy_Values_By_IDs"; 147 | this.Copy_Values_By_IDs.UseVisualStyleBackColor = true; 148 | this.Copy_Values_By_IDs.Click += new System.EventHandler(this.Copy_Values_By_IDs_Click); 149 | // 150 | // Copy_selected_rows 151 | // 152 | resources.ApplyResources(this.Copy_selected_rows, "Copy_selected_rows"); 153 | this.Copy_selected_rows.Name = "Copy_selected_rows"; 154 | this.Copy_selected_rows.UseVisualStyleBackColor = true; 155 | this.Copy_selected_rows.Click += new System.EventHandler(this.Copy_selected_rows_Click); 156 | // 157 | // contextMenuStrip1 158 | // 159 | resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1"); 160 | this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 161 | this.deleteThisElementToolStripMenuItem, 162 | this.copyThisRowToolStripMenuItem, 163 | this.copySelectedRowsToolStripMenuItem}); 164 | this.contextMenuStrip1.Name = "contextMenuStrip1"; 165 | // 166 | // deleteThisElementToolStripMenuItem 167 | // 168 | resources.ApplyResources(this.deleteThisElementToolStripMenuItem, "deleteThisElementToolStripMenuItem"); 169 | this.deleteThisElementToolStripMenuItem.Name = "deleteThisElementToolStripMenuItem"; 170 | this.deleteThisElementToolStripMenuItem.Click += new System.EventHandler(this.deleteThisElementToolStripMenuItem_Click); 171 | // 172 | // copyThisRowToolStripMenuItem 173 | // 174 | resources.ApplyResources(this.copyThisRowToolStripMenuItem, "copyThisRowToolStripMenuItem"); 175 | this.copyThisRowToolStripMenuItem.Name = "copyThisRowToolStripMenuItem"; 176 | this.copyThisRowToolStripMenuItem.Click += new System.EventHandler(this.copyThisRowToolStripMenuItem_Click); 177 | // 178 | // label4 179 | // 180 | resources.ApplyResources(this.label4, "label4"); 181 | this.label4.Name = "label4"; 182 | // 183 | // label5 184 | // 185 | resources.ApplyResources(this.label5, "label5"); 186 | this.label5.Name = "label5"; 187 | // 188 | // copySelectedRowsToolStripMenuItem 189 | // 190 | this.copySelectedRowsToolStripMenuItem.Name = "copySelectedRowsToolStripMenuItem"; 191 | resources.ApplyResources(this.copySelectedRowsToolStripMenuItem, "copySelectedRowsToolStripMenuItem"); 192 | this.copySelectedRowsToolStripMenuItem.Click += new System.EventHandler(this.copySelectedRowsToolStripMenuItem_Click); 193 | // 194 | // label3 195 | // 196 | resources.ApplyResources(this.label3, "label3"); 197 | this.label3.Name = "label3"; 198 | // 199 | // Editor 200 | // 201 | resources.ApplyResources(this, "$this"); 202 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; 203 | this.Controls.Add(this.label3); 204 | this.Controls.Add(this.label5); 205 | this.Controls.Add(this.label4); 206 | this.Controls.Add(this.Copy_selected_rows); 207 | this.Controls.Add(this.Copy_Values_By_IDs); 208 | this.Controls.Add(this.Show_copied_values); 209 | this.Controls.Add(this.Paste_ALL_copied_values); 210 | this.Controls.Add(this.label2); 211 | this.Controls.Add(this.Add_New_String); 212 | this.Controls.Add(this.label1); 213 | this.Controls.Add(this.CancelBtn); 214 | this.Controls.Add(this.OKBtn); 215 | this.Controls.Add(this.dataGridView1); 216 | this.Name = "Editor"; 217 | this.Load += new System.EventHandler(this.Editor_Load); 218 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); 219 | this.contextMenuStrip1.ResumeLayout(false); 220 | this.ResumeLayout(false); 221 | this.PerformLayout(); 222 | 223 | } 224 | 225 | #endregion 226 | 227 | private System.Windows.Forms.DataGridView dataGridView1; 228 | private System.Windows.Forms.Button OKBtn; 229 | private System.Windows.Forms.Button CancelBtn; 230 | private System.Windows.Forms.Label label1; 231 | private System.Windows.Forms.Button Add_New_String; 232 | private System.Windows.Forms.DataGridViewTextBoxColumn Column1; 233 | private System.Windows.Forms.DataGridViewTextBoxColumn Column2; 234 | private System.Windows.Forms.DataGridViewTextBoxColumn Column3; 235 | private System.Windows.Forms.Label label2; 236 | private System.Windows.Forms.Button Paste_ALL_copied_values; 237 | private System.Windows.Forms.Button Show_copied_values; 238 | private System.Windows.Forms.Button Copy_Values_By_IDs; 239 | private System.Windows.Forms.Button Copy_selected_rows; 240 | private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; 241 | private System.Windows.Forms.ToolStripMenuItem deleteThisElementToolStripMenuItem; 242 | private System.Windows.Forms.ToolStripMenuItem copyThisRowToolStripMenuItem; 243 | private System.Windows.Forms.Label label4; 244 | private System.Windows.Forms.Label label5; 245 | private System.Windows.Forms.ToolStripMenuItem copySelectedRowsToolStripMenuItem; 246 | private System.Windows.Forms.Label label3; 247 | } 248 | } -------------------------------------------------------------------------------- /Source/AboutEditorForm.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 | Top, Left, Right 123 | 124 | 125 | 126 | True 127 | 128 | 129 | NoControl 130 | 131 | 132 | 133 | 159, 9 134 | 135 | 136 | 306, 19 137 | 138 | 139 | 1 140 | 141 | 142 | Version 11.1 by ArtUrlWWW, cnbatch & C major 143 | 144 | 145 | MiddleCenter 146 | 147 | 148 | label1 149 | 150 | 151 | System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 152 | 153 | 154 | $this 155 | 156 | 157 | 3 158 | 159 | 160 | Top, Left, Right 161 | 162 | 163 | True 164 | 165 | 166 | 283, 28 167 | 168 | 169 | 59, 19 170 | 171 | 172 | 2 173 | 174 | 175 | Licenses 176 | 177 | 178 | label2 179 | 180 | 181 | System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 182 | 183 | 184 | $this 185 | 186 | 187 | 2 188 | 189 | 190 | 13, 50 191 | 192 | 193 | True 194 | 195 | 196 | Vertical 197 | 198 | 199 | 599, 419 200 | 201 | 202 | 2 203 | 204 | 205 | Copyright (c) 2017, ArtUrlWWW, cnbatch & C major 206 | All rights reserved. 207 | 208 | Redistribution and use in source and binary forms, with or without 209 | modification, are permitted provided that the following conditions are met: 210 | * Redistributions of source code must retain the above copyright 211 | notice, this list of conditions and the following disclaimer. 212 | * Redistributions in binary form must reproduce the above copyright 213 | notice, this list of conditions and the following disclaimer in the 214 | documentation and/or other materials provided with the distribution. 215 | * Neither the name of the cnbatch & C major nor the 216 | names of its contributors may be used to endorse or promote products 217 | derived from this software without specific prior written permission. 218 | 219 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 220 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 221 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 222 | DISCLAIMED. IN NO EVENT SHALL cnbatch & C major BE LIABLE FOR ANY 223 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 224 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 225 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 226 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 227 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 228 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 229 | 230 | 231 | textBox1 232 | 233 | 234 | System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 235 | 236 | 237 | $this 238 | 239 | 240 | 1 241 | 242 | 243 | Bottom, Right 244 | 245 | 246 | 537, 475 247 | 248 | 249 | 75, 29 250 | 251 | 252 | 0 253 | 254 | 255 | &Close 256 | 257 | 258 | button1 259 | 260 | 261 | System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 262 | 263 | 264 | $this 265 | 266 | 267 | 0 268 | 269 | 270 | True 271 | 272 | 273 | 96, 96 274 | 275 | 276 | 624, 516 277 | 278 | 279 | Segoe UI, 10pt 280 | 281 | 282 | 3, 4, 3, 4 283 | 284 | 285 | CenterParent 286 | 287 | 288 | About 289 | 290 | 291 | AboutEditorForm 292 | 293 | 294 | System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 295 | 296 | -------------------------------------------------------------------------------- /Source/AddString.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 | 4 123 | 124 | 125 | 3 126 | 127 | 128 | True 129 | 130 | 131 | 4 132 | 133 | 134 | 135 | 96, 96 136 | 137 | 138 | 139 | Top, Bottom, Left, Right 140 | 141 | 142 | 143 | 144 | 145 | 12, 83 146 | 147 | 148 | 75, 29 149 | 150 | 151 | System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 152 | 153 | 154 | Text ID 0x 155 | 156 | 157 | button2 158 | 159 | 160 | AddString 161 | 162 | 163 | &Cancel 164 | 165 | 166 | Bottom 167 | 168 | 169 | $this 170 | 171 | 172 | $this 173 | 174 | 175 | Segoe UI, 10pt 176 | 177 | 178 | 20, 28 179 | 180 | 181 | System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 182 | 183 | 184 | 400, 125 185 | 186 | 187 | 2 188 | 189 | 190 | >AAAAAAAA 191 | 192 | 193 | 524, 262 194 | 195 | 196 | Bottom 197 | 198 | 199 | CenterParent 200 | 201 | 202 | 75, 29 203 | 204 | 205 | System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 206 | 207 | 208 | label1 209 | 210 | 211 | label2 212 | 213 | 214 | 300, 221 215 | 216 | 217 | maskedTextBox1 218 | 219 | 220 | 1 221 | 222 | 223 | 0 224 | 225 | 226 | &OK 227 | 228 | 229 | $this 230 | 231 | 232 | Display Text 233 | 234 | 235 | $this 236 | 237 | 238 | True 239 | 240 | 241 | 100, 80 242 | 243 | 244 | 82, 19 245 | 246 | 247 | 5 248 | 249 | 250 | 74, 19 251 | 252 | 253 | System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 254 | 255 | 256 | 100, 25 257 | 258 | 259 | 5 260 | 261 | 262 | 3, 4, 3, 4 263 | 264 | 265 | 100, 25 266 | 267 | 268 | 3 269 | 270 | 271 | System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 272 | 273 | 274 | 2 275 | 276 | 277 | button1 278 | 279 | 280 | 0 281 | 282 | 283 | textBox1 284 | 285 | 286 | True 287 | 288 | 289 | System.Windows.Forms.MaskedTextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 290 | 291 | 292 | 165, 221 293 | 294 | 295 | System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 296 | 297 | 298 | AddString 299 | 300 | 301 | 1 302 | 303 | 304 | $this 305 | 306 | 307 | $this 308 | 309 | 310 | True 311 | 312 | 313 | en 314 | 315 | -------------------------------------------------------------------------------- /Source/Editor.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.Globalization; 11 | using System.Threading; 12 | using FNVHasherDLL; 13 | using System.Numerics; 14 | 15 | namespace TS4_STBL_Editor 16 | { 17 | public partial class Editor : Form 18 | { 19 | private DataGridViewSettings settings0 = new DataGridViewSettings(); 20 | private DataGridViewSettings settings1 = new DataGridViewSettings(); 21 | private DataGridViewSettings settings2 = new DataGridViewSettings(); 22 | 23 | public DataGridView tempDataGridView; 24 | public delegate void UpdateProgressBar(double num); 25 | public UpdateProgressBar updateProgressBar; 26 | public DataTable dataTable; 27 | public bool isTextChanged = false; 28 | 29 | public Editor() 30 | { 31 | InitializeComponent(); 32 | } 33 | private void Editor_Load(object sender, EventArgs e) 34 | { 35 | DataTable mainDataTable = new DataTable(); 36 | 37 | DataColumn dc; 38 | dc = new DataColumn(dataGridView1.Columns[0].HeaderText); 39 | mainDataTable.Columns.Add(dc); 40 | dc = new DataColumn(dataGridView1.Columns[1].HeaderText); 41 | mainDataTable.Columns.Add(dc); 42 | dc = new DataColumn(dataGridView1.Columns[2].HeaderText); 43 | mainDataTable.Columns.Add(dc); 44 | DataRow dr; 45 | for (int i = 0; i < dataTable.Rows.Count; i++) 46 | { 47 | dr = mainDataTable.NewRow(); 48 | dr[0] = dataTable.Rows[i][0]; 49 | dr[1] = dataTable.Rows[i][1]; 50 | dr[2] = dataTable.Rows[i][1]; 51 | mainDataTable.Rows.Add(dr); 52 | } 53 | 54 | settings0.StoreSettings(dataGridView1, 0); 55 | settings1.StoreSettings(dataGridView1, 1); 56 | settings2.StoreSettings(dataGridView1, 2); 57 | 58 | dataGridView1.Columns.Clear(); 59 | dataGridView1.DataSource = mainDataTable; 60 | 61 | RestoreDataGridViewSettings(); 62 | 63 | foreach (DataGridViewRow row in dataGridView1.Rows) 64 | { 65 | row.HeaderCell.Value = (row.Index + 1).ToString(); 66 | updateProgressBar((double)row.Index / (double)dataTable.Rows.Count); 67 | } 68 | } 69 | 70 | private void saveAndExit() 71 | { 72 | if (dataGridView1.Rows.Count != 0) 73 | { 74 | DataTable dt = (DataTable)dataGridView1.DataSource; 75 | DataTable tempDataTable = dataTable.Clone(); 76 | 77 | for (int i = 0; i < dt.Rows.Count; i++) 78 | { 79 | tempDataTable.Rows.Add(); 80 | tempDataTable.Rows[i][0] = dt.Rows[i][0]; 81 | tempDataTable.Rows[i][1] = dt.Rows[i][2]; 82 | } 83 | 84 | dataTable.Rows.Clear(); 85 | dataTable = tempDataTable.Copy(); 86 | } 87 | isTextChanged = true; 88 | Close(); 89 | } 90 | 91 | private void OKBtn_Click(object sender, EventArgs e) 92 | { 93 | saveAndExit(); 94 | } 95 | 96 | private void CancelBtn_Click(object sender, EventArgs e) 97 | { 98 | Close(); 99 | } 100 | 101 | private void Add_New_String_Click(object sender, EventArgs e) 102 | { 103 | AddString addString = new AddString(); 104 | addString.ShowDialog(); 105 | if (addString.isOK) 106 | { 107 | DataTable dt = (DataTable)dataGridView1.DataSource; 108 | DataRow dr; 109 | dr = dt.NewRow(); 110 | dr[0] = addString.textID; 111 | dr[2] = addString.dataGridText; 112 | dt.Rows.Add(dr); 113 | dataGridView1.Rows[dataGridView1.Rows.Count - 1].HeaderCell.Value = (dataGridView1.Rows.Count).ToString(); 114 | } 115 | addString.Dispose(); 116 | } 117 | 118 | private void RestoreDataGridViewSettings() 119 | { 120 | dataGridView1.Columns[0].AutoSizeMode = settings0.autoSizeColumnMode; 121 | dataGridView1.Columns[0].DefaultCellStyle = settings0.cellStyle; 122 | dataGridView1.Columns[0].DefaultHeaderCellType = settings0.defaultHeaderCellType; 123 | dataGridView1.Columns[0].Frozen = settings0.frozen; 124 | dataGridView1.Columns[0].HeaderText = settings0.headerText; 125 | dataGridView1.Columns[0].MinimumWidth = settings0.minimumWidth; 126 | dataGridView1.Columns[0].Name = settings0.name; 127 | dataGridView1.Columns[0].ReadOnly = settings0.readOnly; 128 | dataGridView1.Columns[0].Resizable = settings0.resizable; 129 | dataGridView1.Columns[0].SortMode = settings0.sortMode; 130 | dataGridView1.Columns[0].Width = settings0.width; 131 | 132 | dataGridView1.Columns[1].AutoSizeMode = settings1.autoSizeColumnMode; 133 | dataGridView1.Columns[1].DefaultCellStyle = settings1.cellStyle; 134 | dataGridView1.Columns[1].DefaultHeaderCellType = settings1.defaultHeaderCellType; 135 | dataGridView1.Columns[1].Frozen = settings1.frozen; 136 | dataGridView1.Columns[1].HeaderText = settings1.headerText; 137 | dataGridView1.Columns[1].MinimumWidth = settings1.minimumWidth; 138 | dataGridView1.Columns[1].Name = settings1.name; 139 | dataGridView1.Columns[1].ReadOnly = settings1.readOnly; 140 | dataGridView1.Columns[1].Resizable = settings1.resizable; 141 | dataGridView1.Columns[1].SortMode = settings1.sortMode; 142 | dataGridView1.Columns[1].Width = settings1.width; 143 | 144 | dataGridView1.Columns[2].AutoSizeMode = settings2.autoSizeColumnMode; 145 | dataGridView1.Columns[2].DefaultCellStyle = settings2.cellStyle; 146 | dataGridView1.Columns[2].DefaultHeaderCellType = settings2.defaultHeaderCellType; 147 | dataGridView1.Columns[2].Frozen = settings2.frozen; 148 | dataGridView1.Columns[2].HeaderText = settings2.headerText; 149 | dataGridView1.Columns[2].MinimumWidth = settings2.minimumWidth; 150 | dataGridView1.Columns[2].Name = settings2.name; 151 | dataGridView1.Columns[2].ReadOnly = settings2.readOnly; 152 | dataGridView1.Columns[2].Resizable = settings2.resizable; 153 | dataGridView1.Columns[2].SortMode = settings2.sortMode; 154 | dataGridView1.Columns[2].Width = settings2.width; 155 | } 156 | 157 | private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) 158 | { 159 | if (dataGridView1.SelectedRows.Count > 0) 160 | { 161 | MessageBox.Show("Value " + 162 | dataGridView1.SelectedRows[0].Cells[0].Value.ToString() + 163 | " - " + dataGridView1.SelectedRows[0].Cells[1].Value.ToString() + 164 | " copied!"); 165 | 166 | StringHolder sh = new StringHolder(); 167 | sh.textIDFld = dataGridView1.SelectedRows[0].Cells[0].Value.ToString(); 168 | sh.displayTextFld = dataGridView1.SelectedRows[0].Cells[1].Value.ToString(); 169 | 170 | MainUI.copiedValuesStrHolders.Add(sh); 171 | } 172 | } 173 | 174 | private void Paste_ALL_copied_values_Click(object sender, EventArgs e) 175 | { 176 | for (int x = 0; x < MainUI.copiedValuesStrHolders.Count; x++) 177 | { 178 | StringHolder sh = MainUI.copiedValuesStrHolders[x]; 179 | 180 | DataTable dt = (DataTable)dataGridView1.DataSource; 181 | DataRow dr; 182 | dr = dt.NewRow(); 183 | dr[0] = sh.textIDFld; 184 | dr[2] = sh.displayTextFld; 185 | dt.Rows.Add(dr); 186 | dataGridView1.Rows[dataGridView1.Rows.Count - 1].HeaderCell.Value = (dataGridView1.Rows.Count).ToString(); 187 | 188 | } 189 | 190 | 191 | } 192 | 193 | private void Show_copied_values_Click(object sender, EventArgs e) 194 | { 195 | StringPicker sp = new StringPicker(null); 196 | sp.Show(); 197 | } 198 | 199 | private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) 200 | { 201 | 202 | //if (dataGridView1.SelectedRows.Count > 0) 203 | //{ 204 | // if (e.Button == MouseButtons.Left) 205 | // { 206 | // //if (addstr != null) 207 | // //{ 208 | // // addstr.setFldsValues(MainUI.strHolders[listView1.SelectedIndices[0]]); 209 | // //} 210 | // } 211 | // else 212 | // { 213 | // CopySelectedRows(); 214 | // } 215 | //} 216 | } 217 | 218 | //private void label3_Click(object sender, EventArgs e) 219 | //{ 220 | // HowToCopyMultipleRows a = new HowToCopyMultipleRows(); 221 | // a.ShowDialog(); 222 | //} 223 | 224 | private void Copy_Values_By_IDs_Click(object sender, EventArgs e) 225 | { 226 | string idsStr = ""; 227 | if (ShowInputDialog(ref idsStr) == DialogResult.OK) 228 | { 229 | string[] idsArray = idsStr.Split(new string[] { "," }, StringSplitOptions.None); 230 | for (int x = 0; x < idsArray.Length; x++) 231 | { 232 | string id = idsArray[x]; 233 | if (id.Length > 3) 234 | { 235 | 236 | if (id.StartsWith("0x") || id.StartsWith("0X")) 237 | { 238 | id = id.Replace("0X", "0x"); 239 | } 240 | else 241 | { 242 | id = FNVHasherStrFunctions.decimalToHex(id); 243 | } 244 | 245 | if (dataGridView1.Rows.Count != 0) 246 | { 247 | for (int i = 0; i < dataGridView1.Rows.Count; i++) 248 | { 249 | if (dataGridView1.Rows[i].Cells[0].Value.ToString().Equals(id)) 250 | { 251 | dataGridView1.Rows[i].Selected = true; 252 | } 253 | } 254 | 255 | } 256 | } 257 | } 258 | CopySelectedRows(); 259 | } 260 | } 261 | 262 | private static DialogResult ShowInputDialog(ref string input) 263 | { 264 | System.Drawing.Size size = new System.Drawing.Size(400, 70); 265 | Form inputBox = new Form(); 266 | 267 | inputBox.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 268 | inputBox.ClientSize = size; 269 | inputBox.Text = "Enter ids, comma separated"; 270 | 271 | System.Windows.Forms.TextBox textBox = new TextBox(); 272 | textBox.Size = new System.Drawing.Size(size.Width - 10, 23); 273 | textBox.Location = new System.Drawing.Point(5, 5); 274 | textBox.Text = input; 275 | inputBox.Controls.Add(textBox); 276 | 277 | Button okButton = new Button(); 278 | okButton.DialogResult = System.Windows.Forms.DialogResult.OK; 279 | okButton.Name = "okButton"; 280 | okButton.Size = new System.Drawing.Size(75, 23); 281 | okButton.Text = "&OK"; 282 | okButton.Location = new System.Drawing.Point(size.Width - 80 - 80, 39); 283 | inputBox.Controls.Add(okButton); 284 | 285 | Button cancelButton = new Button(); 286 | cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 287 | cancelButton.Name = "cancelButton"; 288 | cancelButton.Size = new System.Drawing.Size(75, 23); 289 | cancelButton.Text = "&Cancel"; 290 | cancelButton.Location = new System.Drawing.Point(size.Width - 80, 39); 291 | inputBox.Controls.Add(cancelButton); 292 | 293 | inputBox.AcceptButton = okButton; 294 | inputBox.CancelButton = cancelButton; 295 | 296 | DialogResult result = inputBox.ShowDialog(); 297 | input = textBox.Text; 298 | return result; 299 | } 300 | 301 | private void Copy_selected_rows_Click(object sender, EventArgs e) 302 | { 303 | //CopySelectedRows(); 304 | } 305 | 306 | private void CopySelectedRows() 307 | { 308 | for (int x = 0; x < dataGridView1.SelectedRows.Count; x++) 309 | { 310 | StringHolder sh = new StringHolder(); 311 | sh.textIDFld = dataGridView1.SelectedRows[x].Cells[0].Value.ToString(); 312 | sh.displayTextFld = dataGridView1.SelectedRows[x].Cells[1].Value.ToString(); 313 | 314 | MainUI.copiedValuesStrHolders.Add(sh); 315 | } 316 | 317 | MessageBox.Show(dataGridView1.SelectedRows.Count + " rows copied!"); 318 | } 319 | 320 | private void deleteThisElementToolStripMenuItem_Click(object sender, EventArgs e) 321 | { 322 | var cell = contextMenuStrip1.Tag as DataGridViewCell; 323 | 324 | var confirmResult = MessageBox.Show("Are you sure to delete this item ??", 325 | "Confirm Delete!!", 326 | MessageBoxButtons.YesNo); 327 | if (confirmResult == DialogResult.Yes) 328 | { 329 | dataGridView1.Rows.RemoveAt(cell.OwningRow.Index); 330 | 331 | } 332 | else 333 | { 334 | // If 'No', do something here. 335 | } 336 | } 337 | 338 | private void dataGridView1_MouseClick(object sender, MouseEventArgs e) 339 | { 340 | if (e.Button == MouseButtons.Right) 341 | { 342 | dataGridView1.CurrentCell.OwningRow.Selected = true; 343 | contextMenuStrip1.Tag = dataGridView1.CurrentCell; 344 | contextMenuStrip1.Show(dataGridView1, e.Location); 345 | } 346 | 347 | } 348 | 349 | private void copyThisRowToolStripMenuItem_Click(object sender, EventArgs e) 350 | { 351 | var cell = contextMenuStrip1.Tag as DataGridViewCell; 352 | var row = cell.OwningRow; 353 | StringHolder sh = new StringHolder(); 354 | sh.textIDFld = row.Cells[0].Value.ToString(); 355 | sh.displayTextFld = row.Cells[1].Value.ToString(); 356 | 357 | MainUI.copiedValuesStrHolders.Add(sh); 358 | } 359 | 360 | 361 | protected override bool ProcessDialogKey(Keys keyData) 362 | { 363 | if (Form.ModifierKeys == Keys.None && keyData == Keys.Escape) 364 | { 365 | this.Close(); 366 | return true; 367 | } else 368 | { 369 | if ((keyData & Keys.Control) == Keys.Control && (keyData & Keys.S) == Keys.S) // Ctrl-S Save 370 | { 371 | saveAndExit(); 372 | } 373 | } 374 | return base.ProcessDialogKey(keyData); 375 | } 376 | 377 | private void copySelectedRowsToolStripMenuItem_Click(object sender, EventArgs e) 378 | { 379 | CopySelectedRows(); 380 | } 381 | } 382 | } 383 | -------------------------------------------------------------------------------- /Source/TS4 STBL Editor.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {8DB258C2-72B6-4A6F-ADCD-5B0ECFA78764} 8 | WinExe 9 | Properties 10 | TS4_STBL_Editor 11 | TS4 STBL Editor 12 | v4.5 13 | 512 14 | true 15 | 16 | false 17 | publish\ 18 | true 19 | Disk 20 | false 21 | Foreground 22 | 7 23 | Days 24 | false 25 | false 26 | false 27 | false 28 | 1 29 | 2.1.0.%2a 30 | false 31 | true 32 | true 33 | 34 | 35 | AnyCPU 36 | true 37 | full 38 | true 39 | bin\Debug\ 40 | DEBUG;TRACE 41 | prompt 42 | 4 43 | false 44 | 45 | 46 | AnyCPU 47 | pdbonly 48 | true 49 | bin\Release\ 50 | TRACE 51 | prompt 52 | 4 53 | false 54 | 55 | 56 | TS4Editor.ico 57 | 58 | 59 | E1DA7DF63505931BA6AE4EFC7982AEA9DD1972C5 60 | 61 | 62 | TS4 STBL Editor_TemporaryKey.pfx 63 | 64 | 65 | true 66 | 67 | 68 | LocalIntranet 69 | 70 | 71 | Properties\app.manifest 72 | 73 | 74 | false 75 | 76 | 77 | 78 | False 79 | .\MTS_ArtUrlWWW_FNVHasherDLL.dll 80 | 81 | 82 | s4piDLLs\s4pi.AnimationResources.dll 83 | 84 | 85 | s4piDLLs\s4pi.CASPartResource.dll 86 | 87 | 88 | s4piDLLs\s4pi.CatalogResource.dll 89 | 90 | 91 | s4piDLLs\s4pi.Commons.dll 92 | 93 | 94 | s4piDLLs\s4pi.ComplateResource.dll 95 | 96 | 97 | s4piDLLs\s4pi.Controls.dll 98 | 99 | 100 | s4piDLLs\s4pi.CustomForms.dll 101 | 102 | 103 | s4piDLLs\s4pi.DataResource.dll 104 | 105 | 106 | s4piDLLs\s4pi.DefaultResource.dll 107 | 108 | 109 | s4piDLLs\s4pi.Extensions.dll 110 | 111 | 112 | s4piDLLs\s4pi.Filetable.dll 113 | 114 | 115 | s4piDLLs\s4pi.GenericRCOLResource.dll 116 | 117 | 118 | s4piDLLs\s4pi.Helpers.dll 119 | 120 | 121 | s4piDLLs\s4pi.ImageResource.dll 122 | 123 | 124 | s4piDLLs\s4pi.Interfaces.dll 125 | 126 | 127 | s4piDLLs\s4pi.JazzResource.dll 128 | 129 | 130 | s4piDLLs\s4pi.MeshChunks.dll 131 | 132 | 133 | s4piDLLs\s4pi.MiscellaneousResources.dll 134 | 135 | 136 | s4piDLLs\s4pi.ModularResource.dll 137 | 138 | 139 | s4piDLLs\s4pi.NameMapResource.dll 140 | 141 | 142 | s4piDLLs\s4pi.NGMPHashMapResource.dll 143 | 144 | 145 | s4piDLLs\s4pi.Package.dll 146 | 147 | 148 | s4piDLLs\s4pi.RCOLChunks.dll 149 | 150 | 151 | s4piDLLs\s4pi.Resource.Commons.dll 152 | 153 | 154 | s4piDLLs\s4pi.RigResource.dll 155 | 156 | 157 | s4piDLLs\s4pi.Settings.dll 158 | 159 | 160 | s4piDLLs\s4pi.StblResource.dll 161 | 162 | 163 | s4piDLLs\s4pi.TextResource.dll 164 | 165 | 166 | s4piDLLs\s4pi.TxtcResource.dll 167 | 168 | 169 | s4piDLLs\s4pi.WrapperDealer.dll 170 | 171 | 172 | 173 | 174 | s4piDLLs\System.Custom.dll 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | Form 189 | 190 | 191 | AddString.cs 192 | 193 | 194 | Form 195 | 196 | 197 | Editor.cs 198 | 199 | 200 | Form 201 | 202 | 203 | AboutEditorForm.cs 204 | 205 | 206 | Form 207 | 208 | 209 | SelectSTBLfileinPackage.cs 210 | 211 | 212 | Form 213 | 214 | 215 | HowToCopyMultipleRows.cs 216 | 217 | 218 | Form 219 | 220 | 221 | LangCodesHelp.cs 222 | 223 | 224 | 225 | Form 226 | 227 | 228 | StringPicker.cs 229 | 230 | 231 | Form 232 | 233 | 234 | Form 235 | 236 | 237 | MainUI.cs 238 | 239 | 240 | 241 | 242 | AboutEditorForm.cs 243 | 244 | 245 | AboutEditorForm.cs 246 | 247 | 248 | AboutEditorForm.cs 249 | 250 | 251 | AddString.cs 252 | 253 | 254 | AddString.cs 255 | 256 | 257 | AddString.cs 258 | 259 | 260 | AddString.cs 261 | 262 | 263 | Editor.cs 264 | 265 | 266 | AboutEditorForm.cs 267 | 268 | 269 | Editor.cs 270 | 271 | 272 | Editor.cs 273 | 274 | 275 | HowToCopyMultipleRows.cs 276 | 277 | 278 | LangCodesHelp.cs 279 | 280 | 281 | LangCodesHelp.cs 282 | 283 | 284 | LangCodesHelp.cs 285 | 286 | 287 | MainUI.cs 288 | 289 | 290 | MainUI.cs 291 | 292 | 293 | MainUI.cs 294 | 295 | 296 | MainUI.cs 297 | 298 | 299 | ResXFileCodeGenerator 300 | Resources.Designer.cs 301 | Designer 302 | 303 | 304 | True 305 | Resources.resx 306 | True 307 | 308 | 309 | SelectSTBLfileinPackage.cs 310 | 311 | 312 | StringPicker.cs 313 | 314 | 315 | StringPicker.cs 316 | 317 | 318 | StringPicker.cs 319 | 320 | 321 | 322 | SettingsSingleFileGenerator 323 | Settings.Designer.cs 324 | 325 | 326 | True 327 | Settings.settings 328 | True 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | False 346 | Microsoft .NET Framework 4.5 %28x86 and x64%29 347 | true 348 | 349 | 350 | False 351 | .NET Framework 3.5 SP1 352 | false 353 | 354 | 355 | 356 | 363 | --------------------------------------------------------------------------------