Skip to content

Commit 7585918

Browse files
committed
Files
0 parents  commit 7585918

14 files changed

Lines changed: 7087 additions & 0 deletions

FlashpointIcon.ico

366 KB
Binary file not shown.

FlashpointInstaller.csproj

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>WinExe</OutputType>
5+
<TargetFramework>net6.0-windows</TargetFramework>
6+
<Nullable>enable</Nullable>
7+
<UseWindowsForms>true</UseWindowsForms>
8+
<ImplicitUsings>enable</ImplicitUsings>
9+
<ApplicationIcon>FlashpointIcon.ico</ApplicationIcon>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<Content Include="FlashpointIcon.ico" />
14+
</ItemGroup>
15+
16+
<ItemGroup>
17+
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.9" />
18+
<PackageReference Include="WindowsAPICodePack" Version="1.1.3" />
19+
</ItemGroup>
20+
21+
<ItemGroup>
22+
<Compile Update="Properties\Resources.Designer.cs">
23+
<DesignTime>True</DesignTime>
24+
<AutoGen>True</AutoGen>
25+
<DependentUpon>Resources.resx</DependentUpon>
26+
</Compile>
27+
</ItemGroup>
28+
29+
<ItemGroup>
30+
<EmbeddedResource Update="Properties\Resources.resx">
31+
<Generator>ResXFileCodeGenerator</Generator>
32+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
33+
</EmbeddedResource>
34+
</ItemGroup>
35+
36+
</Project>

FlashpointInstaller.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.2.32616.157
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FlashpointInstaller", "FlashpointInstaller.csproj", "{6704672A-158E-4FDE-B5C9-76D93296A473}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{6704672A-158E-4FDE-B5C9-76D93296A473}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{6704672A-158E-4FDE-B5C9-76D93296A473}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{6704672A-158E-4FDE-B5C9-76D93296A473}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{6704672A-158E-4FDE-B5C9-76D93296A473}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {FD0B299B-F869-4A5E-8472-CE819BA8900D}
24+
EndGlobalSection
25+
EndGlobal

Install.Designer.cs

Lines changed: 89 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Install.cs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
using System.Net.Http.Handlers;
2+
3+
namespace FlashpointInstaller
4+
{
5+
public partial class Install : Form
6+
{
7+
private static ProgressMessageHandler handler = new(new HttpClientHandler() { AllowAutoRedirect = true });
8+
private HttpClient client = new(handler);
9+
10+
public Install()
11+
{
12+
InitializeComponent();
13+
}
14+
15+
private async void Install_Load(object sender, EventArgs e)
16+
{
17+
handler.HttpReceiveProgress += Install_ReceiveProgress;
18+
19+
byte[] fpData = await client.GetByteArrayAsync("http://localhost/Flashpoint%2010.1%20Infinity.7z");
20+
await File.WriteAllBytesAsync(@"fp.tmp", fpData);
21+
22+
Close();
23+
}
24+
25+
private void Install_ReceiveProgress(object sender, HttpProgressEventArgs e)
26+
{
27+
if (this.IsHandleCreated)
28+
{
29+
Progress.Invoke((MethodInvoker)delegate
30+
{
31+
Progress.Value = (int)((e.BytesTransferred / e.TotalBytes) * Progress.Maximum);
32+
});
33+
34+
Info.Invoke((MethodInvoker)delegate
35+
{
36+
Info.Text = $"Downloading... {e.BytesTransferred / 1000000} of {e.TotalBytes / 1000000}";
37+
});
38+
}
39+
}
40+
41+
private void Cancel_Click(object sender, EventArgs e)
42+
{
43+
client.DeleteAsync("http://localhost/Flashpoint%2010.1%20Infinity.7z");
44+
client.CancelPendingRequests();
45+
Close();
46+
}
47+
}
48+
}

Install.resx

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<root>
2+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
3+
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
4+
<xsd:element name="root" msdata:IsDataSet="true">
5+
<xsd:complexType>
6+
<xsd:choice maxOccurs="unbounded">
7+
<xsd:element name="metadata">
8+
<xsd:complexType>
9+
<xsd:sequence>
10+
<xsd:element name="value" type="xsd:string" minOccurs="0" />
11+
</xsd:sequence>
12+
<xsd:attribute name="name" use="required" type="xsd:string" />
13+
<xsd:attribute name="type" type="xsd:string" />
14+
<xsd:attribute name="mimetype" type="xsd:string" />
15+
<xsd:attribute ref="xml:space" />
16+
</xsd:complexType>
17+
</xsd:element>
18+
<xsd:element name="assembly">
19+
<xsd:complexType>
20+
<xsd:attribute name="alias" type="xsd:string" />
21+
<xsd:attribute name="name" type="xsd:string" />
22+
</xsd:complexType>
23+
</xsd:element>
24+
<xsd:element name="data">
25+
<xsd:complexType>
26+
<xsd:sequence>
27+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
28+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
29+
</xsd:sequence>
30+
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
31+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
32+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
33+
<xsd:attribute ref="xml:space" />
34+
</xsd:complexType>
35+
</xsd:element>
36+
<xsd:element name="resheader">
37+
<xsd:complexType>
38+
<xsd:sequence>
39+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
40+
</xsd:sequence>
41+
<xsd:attribute name="name" type="xsd:string" use="required" />
42+
</xsd:complexType>
43+
</xsd:element>
44+
</xsd:choice>
45+
</xsd:complexType>
46+
</xsd:element>
47+
</xsd:schema>
48+
<resheader name="resmimetype">
49+
<value>text/microsoft-resx</value>
50+
</resheader>
51+
<resheader name="version">
52+
<value>2.0</value>
53+
</resheader>
54+
<resheader name="reader">
55+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
56+
</resheader>
57+
<resheader name="writer">
58+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
59+
</resheader>
60+
</root>

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 IWumboYouWumbo
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)