Tutorial how to make cleaner !
Firs open Microsoft Visual Studio ! Then
File> New > Project > WPF Application !
This is for clean folder !
Then put this in XAML !
Code:
<Button Content=" XTrap" Margin="26,6,0,56" Foreground="#FF2D3BA0" OpacityMask="#FF0A0A0A" Name="Button6" HorizontalAlignment="Left" Width="80">
<Button.Background>
<ImageBrush />
</Button.Background>
<Button.Effect>
<DropShadowEffect BlurRadius="10" Color="#FF33E812" ShadowDepth="0" />
</Button.Effect>
<Button.BorderBrush>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0.016" />
<GradientStop Color="#FF2E4886" Offset="1" />
<GradientStop Color="Black" Offset="0.016" />
</LinearGradientBrush>
</Button.BorderBrush>
</Button>
<Button Content="Log" Height="23" Margin="111,6,102,0" VerticalAlignment="Top" Name="Button7">
<Button.Effect>
<DropShadowEffect BlurRadius="10" Color="Red" ShadowDepth="1" RenderingBias="Quality" />
</Button.Effect>
</Button>
After that double click on button and leech my code again :
Code:
System****.Directory.CreateDirectory("XTrap")
For hgwc :
Code:
System****.Directory.CreateDirectory("hgwc")
For Log
Code:
System****.Directory.CreateDirectory("Log")
You can put progressbar , this is code :
Code:
Progressbar1.Value= 100
Now code for restore patcher_cf
Code:
If IO.File.Exists("patcher_cf.exe") = False Then
Dim Datei As Object = My.Resources.patcher_cf
IO.File.WriteAllBytes("patcher_cf.exe", Datei)
End If
And finally code for delete dll :
Code:
If My.Computer.FileSystem.FileExists("SndDrv.dll") Then
My.Computer.FileSystem.DeleteFile("SndDrv.dll")
MsgBox("Deleted")
ProgressBar1.Value = 99
Else
MsgBox("Dll does not exists")
End If
If you want refresh button or restart copy my code again :
Code:
System.Diagnostics.Process.Start(Application.ResourceAssembly.Location)
Application.Current.Shutdown()