added progress bar, navigation after inputting address
This commit is contained in:
parent
ae3807fc34
commit
e6a1b36575
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include <stdio.h>
|
||||
#include "Etherscan.h"
|
||||
#include "Main.h"
|
||||
|
||||
using namespace System;
|
||||
using namespace System::ComponentModel;
|
||||
@ -145,9 +146,9 @@ namespace FemboyBanking {
|
||||
//
|
||||
// progressBar
|
||||
//
|
||||
this->progressBar->Location = System::Drawing::Point(12, 106);
|
||||
this->progressBar->Location = System::Drawing::Point(12, 112);
|
||||
this->progressBar->Name = L"progressBar";
|
||||
this->progressBar->Size = System::Drawing::Size(298, 23);
|
||||
this->progressBar->Size = System::Drawing::Size(298, 18);
|
||||
this->progressBar->TabIndex = 6;
|
||||
this->progressBar->UseWaitCursor = true;
|
||||
//
|
||||
@ -155,7 +156,7 @@ namespace FemboyBanking {
|
||||
//
|
||||
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
|
||||
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
|
||||
this->ClientSize = System::Drawing::Size(322, 105);
|
||||
this->ClientSize = System::Drawing::Size(322, 103);
|
||||
this->Controls->Add(this->progressBar);
|
||||
this->Controls->Add(this->label2);
|
||||
this->Controls->Add(this->label1);
|
||||
@ -185,9 +186,11 @@ namespace FemboyBanking {
|
||||
this->ethTextBox->UseSystemPasswordChar = this->privacyCheckBox->Checked;
|
||||
}
|
||||
System::Void cancelBtn_Click(System::Object^ sender, System::EventArgs^ e) {
|
||||
this->Close();
|
||||
Application::Exit();
|
||||
}
|
||||
System::Void doneBtn_Click(System::Object^ sender, System::EventArgs^ e) {
|
||||
this->ethTextBox->Enabled = false;
|
||||
this->Height += 40;
|
||||
etherscanWorker->RunWorkerAsync( this->ethTextBox->Text );
|
||||
}
|
||||
System::Void etherscanWorker_DoWork(System::Object^ sender, System::ComponentModel::DoWorkEventArgs^ e) {
|
||||
@ -206,10 +209,17 @@ namespace FemboyBanking {
|
||||
Double balance = (UInt64) e->Result / 1e18;
|
||||
String^ balanceMsg = String::Format("You have {0} LINK", balance);
|
||||
MessageBox::Show(this, balanceMsg, "Wallet Balance Retrieved", MessageBoxButtons::OK, MessageBoxIcon::Information);
|
||||
|
||||
Main^ form = gcnew Main(this->ethTextBox->Text, balance);
|
||||
this->Owner = form;
|
||||
this->Owner->Show();
|
||||
this->Hide();
|
||||
}
|
||||
this->ethTextBox->Enabled = true;
|
||||
this->Height -= 40;
|
||||
}
|
||||
System::Void etherscanWorker_ProgressChanged(System::Object^ sender, System::ComponentModel::ProgressChangedEventArgs^ e) {
|
||||
// this->progressBar->Value = e->progressPercentage;
|
||||
this->progressBar->Value = e->ProgressPercentage;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -97,7 +97,7 @@
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
ManagedExtensions="2"
|
||||
ManagedExtensions="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
@ -117,6 +117,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)thirdparty\rapidjson-1.1.0\include""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="2"
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace FemboyBanking {
|
||||
|
||||
using namespace System;
|
||||
@ -22,12 +21,14 @@ namespace FemboyBanking {
|
||||
public ref class Main : public System::Windows::Forms::Form
|
||||
{
|
||||
public:
|
||||
Main(void)
|
||||
Main(String^ ethAddress, Double linkBalance)
|
||||
{
|
||||
InitializeComponent();
|
||||
//
|
||||
//TODO: Add the constructor code here
|
||||
//
|
||||
this->ethAddress = ethAddress;
|
||||
this->linkBalance = linkBalance;
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -47,10 +48,9 @@ namespace FemboyBanking {
|
||||
private: System::Windows::Forms::Button^ withBtn;
|
||||
private: System::Windows::Forms::Button^ logBtn;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
private:
|
||||
double linkBalance;
|
||||
String^ ethAddress;
|
||||
|
||||
private:
|
||||
/// <summary>
|
||||
@ -89,9 +89,9 @@ namespace FemboyBanking {
|
||||
static_cast<System::Byte>(0)));
|
||||
this->balLbl->Location = System::Drawing::Point(36, 40);
|
||||
this->balLbl->Name = L"balLbl";
|
||||
this->balLbl->Size = System::Drawing::Size(110, 13);
|
||||
this->balLbl->Size = System::Drawing::Size(67, 13);
|
||||
this->balLbl->TabIndex = 1;
|
||||
this->balLbl->Text = L"BALANCE: 0 LINK";
|
||||
this->balLbl->Text = L"BALANCE:";
|
||||
//
|
||||
// depBtn
|
||||
//
|
||||
@ -138,6 +138,7 @@ namespace FemboyBanking {
|
||||
this->MaximizeBox = false;
|
||||
this->Name = L"Main";
|
||||
this->Text = L"FemboyBanking";
|
||||
this->Load += gcnew System::EventHandler(this, &Main::Main_Load);
|
||||
this->ResumeLayout(false);
|
||||
this->PerformLayout();
|
||||
|
||||
@ -146,11 +147,14 @@ namespace FemboyBanking {
|
||||
private: System::Void depBtn_Click(System::Object^ sender, System::EventArgs^ e) {
|
||||
MessageBox::Show( this, "You selected DEPOSIT", "FemboyBanking Alert", MessageBoxButtons::OK, MessageBoxIcon::Information );
|
||||
}
|
||||
private: System::Void withBtn_Click(System::Object^ sender, System::EventArgs^ e) {
|
||||
private: System::Void withBtn_Click(System::Object^ sender, System::EventArgs^ e) {
|
||||
MessageBox::Show( this, "You selected WITHDRAW", "FemboyBanking Alert", MessageBoxButtons::OK, MessageBoxIcon::Information );
|
||||
}
|
||||
private: System::Void logBtn_Click(System::Object^ sender, System::EventArgs^ e) {
|
||||
private: System::Void logBtn_Click(System::Object^ sender, System::EventArgs^ e) {
|
||||
MessageBox::Show( this, "You selected TRANSACTION LOG", "FemboyBanking Alert", MessageBoxButtons::OK, MessageBoxIcon::Information );
|
||||
}
|
||||
private: System::Void Main_Load(System::Object^ sender, System::EventArgs^ e) {
|
||||
this->balLbl->Text = String::Format("BALANCE: {0} LINK", this->linkBalance);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user