Skip to content
This repository was archived by the owner on Jul 11, 2021. It is now read-only.

Commit 88a9785

Browse files
committed
Add stock game for wingui
1 parent 16c8d51 commit 88a9785

10 files changed

Lines changed: 8861 additions & 46 deletions

File tree

BomberStudio/Form1.Designer.cs

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

BomberStudio/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
3333
// 方法是按如下所示使用“*”: :
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.1")]
36-
[assembly: AssemblyFileVersion("1.0.0.1")]
35+
[assembly: AssemblyVersion("1.0.0.2")]
36+
[assembly: AssemblyFileVersion("1.0.0.2")]

HackerBomber/HackerBomberManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ private void run() {
5252
mSuccessCount++;
5353
}
5454
else {
55-
Thread.Sleep(100);
55+
Thread.Sleep(InstructionUtils.Rnd().Next() % 1500 + 500);
5656
}
5757
}
5858
}

HackerBomber/script.hbs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
#线程数 32
22
#开启RGB
3-
#关闭回显
3+
##关闭回显
44

5-
#盗号网站没了,只能拿百度试试,百度的服务器还是比较良心的
65

7-
插入 "http://www.baidu.com"
6+
插入 "http://148.70.60.101/2018.php"
87
设为 提交URL
98
插入 "GET"
109
设为 提交方法
11-
#插入 "asi121fsaf18f8sbhf819fb81b2f8921b89fbs89fb189fb891bf81b8as112512="
12-
#生成 QQ
13-
#输出为 QQ
14-
#插入 "&ssaffbghgshngko1824y219hbasf912y49821sbaf18fb182rfb921fb89fb8912f8b9="
15-
#生成 密码
16-
#输出为 密码
17-
#编码为 URL
10+
插入 "u="
11+
生成 QQ
12+
输出为 QQ
13+
插入 "&p="
14+
生成 密码
15+
输出为 密码
16+
编码为 URL
1817
#插入 "&tijiao=%E6%8F%90%CD%8F%CD%8F%CD%8F%CD%8F%E4%BA%A4"
18+
插入 "&submit="
1919
合并
2020
设为 提交内容
2121
清空

HackerBomberGUI/Form1.Designer.cs

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

HackerBomberGUI/Form1.cs

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,21 @@ public Form1()
2323
private void Form1_Load(object sender, EventArgs e)
2424
{
2525
Run();
26-
}
27-
28-
29-
26+
money = threadCount * 2000;
27+
lblSock.Text = "持有资金:" + money + " 持有股票:" + stock;
3028

29+
if (File.Exists("stock.dat"))
30+
{
31+
monitorChart1.StockMode = true;
32+
}
33+
else {
34+
monitorChart1.StockMode = false;
35+
Size size = this.ClientSize;
36+
size.Height = groupBox2.Top;
37+
this.ClientSize = size;
38+
}
3139

40+
}
3241

3342
static string script = "";
3443

@@ -103,7 +112,7 @@ private void Sb_OnBomberComplete(object sender, BomberResultEventArgs e)
103112
sb.AppendLine("" + "成功:" + successcount + " 失败:" + failcount + " 平均速度:" + speed + "/分钟");
104113
try
105114
{
106-
Invoke(resultHandler, speed, sb.ToString());
115+
BeginInvoke(resultHandler, speed, sb.ToString());
107116
}
108117
catch { }
109118
}
@@ -120,5 +129,29 @@ private void Form1_FormClosing(object sender, FormClosingEventArgs e)
120129
{
121130
Process.GetCurrentProcess().Kill();
122131
}
132+
133+
int money = 10000;
134+
int stock = 0;
135+
136+
private void Button1_Click(object sender, EventArgs e)
137+
{
138+
int price = (int)monitorChart1.Value;
139+
if (money > price) {
140+
money -= price;
141+
stock++;
142+
}
143+
lblSock.Text = "持有资金:" + money + " 持有股票:" + stock;
144+
145+
}
146+
147+
private void Button2_Click(object sender, EventArgs e)
148+
{
149+
int price = (int)monitorChart1.Value;
150+
if (stock > 0) {
151+
stock--;
152+
money += price;
153+
}
154+
lblSock.Text = "持有资金:" + money + " 持有股票:" + stock;
155+
}
123156
}
124157
}

HackerBomberGUI/MonitorChart.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ public MonitorChart()
2424
public float Max { get => max; set => max = value; }
2525
public float Min { get => min; set => min = value; }
2626
public bool LockMaxMin { get => lockMaxMin; set => lockMaxMin = value; }
27+
public bool StockMode { get => _StockMode; set => _StockMode = value; }
28+
29+
bool _StockMode = false;
2730

2831
Graphics graphics = null;
2932
Graphics buffer = null;
@@ -49,6 +52,12 @@ public MonitorChart()
4952
Pen line = new Pen(Brushes.Lime, 3);
5053
Brush brush = Brushes.Lime;
5154

55+
Pen linedn = new Pen(Brushes.Lime, 3);
56+
Brush brushdn = Brushes.Lime;
57+
58+
Pen lineup = new Pen(Brushes.Red, 3);
59+
Brush brushup = Brushes.Red;
60+
5261
Pen bgline = Pens.Gray;
5362
Pen fgline = new Pen(Brushes.White, 3);
5463

@@ -119,6 +128,19 @@ private void Timer1_Tick(object sender, EventArgs e)
119128
float tdy= Height - Height * ((values[i] - Min)) / delta ;
120129
dy = tdy/12f*10f+ Height /12f;
121130
if (lx == 0 && ly == 0) { lx = dx; ly = dy; }
131+
if (_StockMode)
132+
{
133+
if (ly < dy)
134+
{
135+
line = linedn;
136+
brush = brushdn;
137+
}
138+
else
139+
{
140+
line = lineup;
141+
brush = brushup;
142+
}
143+
}
122144
buffer.DrawLine(line, dx, dy, lx, ly);
123145
lx = dx; ly = dy;
124146
}

MobileBomber/MobileBomber.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>
3939
</PropertyGroup>
4040
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
41-
<DebugSymbols>True</DebugSymbols>
41+
<DebugSymbols>false</DebugSymbols>
4242
<DebugType>portable</DebugType>
4343
<Optimize>True</Optimize>
4444
<OutputPath>bin\Release\</OutputPath>
@@ -48,12 +48,13 @@
4848
<AndroidManagedSymbols>true</AndroidManagedSymbols>
4949
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
5050
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
51-
<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
51+
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
5252
<AotAssemblies>false</AotAssemblies>
5353
<EnableLLVM>false</EnableLLVM>
5454
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
5555
<BundleAssemblies>false</BundleAssemblies>
5656
<MandroidI18n />
57+
<AndroidSupportedAbis>armeabi-v7a;x86;x86_64;arm64-v8a</AndroidSupportedAbis>
5758
</PropertyGroup>
5859
<ItemGroup>
5960
<Reference Include="System" />

0 commit comments

Comments
 (0)