This commit is contained in:
6
PROMS/BarakahConvert/CPPConvert/App.config
Normal file
6
PROMS/BarakahConvert/CPPConvert/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
||||
</startup>
|
||||
</configuration>
|
112
PROMS/BarakahConvert/CPPConvert/CPPConvert.csproj
Normal file
112
PROMS/BarakahConvert/CPPConvert/CPPConvert.csproj
Normal file
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{1153363A-3395-4BBA-A507-4FA69132CDFC}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CPPConvert</RootNamespace>
|
||||
<AssemblyName>CPPConvert</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Csla">
|
||||
<HintPath>..\..\..\..\..\..\..\Development\csla20cs\Csla\bin\Debug\Csla.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevComponents.DotNetBar2, Version=14.0.0.11, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL" />
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\..\..\..\..\..\..\Development\Proms\VEPROMS.CSLA.Library\bin\Debug\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="VEPROMS.CSLA.Library">
|
||||
<HintPath>..\..\..\..\..\..\..\Development\Proms\VEPROMS.CSLA.Library\bin\Debug\VEPROMS.CSLA.Library.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="frmCPPConvert.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmCPPConvert.Designer.cs">
|
||||
<DependentUpon>frmCPPConvert.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="frmCPPConvert.resx">
|
||||
<DependentUpon>frmCPPConvert.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
10
PROMS/BarakahConvert/CPPConvert/CPPConvert.csproj.vspscc
Normal file
10
PROMS/BarakahConvert/CPPConvert/CPPConvert.csproj.vspscc
Normal file
@@ -0,0 +1,10 @@
|
||||
""
|
||||
{
|
||||
"FILE_VERSION" = "9237"
|
||||
"ENLISTMENT_CHOICE" = "NEVER"
|
||||
"PROJECT_FILE_RELATIVE_PATH" = "relative:CPPConvert"
|
||||
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||
}
|
22
PROMS/BarakahConvert/CPPConvert/Program.cs
Normal file
22
PROMS/BarakahConvert/CPPConvert/Program.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CPPConvert
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new frmCPPConvert());
|
||||
}
|
||||
}
|
||||
}
|
36
PROMS/BarakahConvert/CPPConvert/Properties/AssemblyInfo.cs
Normal file
36
PROMS/BarakahConvert/CPPConvert/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("CPPConvert")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CPPConvert")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("1e1f432a-54d7-4c79-a5ed-c8c863ca75b0")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
63
PROMS/BarakahConvert/CPPConvert/Properties/Resources.Designer.cs
generated
Normal file
63
PROMS/BarakahConvert/CPPConvert/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CPPConvert.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CPPConvert.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
117
PROMS/BarakahConvert/CPPConvert/Properties/Resources.resx
Normal file
117
PROMS/BarakahConvert/CPPConvert/Properties/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
26
PROMS/BarakahConvert/CPPConvert/Properties/Settings.Designer.cs
generated
Normal file
26
PROMS/BarakahConvert/CPPConvert/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CPPConvert.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
236
PROMS/BarakahConvert/CPPConvert/frmCPPConvert.Designer.cs
generated
Normal file
236
PROMS/BarakahConvert/CPPConvert/frmCPPConvert.Designer.cs
generated
Normal file
@@ -0,0 +1,236 @@
|
||||
namespace CPPConvert
|
||||
{
|
||||
partial class frmCPPConvert
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmCPPConvert));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.tbFile = new System.Windows.Forms.TextBox();
|
||||
this.tbResults = new System.Windows.Forms.TextBox();
|
||||
this.btnBrowse = new System.Windows.Forms.Button();
|
||||
this.tbDest = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.btnBrowseDest = new System.Windows.Forms.Button();
|
||||
this.fbd = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.ofd = new System.Windows.Forms.OpenFileDialog();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.processToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.allToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pb = new DevComponents.DotNetBar.Controls.ProgressBarX();
|
||||
this.testToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(14, 30);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(47, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "CPP File";
|
||||
//
|
||||
// tbFile
|
||||
//
|
||||
this.tbFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tbFile.Location = new System.Drawing.Point(83, 27);
|
||||
this.tbFile.Name = "tbFile";
|
||||
this.tbFile.Size = new System.Drawing.Size(482, 20);
|
||||
this.tbFile.TabIndex = 1;
|
||||
this.tbFile.Text = "C:\\Development\\Proms\\Barakah\\SGTR\\1N2-OP-EOP-RC-0002 Rev00 - Steam Generator Tube" +
|
||||
" Rupture (CPS-CPP).cpp";
|
||||
//
|
||||
// tbResults
|
||||
//
|
||||
this.tbResults.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tbResults.Location = new System.Drawing.Point(12, 124);
|
||||
this.tbResults.Multiline = true;
|
||||
this.tbResults.Name = "tbResults";
|
||||
this.tbResults.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.tbResults.Size = new System.Drawing.Size(637, 169);
|
||||
this.tbResults.TabIndex = 3;
|
||||
//
|
||||
// btnBrowse
|
||||
//
|
||||
this.btnBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnBrowse.Location = new System.Drawing.Point(571, 25);
|
||||
this.btnBrowse.Name = "btnBrowse";
|
||||
this.btnBrowse.Size = new System.Drawing.Size(72, 23);
|
||||
this.btnBrowse.TabIndex = 4;
|
||||
this.btnBrowse.Text = "Browse...";
|
||||
this.btnBrowse.UseVisualStyleBackColor = true;
|
||||
this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
|
||||
//
|
||||
// tbDest
|
||||
//
|
||||
this.tbDest.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tbDest.Location = new System.Drawing.Point(83, 53);
|
||||
this.tbDest.Name = "tbDest";
|
||||
this.tbDest.Size = new System.Drawing.Size(482, 20);
|
||||
this.tbDest.TabIndex = 5;
|
||||
this.tbDest.Text = "C:\\Development\\Proms\\Barakah\\EOP CPPs\\Output";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(14, 53);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(60, 13);
|
||||
this.label2.TabIndex = 6;
|
||||
this.label2.Text = "Destination";
|
||||
//
|
||||
// btnBrowseDest
|
||||
//
|
||||
this.btnBrowseDest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnBrowseDest.Location = new System.Drawing.Point(571, 50);
|
||||
this.btnBrowseDest.Name = "btnBrowseDest";
|
||||
this.btnBrowseDest.Size = new System.Drawing.Size(72, 23);
|
||||
this.btnBrowseDest.TabIndex = 7;
|
||||
this.btnBrowseDest.Text = "Browse...";
|
||||
this.btnBrowseDest.UseVisualStyleBackColor = true;
|
||||
this.btnBrowseDest.Click += new System.EventHandler(this.btnBrowseDest_Click);
|
||||
//
|
||||
// ofd
|
||||
//
|
||||
this.ofd.FileName = "openFileDialog1";
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(661, 24);
|
||||
this.menuStrip1.TabIndex = 8;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.processToolStripMenuItem,
|
||||
this.allToolStripMenuItem,
|
||||
this.testToolStripMenuItem,
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// processToolStripMenuItem
|
||||
//
|
||||
this.processToolStripMenuItem.Name = "processToolStripMenuItem";
|
||||
this.processToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.processToolStripMenuItem.Text = "&Process";
|
||||
this.processToolStripMenuItem.Click += new System.EventHandler(this.processToolStripMenuItem_Click);
|
||||
//
|
||||
// allToolStripMenuItem
|
||||
//
|
||||
this.allToolStripMenuItem.Name = "allToolStripMenuItem";
|
||||
this.allToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.allToolStripMenuItem.Text = "&All";
|
||||
this.allToolStripMenuItem.Click += new System.EventHandler(this.allToolStripMenuItem_Click);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.exitToolStripMenuItem.Text = "E&xit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// pb
|
||||
//
|
||||
this.pb.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
//
|
||||
//
|
||||
//
|
||||
this.pb.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.pb.Location = new System.Drawing.Point(12, 91);
|
||||
this.pb.Name = "pb";
|
||||
this.pb.Size = new System.Drawing.Size(637, 23);
|
||||
this.pb.TabIndex = 9;
|
||||
this.pb.Text = "progressBarX1";
|
||||
//
|
||||
// testToolStripMenuItem
|
||||
//
|
||||
this.testToolStripMenuItem.Name = "testToolStripMenuItem";
|
||||
this.testToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.testToolStripMenuItem.Text = "&Test";
|
||||
this.testToolStripMenuItem.Click += new System.EventHandler(this.testToolStripMenuItem_Click);
|
||||
//
|
||||
// frmCPPConvert
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(661, 305);
|
||||
this.Controls.Add(this.pb);
|
||||
this.Controls.Add(this.btnBrowseDest);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.tbDest);
|
||||
this.Controls.Add(this.btnBrowse);
|
||||
this.Controls.Add(this.tbResults);
|
||||
this.Controls.Add(this.tbFile);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "frmCPPConvert";
|
||||
this.Text = "Extract XML and Image Files";
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox tbFile;
|
||||
private System.Windows.Forms.TextBox tbResults;
|
||||
private System.Windows.Forms.Button btnBrowse;
|
||||
private System.Windows.Forms.TextBox tbDest;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Button btnBrowseDest;
|
||||
private System.Windows.Forms.FolderBrowserDialog fbd;
|
||||
private System.Windows.Forms.OpenFileDialog ofd;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem processToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private DevComponents.DotNetBar.Controls.ProgressBarX pb;
|
||||
private System.Windows.Forms.ToolStripMenuItem allToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem testToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
310
PROMS/BarakahConvert/CPPConvert/frmCPPConvert.cs
Normal file
310
PROMS/BarakahConvert/CPPConvert/frmCPPConvert.cs
Normal file
@@ -0,0 +1,310 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
namespace CPPConvert
|
||||
{
|
||||
public partial class frmCPPConvert : Form
|
||||
{
|
||||
public frmCPPConvert()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private long _Offset;
|
||||
private static long _lastPos = 0l;
|
||||
private void ReadRecord(BinaryReader br)
|
||||
{
|
||||
long curPos = FS.Position;
|
||||
int nxtPos = PathStartList[0];
|
||||
if (nxtPos - 4 != curPos)
|
||||
{
|
||||
Console.WriteLine("curpos, nxtpos, lastpos\t{0:X08}\t{1:X08}", curPos - _lastPos, nxtPos- _lastPos);
|
||||
FS.Seek(nxtPos - 4, SeekOrigin.Begin);
|
||||
}
|
||||
PathStartList.RemoveAt(0);
|
||||
_lastPos = FS.Position;
|
||||
string filePath = ReadString(br);
|
||||
Console.WriteLine(filePath.Substring(120,filePath.Length-120));
|
||||
string type = ReadString(br);
|
||||
int pos = (int) FS.Position;
|
||||
byte [] buf = ReadBuffer(br);
|
||||
int size = buf.Length;
|
||||
if (buf.Length > 4 && StartsWith(buf, "<?xml"))
|
||||
{
|
||||
int HowMany0Ds = 0;
|
||||
int HowMany0As = 0;
|
||||
int j = 0;
|
||||
while (j < buf.Length - HowMany0As - HowMany0Ds)
|
||||
{
|
||||
if (buf[j] == 0x0D) HowMany0Ds++;
|
||||
if (buf[j] == 0x0A) HowMany0As++;
|
||||
j++;
|
||||
}
|
||||
int misMatch = HowMany0As - HowMany0Ds;
|
||||
if (misMatch > 0)
|
||||
{
|
||||
FS.Position = pos + buf.Length + 4 - misMatch;
|
||||
size -= misMatch;
|
||||
}
|
||||
}
|
||||
|
||||
//Console.WriteLine("filePath={0}\r\ntype={1}", filePath, type);
|
||||
if(type.ToLower().Contains("procedure"))
|
||||
{
|
||||
tbResults.AppendText(string.Format("Extracted {0}\r\n",PartialName(filePath,type)));
|
||||
SaveFile(filePath,type,buf,size);
|
||||
}
|
||||
}
|
||||
private string PartialName(string filePath, string type)
|
||||
{
|
||||
int skipSlashes = 2 +type.Length - type.Replace("/", "").Length;
|
||||
int start = filePath.Length;
|
||||
while(skipSlashes-- > 0)
|
||||
start = filePath.LastIndexOf('/', start-1);
|
||||
return filePath.Substring(start+1);
|
||||
}
|
||||
private void SaveFile(string filePath, string type, byte[] buf,int size)
|
||||
{
|
||||
string fn = (tbDest.Text.EndsWith("/") ? tbDest.Text : tbDest.Text + "/") + PartialName(filePath, type);
|
||||
BuildPath(fn);
|
||||
FileStream fs = File.Create(fn);
|
||||
BinaryWriter bw = new BinaryWriter(fs);
|
||||
if (filePath.ToUpper().EndsWith(".PNG") && buf[4]==0xA)
|
||||
{
|
||||
bw.Write(buf, 0, 4);
|
||||
bw.Write(Encoding.ASCII.GetBytes("\xD"));
|
||||
bw.Write(buf, 4, size-4);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
bw.Write(buf,0,size);
|
||||
bw.Close();
|
||||
}
|
||||
private void BuildPath(string fn)
|
||||
{
|
||||
FileInfo fi = new FileInfo(fn);
|
||||
fi.Directory.Create();
|
||||
}
|
||||
private string ReadString(BinaryReader br)
|
||||
{
|
||||
byte[] buffer = ReadBuffer(br);
|
||||
return Encoding.BigEndianUnicode.GetString(buffer, 0, buffer.Length);
|
||||
}
|
||||
private byte[] ReadBuffer(BinaryReader br)
|
||||
{
|
||||
int size = ReadBytesToInt32(br);
|
||||
if (size == -1) size = 0;
|
||||
if(size > FS.Length || size < 0)
|
||||
throw(new Exception(string.Format("Location {0:X08} has a buffer that is too big {1:X08}",FS.Position,size)));
|
||||
byte[] buffer = new byte[size];
|
||||
br.Read(buffer, 0, size);
|
||||
_Offset += size;
|
||||
return buffer;
|
||||
}
|
||||
private int ReadBytesToInt32(BinaryReader br)
|
||||
{
|
||||
byte[] buffer = new byte[4];
|
||||
long off = Offset;
|
||||
br.Read(buffer, 0, 4);
|
||||
int i = BitConverter.ToInt32(buffer.Reverse().ToArray(), 0);
|
||||
//if(i>255) Console.WriteLine("{0:X8} - {1:X8}", off,i);
|
||||
_Offset += 4;
|
||||
return i;
|
||||
}
|
||||
private void btnBrowse_Click(object sender, EventArgs e)
|
||||
{
|
||||
ofd.FileName = tbFile.Text;
|
||||
if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
tbFile.Text = ofd.FileName;
|
||||
}
|
||||
private void btnBrowseDest_Click(object sender, EventArgs e)
|
||||
{
|
||||
fbd.SelectedPath = tbDest.Text;
|
||||
if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
tbDest.Text = fbd.SelectedPath;
|
||||
}
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
public long Offset
|
||||
{
|
||||
get
|
||||
{
|
||||
return FS.Seek(0, SeekOrigin.Current);
|
||||
}
|
||||
}
|
||||
FileStream _FS;
|
||||
public FileStream FS
|
||||
{
|
||||
get { return _FS; }
|
||||
set { _FS = value; }
|
||||
}
|
||||
private List<int> _PathStartList;
|
||||
|
||||
public List<int> PathStartList
|
||||
{
|
||||
get { return _PathStartList; }
|
||||
set { _PathStartList = value; }
|
||||
}
|
||||
private List<int> GetPathStartList(string findIt,FileStream fs)
|
||||
{
|
||||
List<int> lst= new List<int>();
|
||||
BinaryReader br = new BinaryReader(FS);
|
||||
int buflen = (int) FS.Length;
|
||||
byte [] buf =br.ReadBytes(buflen);
|
||||
byte[] bFindIt = Encoding.BigEndianUnicode.GetBytes(findIt);
|
||||
int findlen = bFindIt.Length;
|
||||
pb.Text = "Looking for C:/";
|
||||
pb.Maximum = (int) fs.Length;
|
||||
for (int i = 0; i < buflen - 4; i++)
|
||||
{
|
||||
if (buf[i] == bFindIt[0])
|
||||
{
|
||||
int k=0;
|
||||
for (; k < findlen; k++)
|
||||
if (buf[k + i] != bFindIt[k])
|
||||
break;
|
||||
if (k == findlen) lst.Add(i);
|
||||
}
|
||||
pb.Value = i;
|
||||
}
|
||||
pb.Text = "Done";
|
||||
br.Close();
|
||||
return lst;
|
||||
}
|
||||
|
||||
private bool Foundit(byte[] buf, int offset, byte [] bFindIt)
|
||||
{
|
||||
for (int i = 0; i < bFindIt.Length; i++)
|
||||
if (buf[i + offset] != (int)bFindIt[i])
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
private void processToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
tbResults.Clear();
|
||||
ConvertCPP(tbFile.Text);
|
||||
pb.Text = "All Done";
|
||||
}
|
||||
|
||||
private void ConvertCPP(string fileName)
|
||||
{
|
||||
FS = File.OpenRead(fileName);
|
||||
PathStartList = GetPathStartList("C:/", FS);
|
||||
//Console.WriteLine("===> {0} Paths", PathStartList.Count);
|
||||
FS = File.OpenRead(fileName);
|
||||
BinaryReader br = new BinaryReader(FS);
|
||||
try
|
||||
{
|
||||
_Offset = 0;
|
||||
int nRecords = ReadBytesToInt32(br);
|
||||
//Console.WriteLine("===> {0} Records", nRecords);
|
||||
int i = 0;
|
||||
pb.Text = "Splitting File";
|
||||
pb.Maximum = nRecords;
|
||||
while (_Offset < FS.Length && nRecords-- > 0)
|
||||
{
|
||||
ReadRecord(br);
|
||||
pb.Value = ++i;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
tbResults.AppendText(string.Format("{0} - {1}-{2}\r\n{3}\r\n\r\n", fileName, ex.GetType().Name, ex.Message, ex.StackTrace));
|
||||
}
|
||||
finally
|
||||
{
|
||||
br.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void allToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
tbResults.Clear();
|
||||
FileInfo[] myFiles = new FileInfo(tbFile.Text).Directory.GetFiles("*.cpp");
|
||||
foreach (FileInfo fi in myFiles)
|
||||
ConvertCPP(fi.FullName);
|
||||
pb.Text = "All Done";
|
||||
}
|
||||
|
||||
private void testToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
FS = File.OpenRead(tbFile.Text);
|
||||
PathStartList = GetPathStartList("C:/", FS);
|
||||
FS = File.OpenRead(tbFile.Text);
|
||||
BinaryReader br = new BinaryReader(FS);
|
||||
int nRecords = ReadBytesToInt32(br);
|
||||
int bytesRead = 4;
|
||||
int countByThree = 0;
|
||||
while (bytesRead < FS.Length)
|
||||
{
|
||||
if(countByThree % 3 == 0)
|
||||
{
|
||||
long curPos = FS.Position;
|
||||
int nxtPos = PathStartList[0];
|
||||
if (nxtPos - 4 != curPos)
|
||||
{
|
||||
Console.WriteLine("curpos, nxtpos, lastpos\t{0:X08}\t{1:X08}", curPos - _lastPos, nxtPos - _lastPos);
|
||||
FS.Seek(nxtPos - 4, SeekOrigin.Begin);
|
||||
}
|
||||
PathStartList.RemoveAt(0);
|
||||
}
|
||||
_lastPos = FS.Position;
|
||||
long pos = FS.Position;
|
||||
int size = ReadBytesToInt32(br);
|
||||
bytesRead += 4;
|
||||
byte[] buf = br.ReadBytes(size);
|
||||
bytesRead += size;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append(string.Format("{0:D4} {1:X08} {2:X08} ",countByThree ,pos,size));
|
||||
for (int i = 0; i < 120 && i < size; i++)
|
||||
{
|
||||
if(buf[i] < 0x20)
|
||||
sb.Append('.');
|
||||
else
|
||||
sb.Append((char) buf[i]);
|
||||
}
|
||||
Console.WriteLine(sb.ToString());
|
||||
if (StartsWith(buf, "<?xml"))
|
||||
{
|
||||
int HowMany0Ds = 0;
|
||||
int HowMany0As = 0;
|
||||
int j = 0;
|
||||
while (j < buf.Length - HowMany0As - HowMany0Ds)
|
||||
{
|
||||
if (buf[j] == 0x0D) HowMany0Ds++;
|
||||
if (buf[j] == 0x0A) HowMany0As++;
|
||||
j++;
|
||||
}
|
||||
int misMatch = HowMany0As - HowMany0Ds;
|
||||
if (misMatch > 0)
|
||||
{
|
||||
FS.Position = pos + size + 4 - misMatch;
|
||||
bytesRead -= misMatch;
|
||||
}
|
||||
}
|
||||
countByThree++;
|
||||
}
|
||||
}
|
||||
|
||||
private bool StartsWith(byte[] buf, string findIt)
|
||||
{
|
||||
byte[] bFindIt = Encoding.ASCII.GetBytes(findIt);
|
||||
int findlen = bFindIt.Length;
|
||||
int k=0;
|
||||
for (; k < findlen; k++)
|
||||
if (buf[k] != bFindIt[k])
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
7339
PROMS/BarakahConvert/CPPConvert/frmCPPConvert.resx
Normal file
7339
PROMS/BarakahConvert/CPPConvert/frmCPPConvert.resx
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user