yes I could but its Visual
yes I could but its Visual C++ 2008 on .NET application platform so btw
the main code here:
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
MessageBox::Show(“Speed Solver v1.0\nBuilt: 06.May.2010\nAuthor: Nagy István\nUniversity of Oradea.\ncontact: [email protected]”,“About”);
}
private: System::Void exitToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
Windows::Forms::DialogResult answer;
answer = MessageBox::Show(“Are you sure?”, “Exit…”,
MessageBoxButtons::YesNo,
MessageBoxIcon::Question,
MessageBoxDefaultButton::Button1 );
if( answer== Windows::Forms::DialogResult::Yes )
this->Close();
}
private: System::Void howToUseToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
w2->ShowDialog(this);
}
private: System::Void abToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
w3->ShowDialog(this);
}
private: System::Void releaseNotesToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
w1->ShowDialog(this);
}
private: System::Void toolStripMenuItem2_Click(System::Object^ sender, System::EventArgs^ e)
{
this->Opacity=1;
toolStripMenuItem2->Checked=true;
toolStripMenuItem3->Checked=false;
toolStripMenuItem4->Checked=false;
toolStripMenuItem5->Checked=false;
toolStripMenuItem6->Checked=false;
toolStripMenuItem7->Checked=false;
}
private: System::Void toolStripMenuItem3_Click(System::Object^ sender, System::EventArgs^ e)
{
this->Opacity=0.90;
toolStripMenuItem2->Checked=false;
toolStripMenuItem3->Checked=true;
toolStripMenuItem4->Checked=false;
toolStripMenuItem5->Checked=false;
toolStripMenuItem6->Checked=false;
toolStripMenuItem7->Checked=false;
}
private: System::Void toolStripMenuItem4_Click(System::Object^ sender, System::EventArgs^ e)
{
this->Opacity=0.80;
toolStripMenuItem2->Checked=false;
toolStripMenuItem3->Checked=false;
toolStripMenuItem4->Checked=true;
toolStripMenuItem5->Checked=false;
toolStripMenuItem6->Checked=false;
toolStripMenuItem7->Checked=false;
}
private: System::Void toolStripMenuItem5_Click(System::Object^ sender, System::EventArgs^ e)
{
this->Opacity=0.70;
toolStripMenuItem2->Checked=false;
toolStripMenuItem3->Checked=false;
toolStripMenuItem4->Checked=false;
toolStripMenuItem5->Checked=true;
toolStripMenuItem6->Checked=false;
toolStripMenuItem7->Checked=false;
}
private: System::Void toolStripMenuItem6_Click(System::Object^ sender, System::EventArgs^ e)
{
this->Opacity=0.50;
toolStripMenuItem2->Checked=false;
toolStripMenuItem3->Checked=false;
toolStripMenuItem4->Checked=false;
toolStripMenuItem5->Checked=false;
toolStripMenuItem6->Checked=true;
toolStripMenuItem7->Checked=false;
}
private: System::Void toolStripMenuItem7_Click(System::Object^ sender, System::EventArgs^ e)
{
this->Opacity=0.30;
toolStripMenuItem2->Checked=false;
toolStripMenuItem3->Checked=false;
toolStripMenuItem4->Checked=false;
toolStripMenuItem5->Checked=false;
toolStripMenuItem6->Checked=false;
toolStripMenuItem7->Checked=true;
}
private: System::Void whatsThisToolStripMenuItem1_Click(System::Object^ sender, System::EventArgs^ e)
{
w4->ShowDialog(this);
}
private: System::Void toolStripButton1_Click(System::Object^ sender, System::EventArgs^ e)
{
w2->ShowDialog(this);
}
private: System::Void toolStripButton2_Click(System::Object^ sender, System::EventArgs^ e)
{
Windows::Forms::DialogResult answer;
answer = MessageBox::Show(“Are you sure?”, “Exit…”,
MessageBoxButtons::YesNo,
MessageBoxIcon::Question,
MessageBoxDefaultButton::Button1 );
if( answer== Windows::Forms::DialogResult::Yes )
this->Close();
}
private: System::Void toolStripButton3_Click(System::Object^ sender, System::EventArgs^ e)
{
w3->ShowDialog(this);
}
private: System::Void whatsThisToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
}
private: System::Void checkBox1_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
{
if(checkBox1->Checked)
if(checkBox2->Checked==false)
{
label2->Text=“Vehicle speed (cm/s)”;
label4->Text=“Wheel diameter (mm)”;
textBox1->Clear();
textBox2->Clear();
textBox3->Clear();
}
else
{
checkBox2->Checked=false;
label2->Text=“Vehicle speed (cm/s)”;
label4->Text=“Wheel diameter (mm)”;
textBox1->Clear();
textBox2->Clear();
textBox3->Clear();
}
else
{
checkBox1->Checked=false;
label2->Text=“Vehicle speed”;
label4->Text=“Wheel diameter”;
textBox1->Clear();
textBox2->Clear();
textBox3->Clear();
}
}
private: System::Void checkBox2_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
{
if(checkBox2->Checked)
if(checkBox1->Checked==false)
{
label2->Text=“Vehicle speed (in/s)”;
label4->Text=“Wheel diameter (in)”;
textBox1->Clear();
textBox2->Clear();
textBox3->Clear();
}
else
{
checkBox1->Checked=false;
label2->Text=“Vehicle speed (in/s)”;
label4->Text=“Wheel diameter (in)”;
textBox1->Clear();
textBox2->Clear();
textBox3->Clear();
}
else
{
checkBox2->Checked=false;
label2->Text=“Vehicle speed”;
label4->Text=“Wheel diameter”;
textBox1->Clear();
textBox2->Clear();
textBox3->Clear();
}
}
private: System::Void radioButton3_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
{
if(radioButton3->Checked)
{
textBox1->BackColor=Color::LightGray;
textBox1->ReadOnly=true;
textBox1->BorderStyle=System::Windows::Forms::BorderStyle::FixedSingle;
textBox2->BackColor=Color::White;
textBox2->ReadOnly=false;
textBox2->BorderStyle=System::Windows::Forms::BorderStyle::Fixed3D;
textBox3->BackColor=Color::White;
textBox3->ReadOnly=false;
textBox3->BorderStyle=System::Windows::Forms::BorderStyle::Fixed3D;
textBox1->Clear();
textBox2->Clear();
textBox3->Clear();
}
}
private: System::Void radioButton4_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
{
if(radioButton4->Checked)
{
textBox2->BackColor=Color::LightGray;
textBox2->ReadOnly=true;
textBox2->BorderStyle=System::Windows::Forms::BorderStyle::FixedSingle;
textBox1->BackColor=Color::White;
textBox1->ReadOnly=false;
textBox1->BorderStyle=System::Windows::Forms::BorderStyle::Fixed3D;
textBox3->BackColor=Color::White;
textBox3->ReadOnly=false;
textBox3->BorderStyle=System::Windows::Forms::BorderStyle::Fixed3D;
textBox1->Clear();
textBox2->Clear();
textBox3->Clear();
}
}
private: System::Void radioButton5_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
{
if(radioButton5->Checked)
{
textBox3->BackColor=Color::LightGray;
textBox3->ReadOnly=true;
textBox3->BorderStyle=System::Windows::Forms::BorderStyle::FixedSingle;
textBox1->BackColor=Color::White;
textBox1->ReadOnly=false;
textBox1->BorderStyle=System::Windows::Forms::BorderStyle::Fixed3D;
textBox2->BackColor=Color::White;
textBox2->ReadOnly=false;
textBox2->BorderStyle=System::Windows::Forms::BorderStyle::Fixed3D;
textBox1->Clear();
textBox2->Clear();
textBox3->Clear();
}
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e)
{
double speed,rpm,dia;
float pi;
String^ msg;
pi=3,1416;
if(checkBox1->Checked==false&&checkBox2->Checked==false)
MessageBox::Show(“Please select a measure unit!”, “Warning!”);
else
if(radioButton3->Checked==false&&radioButton4->Checked==false&&radioButton5->Checked==false)
MessageBox::Show(“Please select what you want to resolve!”, “Warning!”);
else
if(checkBox1->Checked)
{
if(radioButton3->Checked)
{
Double::TryParse(textBox2->Text,rpm);
Double::TryParse(textBox3->Text,dia);
speed=(rpm*(diapi)/60)/10;
msg=Convert::ToString(speed);
textBox1->Text=msg;
}
else
if(radioButton4->Checked)
{
Double::TryParse(textBox1->Text,speed);
Double::TryParse(textBox3->Text,dia);
rpm=((60speed10)/(diapi));
msg=Convert::ToString(rpm);
textBox2->Text=msg;
}
else
if(radioButton5->Checked)
{
Double::TryParse(textBox1->Text,speed);
Double::TryParse(textBox2->Text,rpm);
dia=((60speed10)/rpm/pi);
msg=Convert::ToString(dia);
textBox3->Text=msg;
}
}
else
if(checkBox2->Checked)
{
if(radioButton3->Checked)
{
Double::TryParse(textBox2->Text,rpm);
Double::TryParse(textBox3->Text,dia);
speed=(rpm*(diapi)/60);
msg=Convert::ToString(speed);
textBox1->Text=msg;
}
else
if(radioButton4->Checked)
{
Double::TryParse(textBox1->Text,speed);
Double::TryParse(textBox3->Text,dia);
rpm=((60speed)/(diapi));
msg=Convert::ToString(rpm);
textBox2->Text=msg;
}
else
if(radioButton5->Checked)
{
Double::TryParse(textBox1->Text,speed);
Double::TryParse(textBox2->Text,rpm);
dia=((60speed)/rpm/pi);
msg=Convert::ToString(dia);
textBox3->Text=msg;
}
}
}
};
}