Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
VoronFX committed Sep 10, 2017
1 parent b444b46 commit 80bbbd8
Show file tree
Hide file tree
Showing 13 changed files with 634 additions and 24 deletions.
24 changes: 24 additions & 0 deletions DotNetStringRepacker/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="DotNetStringRepacker.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<userSettings>
<DotNetStringRepacker.Properties.Settings>
<setting name="InputFile" serializeAs="String">
<value />
</setting>
<setting name="OutputFile" serializeAs="String">
<value />
</setting>
<setting name="StringsFile" serializeAs="String">
<value />
</setting>
<setting name="IldasmPath" serializeAs="String">
<value>il\ildasm.exe</value>
</setting>
<setting name="IlasmPath" serializeAs="String">
<value>il\ilasm.exe</value>
</setting>
</DotNetStringRepacker.Properties.Settings>
</userSettings>
</configuration>
39 changes: 38 additions & 1 deletion DotNetStringRepacker/DotNetStringRepacker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -34,14 +36,22 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="CsvHelper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8c4959082be5c823, processorArchitecture=MSIL">
<HintPath>..\packages\CsvHelper.2.16.3.0\lib\net45\CsvHelper.dll</HintPath>
</Reference>
<Reference Include="Gravimage, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Gravimage.1.1.0\lib\Gravimage.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.4.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
Expand Down Expand Up @@ -85,6 +95,7 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand All @@ -93,5 +104,31 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="il\coreclr.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="il\ilasm.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="il\ildasm.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="il\ildasmrc.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!--<Import Project="..\packages\ILAsm.4.5.1.1\build\net\ILAsm.targets" Condition="Exists('..\packages\ILAsm.4.5.1.1\build\net\ILAsm.targets')" />-->
<!--<Target Name="CopyILAsmDasm" BeforeTargets="BeforeBuild">
<ItemGroup>
<ILAsmDasmFiles Include="$(ILAsm_PathToBin)\**\*"/>
</ItemGroup>
<Copy SourceFiles="@(ILAsmDasmFiles)" DestinationFolder="$(OutputPath)\il" SkipUnchangedFiles="True"/>
</Target>-->
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
</Target>
</Project>
102 changes: 98 additions & 4 deletions DotNetStringRepacker/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,102 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:DotNetStringRepacker"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>

</Grid>
Title="DotNet String Repacker" Height="500" Width="700" MinHeight="350" MinWidth="500" Closed="Window_Closed">
<TabControl>
<TabItem x:Name="MainTab" Padding="0" >
<TabItem.Header>
<TextBlock Padding="5,0" Margin="0">Main</TextBlock>
</TabItem.Header>
<TabItem.Content>
<DockPanel LastChildFill="True">
<StackPanel Orientation="Vertical" DockPanel.Dock="Top">
<Label Content="Input file (valid .NET Assembly &quot;.exe&quot; or &quot;.dll&quot; file):" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top"/>
<TextBox Height="23" TextWrapping="NoWrap" Margin="10,0,10,0" x:Name="InputTextBox" Drop="TextBox_Drop" AllowDrop="True" PreviewDragOver="TextBox_PreviewDragOver" />
<Label Content="Output file (file with replaced strings will be written here):" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top"/>
<TextBox Height="23" TextWrapping="NoWrap" Margin="10,0,10,0" x:Name="OutputTextBox" Drop="TextBox_Drop" AllowDrop="True" PreviewDragOver="TextBox_PreviewDragOver" />
<Label Content="Strings file (&quot;.csv&quot; file to/from strings will be exported/loaded):" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top"/>
<TextBox Height="23" TextWrapping="NoWrap" Margin="10,0,10,0" x:Name="StringsFileTextBox" Drop="TextBox_Drop" AllowDrop="True" PreviewDragOver="TextBox_PreviewDragOver" />
<DockPanel Margin="10">
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right" HorizontalAlignment="Right" >
<Button Content="Cancel" Margin="0,0,10,0" Padding="5,2" x:Name="CancelButtton" Click="CancelButtton_Click" IsCancel="True" IsEnabled="False"/>
<Button Content="Extract strings" Margin="0,0,10,0" Padding="5,2" x:Name="ExtractButtton" Click="ExtractButtton_Click"/>
<Button Content="Repack application" Padding="5,2" x:Name="RepackButtton" Click="RepackButtton_Click" />
</StackPanel>
<!--<Button DockPanel.Dock="Left" Content="About" Margin="0,0,10,0" Padding="5,2" x:Name="AboutButton" Click="CancelButtton_Click" IsCancel="True" IsEnabled="False"/>-->
<ProgressBar Margin="0,0,10,0" x:Name="ProgressBar"/>
</DockPanel>
</StackPanel>
<TextBox TextWrapping="NoWrap" Margin="10,0,10,10" x:Name="LogTextBox" IsUndoEnabled="False" IsReadOnly="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" />

</DockPanel>
</TabItem.Content>

</TabItem>
<TabItem x:Name="AboutTab" Padding="0" >
<TabItem.Header>
<TextBlock Padding="5,0" Margin="0">About</TextBlock>
</TabItem.Header>
<TabItem.Content>
<StackPanel Margin="5">
<Label Content="DotNet String Repacker" FontWeight="Bold" FontSize="14" />
<Label>
<TextBlock TextWrapping="WrapWithOverflow">
This program allows extract and replace strings in .NET application.
</TextBlock>
</Label>

<StackPanel Orientation="Horizontal">
<Label Content="Version:" FontWeight="Bold" />
<Label x:Name="VersionLabel" Content=""/>
</StackPanel>

<Label x:Name="ProjectWebsiteLabel">
<TextBlock TextWrapping="WrapWithOverflow">
<TextBlock FontWeight="Bold">Project website: </TextBlock>
<Hyperlink NavigateUri="https://github.com/VoronFX/DotNet-String-Repacker" >https://github.com/VoronFX/DotNet-String-Repacker</Hyperlink>
</TextBlock>
</Label>

<!--<Label x:Name="CopyrightLabel">
<TextBlock TextWrapping="WrapWithOverflow">
<TextBlock FontWeight="Bold">Copyright: </TextBlock>
@ 2015 Voron.exe<LineBreak/> All rights reserved.
</TextBlock>
</Label>-->

<GroupBox Margin="5">
<GroupBox.Header>
<TextBlock FontWeight="Bold" FontSize="14">Author</TextBlock>
</GroupBox.Header>
<StackPanel Orientation="Horizontal">
<Image x:Name="AuthorGravatar" Margin="10,5,10,5" Loaded="AuthorGravatar_Loaded" />
<StackPanel>
<Label Content="Igor Voronin" FontWeight="Bold" />

<StackPanel Orientation="Horizontal">
<Label Content="GitHub:" FontWeight="Bold" />
<Label>
<Hyperlink NavigateUri="https://github.com/VoronFX" >VoronFX</Hyperlink>
</Label>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Content="Email:" FontWeight="Bold" />
<Label>
<Hyperlink NavigateUri="mailto:[email protected]" >[email protected]</Hyperlink>
</Label>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Content="Skype:" FontWeight="Bold" />
<Label>
<Hyperlink NavigateUri="skype:Voron.exe?chat:Voron.exe">Voron.exe</Hyperlink>
</Label>
</StackPanel>
</StackPanel>
</StackPanel>
</GroupBox>
</StackPanel>
</TabItem.Content>
</TabItem>
</TabControl>

</Window>
Loading

0 comments on commit 80bbbd8

Please sign in to comment.