Nothing to read...
a lot to read:
asfhisahofhsdofhooooooooooooooooofsjdfpjsdpfjspdjfjsdfjsdfhshdfoshdfohsodfhsohdfohsofhs
#pragma once #include "betmanager.h" #include "mainmenu.h"
namespace SaltyBet_Manual {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Summary for playernames
/// </summary>
public ref class playernames : public System::Windows::Forms::Form
{
public:
int^ nr; //number of player that will come from main menu
int^ pool; //player bet pool
public:
playernames(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
playernames(int^ numberofplayers, int^ playerpool) //overloading the constructor that information is passed
{
InitializeComponent();
nr = numberofplayers;
pool = playerpool;
//
//TODO: Add the constructor code here
//
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~playernames()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::PictureBox^ pictureBox1;
protected:
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::Label^ label4;
private: System::Windows::Forms::TextBox^ textBox1;
private: System::Windows::Forms::TextBox^ textBox2;
private: System::Windows::Forms::TextBox^ textBox3;
private: System::Windows::Forms::TextBox^ textBox4;
private: System::Windows::Forms::Label^ label5;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Button^ button2;
private: System::Windows::Forms::LinkLabel^ linkLabel1;
private: System::Windows::Forms::Label^ label6;
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code ///
}
#pragma endregion private: System::Void playernames_Load(System::Object^ sender, System::EventArgs^ e) {
//put code in here for when the systems loads
switch (System::Convert::ToInt32(nr)) //in order to show only the labels and text boxes tahat are necessary
{
case 1:
// making unnecessary labels invisable
label2->Visible = false;
label3->Visible = false;
label4->Visible = false;
// making unnecessary text boxes invisable
textBox2->Visible = false;
textBox3->Visible = false;
textBox4->Visible = false;
break;
case 2:
// making unnecessary labels invisable
label3->Visible = false;
label4->Visible = false;
// making unnecessary text boxes invisable
textBox3->Visible = false;
textBox4->Visible = false;
break;
case 3:
// making unnecessary labels invisable
label4->Visible = false;
// making unnecessary text boxes invisable
textBox4->Visible = false;
break;
default:
break;
}
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
//go back to main menu
this->Hide(); // will close the player names window
mainmenu^ mm = gcnew mainmenu(); // call the main menu constructor
mm->ShowDialog(); // will open the main menu
} private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
//go to bet manager menu
int numberp = System::Convert::ToInt16(nr);
int np1 = System::Convert::ToInt16(textBox1->Text);
int np2 = System::Convert::ToInt16(textBox2->Text);
int np3 = System::Convert::ToInt16(textBox3->Text);
int np4 = System::Convert::ToInt16(textBox4->Text);
//go to bet manager
this->Hide(); // will close the player names window
betmanager^ bm = gcnew betmanager(numberp, np1, np2, np3, np4); // call the bet manager constructor
bm->ShowDialog(); // will open the bet manager
} }; }