Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions FakeMW2SA/FakeMW2SA.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Helper.cs" />
<Compile Include="HttpClient.cs" />
<Compile Include="PlayerModel.cs" />
<Compile Include="Program.cs" />
Expand All @@ -118,6 +119,15 @@
</ItemGroup>
<ItemGroup>
<Content Include="5832406b04c416771fe0b20549b10d0dc7c679de.ico" />
<Content Include="Html\BootstrapCss.txt" />
<Content Include="Html\ClientJs.txt" />
<Content Include="Html\FakeMWHtml.html" />
<Content Include="Html\jQuery.txt" />
<Content Include="Html\jQueryUI.txt" />
<Content Include="Html\MomentJs.txt" />
<Content Include="Html\Popper.txt" />
<Content Include="Html\Bootstrap.txt" />
<Content Include="Html\SiteCss.txt" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
Expand Down
50 changes: 50 additions & 0 deletions FakeMW2SA/Helper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace FakeMW2SA
{
public static class Helper
{
public static string GetLocalFileContent(string fileName)
{
try
{
string parentPath = AppDomain.CurrentDomain.BaseDirectory;
parentPath = parentPath.Replace(@"\bin\Debug\", "\\");

string filePath = parentPath += "Html" + "\\" + fileName;

return File.ReadAllText(filePath);
}
catch (Exception ex)
{
throw (ex);
}
}

public static string GetCdnContent(string cdnPath)
{
try
{
var webRequest = WebRequest.Create(cdnPath);
string strContent = "";
using (var response = webRequest.GetResponse())
using (var content = response.GetResponseStream())
using (var reader = new StreamReader(content))
{
strContent = reader.ReadToEnd();
}
return strContent;
}
catch (Exception ex)
{
throw (ex);
}
}
}
}
7 changes: 7 additions & 0 deletions FakeMW2SA/Html/Bootstrap.txt

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions FakeMW2SA/Html/BootstrapCss.txt

Large diffs are not rendered by default.

Loading