Skip to content

Commit

Permalink
Amiibomb v0.3 Alpha
Browse files Browse the repository at this point in the history
AmiiBomb v0.3 Alpha
AmiiBombuino v0.1 Alpha
  • Loading branch information
AcK77 committed May 28, 2017
1 parent dbf2d2d commit 91ef388
Show file tree
Hide file tree
Showing 40 changed files with 5,950 additions and 258 deletions.
64 changes: 49 additions & 15 deletions AmiiBomb/About_Form.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

87 changes: 86 additions & 1 deletion AmiiBomb/About_Form.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
using System.Diagnostics;
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;

namespace AmiiBomb
{
public partial class About_Form : Form
{
[DllImport("user32.dll")]
static extern int SetScrollPos(IntPtr hWnd, int nBar, int nPos, bool bRedraw);
[DllImport("user32.dll")]
static extern int SendMessage(IntPtr hWnd, int wMsg, int wParam, int lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, ref RECT lParam);

[StructLayout(LayoutKind.Sequential)]
struct RECT
{
public int Left, Top, Right, Bottom;
}

Thread thTextBox_Animate, thTextBox_Animate2, thTextBox_Animate3;

public About_Form()
{
InitializeComponent();
Expand Down Expand Up @@ -43,6 +61,73 @@ private void button1_Click(object sender, System.EventArgs e)
private void About_Form_Shown(object sender, System.EventArgs e)
{
Translate_Class.Translate(this);
thTextBox_Animate = new Thread(() => AnimateTxtBox(textBox2));
thTextBox_Animate.Start();

thTextBox_Animate2 = new Thread(() => AnimateTxtBox(textBox3));
thTextBox_Animate2.Start();

thTextBox_Animate3 = new Thread(() => AnimateTxtBox(textBox4));
thTextBox_Animate3.Start();
}

private void AnimateTxtBox(TextBox txtBox)
{
int Down_Up = 1;
int i = 0;

while(true)
{
txtBox.Invoke((MethodInvoker)delegate
{
SetScrollPos(txtBox.Handle, 0x1, i, true);
SendMessage(txtBox.Handle, 0x115, 4 + 0x10000 * i, 0);
});

if (Down_Up == 1)
{
var rect = new RECT();
var count = 1;
txtBox.Invoke((MethodInvoker)delegate
{
SendMessage(txtBox.Handle, 0xB2, IntPtr.Zero, ref rect);
count = (rect.Bottom - rect.Top) / txtBox.Font.Height;
});

if (i < txtBox.Lines.Length - count) i++;
else Down_Up = 0;
}

if (Down_Up == 0)
{
if (i > 0) i--;
else Down_Up = 1;
}

Thread.Sleep(800);
}
}

private void textBox2_Click(object sender, EventArgs e)
{
if (thTextBox_Animate.IsAlive) thTextBox_Animate.Abort();
}

private void textBox4_Click(object sender, EventArgs e)
{
if (thTextBox_Animate3.IsAlive) thTextBox_Animate3.Abort();
}

private void textBox3_Click(object sender, EventArgs e)
{
if (thTextBox_Animate2.IsAlive) thTextBox_Animate2.Abort();
}

private void About_Form_FormClosed(object sender, FormClosedEventArgs e)
{
if (thTextBox_Animate.IsAlive) thTextBox_Animate.Abort();
if (thTextBox_Animate2.IsAlive) thTextBox_Animate2.Abort();
if (thTextBox_Animate3.IsAlive) thTextBox_Animate3.Abort();
}
}
}
16 changes: 11 additions & 5 deletions AmiiBomb/About_Form.resx
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,24 @@ https://github.com/Falco20019/libamiibo
-&gt; AngleSharp
https://anglesharp.github.io/

-&gt; Christophe Diericx for
ArduinoSketchUploader
-&gt; Christophe Diericx for ArduinoSketchUploader
https://github.com/christophediericx/ArduinoSketchUploader

-&gt; MoonGateLabs for i18n-Unity-CSharp
https://github.com/MoonGateLabs/i18n-unity-csharp</value>
https://github.com/MoonGateLabs/i18n-unity-csharp

-&gt; Joel Coenraadts for HID-Sharp
https://github.com/jcoenraadts/hid-sharp</value>
</data>
<data name="textBox3.Text" xml:space="preserve">
<value>-&gt; Socram8888 for Amiitool
https://github.com/socram8888/amiitool

-&gt; John "LouieGeetoo" Pray for Amiibo.life
http://www.amiibo.life
http://www.amiibo.life/

-&gt; N3evin for AmiiboAPI
http://amiiboapi.herokuapp.com/

-&gt; Konstantin-Kelemen for Arduino Sketches and his guide
https://github.com/konstantin-kelemen/arduino-amiibo-tools
Expand All @@ -147,7 +152,8 @@ https://gist.github.com/bkifft/c6fa52dc39e29b85cb2787ac6dd633ed
-&gt; Contributors of 3DBrew.org
https://www.3dbrew.org/wiki/Amiibo

-&gt; And many others for various informations on Amiibo...</value>
-&gt; And many others for various informations on Amiibo...
</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
Expand Down
31 changes: 30 additions & 1 deletion AmiiBomb/AmiiBomb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<Compile Include="Arduino_Form.Designer.cs">
<DependentUpon>Arduino_Form.cs</DependentUpon>
</Compile>
<Compile Include="Class\AmiiboLife_Class.cs" />
<Compile Include="Class\AmiiboInfo_Class.cs" />
<Compile Include="Class\Amiibo_Class.cs" />
<Compile Include="Class\ArduinoUploader\ArduinoSketchUploader.cs" />
<Compile Include="Class\ArduinoUploader\ArduinoSketchUploaderOptions.cs" />
Expand Down Expand Up @@ -181,6 +181,7 @@
<Compile Include="Class\COM_Class.cs" />
<Compile Include="Class\Config_Class.cs" />
<Compile Include="Class\CountryCode_Class.cs" />
<Compile Include="Class\HIDInterface_Class.cs" />
<Compile Include="Class\I18n_Class.cs" />
<Compile Include="Class\libamiibo\AmiiboKeys.cs" />
<Compile Include="Class\libamiibo\ArraySegmentExtensions.cs" />
Expand All @@ -192,6 +193,12 @@
<Compile Include="Class\NLog_Class.cs" />
<Compile Include="Class\SimpleJSON_Class.cs" />
<Compile Include="Class\Translate_Class.cs" />
<Compile Include="Editor_TPWolf_Form.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Editor_TPWolf_Form.Designer.cs">
<DependentUpon>Editor_TPWolf_Form.cs</DependentUpon>
</Compile>
<Compile Include="Flash_Form.cs">
<SubType>Form</SubType>
</Compile>
Expand All @@ -205,6 +212,12 @@
<DependentUpon>Main_Form.cs</DependentUpon>
</Compile>
<Compile Include="Class\Helper_Class.cs" />
<Compile Include="PowerSaves_Form.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PowerSaves_Form.Designer.cs">
<DependentUpon>PowerSaves_Form.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="About_Form.resx">
Expand All @@ -213,12 +226,18 @@
<EmbeddedResource Include="Arduino_Form.resx">
<DependentUpon>Arduino_Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Editor_TPWolf_Form.resx">
<DependentUpon>Editor_TPWolf_Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Flash_Form.resx">
<DependentUpon>Flash_Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Main_Form.resx">
<DependentUpon>Main_Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PowerSaves_Form.resx">
<DependentUpon>PowerSaves_Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<SubType>Designer</SubType>
Expand Down Expand Up @@ -253,6 +272,16 @@
</ItemGroup>
<ItemGroup>
<Content Include="AmiiBomb_Icon.ico" />
<None Include="ico\Hearts\Heart_Full.png" />
<None Include="ico\Hearts\Heart_0.75.png" />
<None Include="ico\Hearts\Heart_0.25.png" />
<None Include="ico\Hearts\Heart_0.5.png" />
<None Include="ico\page_edit.png" />
<None Include="ico\AmiiBomb-logo.png" />
<None Include="ico\powertag-logo.png" />
<None Include="ico\layout_content.png" />
<None Include="ico\layers.png" />
<None Include="ico\magnifier.png" />
<None Include="ico\package_go.png" />
<None Include="ico\key_go.png" />
<None Include="ico\key_delete.png" />
Expand Down
Loading

0 comments on commit 91ef388

Please sign in to comment.