Skip to content

Commit

Permalink
e
Browse files Browse the repository at this point in the history
  • Loading branch information
T0biasCZe committed Dec 2, 2023
1 parent a251209 commit 3e1805b
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 7 deletions.
14 changes: 13 additions & 1 deletion AdbFileManager/AdbFileManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>

<ItemGroup>
<None Remove="CurrentCommit.txt" />
</ItemGroup>

<ItemGroup>
<Content Include="w7 transfer.ico" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="CurrentCommit.txt" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="WindowsAPICodePack-Core" Version="1.1.2" />
<PackageReference Include="WindowsAPICodePack-Shell" Version="1.1.1" />
Expand All @@ -39,9 +47,13 @@

<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="git rev-parse --short HEAD &gt; &quot;$(ProjectDir)CurrentCommit.txt&quot;" />
</Target>

</Project>
1 change: 1 addition & 0 deletions AdbFileManager/CurrentCommit.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a251209
4 changes: 2 additions & 2 deletions AdbFileManager/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion AdbFileManager/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ public Form1() {
dataGridView1.Columns[3].Width = 115;

//set Console app codepage to UTF-8.
Console.OutputEncoding = System.Text.Encoding.UTF8;
Console.OutputEncoding = System.Text.Encoding.UTF8;
var handle = GetConsoleWindow();
ShowWindow(handle, SW_HIDE);
string versionn = $"{AdbFileManager.Properties.Resources.CurrentCommit.Trim()} 02.12.23";
version.Text = versionn;
Console.WriteLine(versionn);
}

public static string adb(string command) {
Expand Down
16 changes: 13 additions & 3 deletions AdbFileManager/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions AdbFileManager/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,8 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="CurrentCommit" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\CurrentCommit.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;windows-1250</value>
</data>
</root>

0 comments on commit 3e1805b

Please sign in to comment.