diff --git a/ArkH.sln b/ArkH.sln new file mode 100644 index 0000000..7bdbb43 --- /dev/null +++ b/ArkH.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26430.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ArkH", "ArkH\ArkH.vbproj", "{811C5D2C-7CD4-459D-8E07-09235D9F6B92}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {811C5D2C-7CD4-459D-8E07-09235D9F6B92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {811C5D2C-7CD4-459D-8E07-09235D9F6B92}.Debug|Any CPU.Build.0 = Debug|Any CPU + {811C5D2C-7CD4-459D-8E07-09235D9F6B92}.Release|Any CPU.ActiveCfg = Release|Any CPU + {811C5D2C-7CD4-459D-8E07-09235D9F6B92}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/ArkH/App.config b/ArkH/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/ArkH/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ArkH/Application.xaml b/ArkH/Application.xaml new file mode 100644 index 0000000..5cd6af6 --- /dev/null +++ b/ArkH/Application.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/ArkH/Application.xaml.vb b/ArkH/Application.xaml.vb new file mode 100644 index 0000000..6d44da7 --- /dev/null +++ b/ArkH/Application.xaml.vb @@ -0,0 +1,6 @@ +Class Application + + ' Ereignisse auf Anwendungsebene wie Startup, Exit und DispatcherUnhandledException + ' können in dieser Datei verarbeitet werden. + +End Class diff --git a/ArkH/ArkH.vbproj b/ArkH/ArkH.vbproj new file mode 100644 index 0000000..b79c56b --- /dev/null +++ b/ArkH/ArkH.vbproj @@ -0,0 +1,196 @@ + + + + Debug + AnyCPU + {811C5D2C-7CD4-459D-8E07-09235D9F6B92} + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} + WinExe + ArkH + ArkH + v4.5.2 + Custom + true + + + AnyCPU + true + full + true + true + true + bin\Debug\ + ArkH.xml + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 + + + AnyCPU + pdbonly + false + false + true + false + true + bin\Release\ + ArkH.xml + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 + + + On + + + Binary + + + Off + + + On + + + mYdLixs.ico + + + + + ..\packages\Infragistics.Themes.MetroDark.Wpf.1.0.0\lib\net40\System.Windows.Controls.Input.Toolkit.dll + True + + + ..\packages\Infragistics.Themes.MetroDark.Wpf.1.0.0\lib\net40\System.Windows.Controls.Layout.Toolkit.dll + True + + + + + + + + 4.0 + + + + + + + ..\packages\Infragistics.Themes.MetroDark.Wpf.1.0.0\lib\net40\WPFToolkit.dll + True + + + + + MSBuild:Compile + Designer + + + + + + Notification.xaml + + + Overlay.xaml + + + + MSBuild:Compile + Designer + + + Application.xaml + Code + + + + MainWindow.xaml + Code + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + + + + + + + + + + + + + + + + + + + + + + Code + + + Microsoft.VisualBasic.WPF.MyExtension + 1.0.0.0 + + + True + True + Resources.resx + + + True + Settings.settings + True + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + + + + SettingsSingleFileGenerator + Settings.Designer.vb + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ArkH/Functions.vb b/ArkH/Functions.vb new file mode 100644 index 0000000..08f72e3 --- /dev/null +++ b/ArkH/Functions.vb @@ -0,0 +1,20 @@ +Module functions + Public Function booltostring(ByVal inbool As Boolean) + Dim outstring As String + If inbool = True Then + outstring = "True" + Else + outstring = "False" + End If + Return outstring + End Function + Public Function stringtobool(ByVal instring As String) + Dim outbool As Boolean + If instring = "True" Then + outbool = True + Else + outbool = False + End If + Return outbool + End Function +End Module diff --git a/ArkH/GetWebAPIinfo.vb b/ArkH/GetWebAPIinfo.vb new file mode 100644 index 0000000..450cf93 --- /dev/null +++ b/ArkH/GetWebAPIinfo.vb @@ -0,0 +1,50 @@ +Imports System.Text.RegularExpressions +Imports System.Net +Imports System.IO +Module getWebAPIinfo + + + + Public Sub getAPIdataFromWeb() + globvar_APIversion = getwebAPIdata("http://arkdedicated.com/version") + globvar_APistatus = getwebAPIdata("http://arkdedicated.com/officialserverstatus.ini") + globvar_APInews = striptags(getwebAPIdata("http://arkdedicated.com/news.ini")) + globvar_serverlist = getwebAPIdata("http://arkdedicated.com/officialservers.ini") + findEvents() + 'MsgBox(globvar_eventmessage) + End Sub + + Private Function getwebAPIdata(ByVal url As String) + Dim request As WebRequest = WebRequest.Create(url) + Dim response As WebResponse = request.GetResponse() + Dim datastream As Stream = response.GetResponseStream() + Dim reader As New StreamReader(datastream) + Dim responsefromserver As String = reader.ReadToEnd() + reader.Close() + response.Close() + Return responsefromserver + End Function + + Private Function striptags(ByVal html As String) As String + Return Regex.Replace(html, "<.*?>", "") + End Function + + + + Private Sub findEvents() + Dim Substrings() As String = globvar_APInews.Split(vbCrLf) + globvar_eventmessage = "" + globvar_eventactive = False + For Each substring In Substrings + 'MsgBox(substring) + If substring.Contains("Phoenix") = True Then + globvar_eventactive = True + globvar_eventmessage = substring + ' MsgBox(substring) + Else + End If + Next + ' MsgBox(globvar_eventmessage) + End Sub + +End Module \ No newline at end of file diff --git a/ArkH/HandleProceses.vb b/ArkH/HandleProceses.vb new file mode 100644 index 0000000..2c7c3b2 --- /dev/null +++ b/ArkH/HandleProceses.vb @@ -0,0 +1,38 @@ +Module HandleProceses + Private Sub checkprocess() + If System.Diagnostics.Process.GetProcessesByName("shootergame").Count > 0 Then + 'Hier gehts weiter wenn der Prozess an ist. + globvar_gamerunning = True + Else + globvar_gamerunning = False + + + End If + + + + + End Sub + + Public Sub startgame() + If System.Diagnostics.Process.GetProcessesByName("shootergame").Count = 0 Then + + Try + If globvar_pathtogame.Contains("Shootergame.exe") = True Then + Process.Start(globvar_pathtogame) + Else + Process.Start(globvar_pathtogame & "\shootergame.exe") + + End If + Catch ex As Exception + MsgBox("Can't start process") + End Try + + End If + End Sub + + + + + +End Module diff --git a/ArkH/MainWindow.xaml b/ArkH/MainWindow.xaml new file mode 100644 index 0000000..0f2c5fd --- /dev/null +++ b/ArkH/MainWindow.xaml @@ -0,0 +1,78 @@ + + + + + + + + + + + + +