Professional Documents
Culture Documents
#pragma once
namespace tugas1 {
/// <summary>
/// Summary for Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::TrackBar^ TBPSIKOTEST;
private: System::Windows::Forms::TrackBar^ TBFISIK;
protected:
protected:
protected:
}
#pragma endregion
private: System::Void trackBar1_Scroll(System::Object^ sender, System::EventArgs^ e)
{
//menampilkan nilai input1
Input1->Text=Convert::ToString(TBPSIKOTEST->Value);
//mencari Miufisik
float dina,farah,dona,fifi,galang;
if(TBPSIKOTEST->Value > 25 && TBPSIKOTEST->Value < 50)
{
dina=(TBPSIKOTEST->Value - 25);
dona=dina/25;
output->Text=Convert::ToString(dona);}
else if (TBPSIKOTEST->Value >25 && TBPSIKOTEST->Value <50)
{farah=(25 - TBPSIKOTEST->Value);
fifi=farah/25;
output->Text=Convert::ToString(fifi);}
else if (TBPSIKOTEST->Value < 25 && TBPSIKOTEST->Value >50)
ROCHMAT WIDODO/12518244005
{galang=0;
output->Text=Convert::ToString(galang);}
}
private: System::Void TB2_Scroll(System::Object^ sender, System::EventArgs^ e) {
//menampilkan nilai input2
Input2->Text=Convert::ToString(TBFISIK->Value);
//mencari MiuMuda
float jalu,kiki,lala,kim;
if(TBFISIK->Value < 50)
{jalu=1;
output->Text=Convert::ToString(jalu);}
else if (TBFISIK->Value >50 && TBFISIK->Value <75)
{kiki=(50-TBFISIK->Value);
kim=(kiki/50);
output->Text=Convert::ToString(kim);}
else if (TBFISIK->Value >75)
{lala=0;
output->Text=Convert::ToString(lala);}
}
private: System::Void trackBar1_Scroll_1(System::Object^ sender, System::EventArgs^ e) {
//menampilkan nilai input3
Input3->Text=Convert::ToString(TBWAWANCARA->Value);
//mencari output
float jalu,kiki,lala,kim;
if(TBWAWANCARA->Value < 50)
{jalu=1;
output->Text=Convert::ToString(jalu);}
else if (TBWAWANCARA->Value >50 && TBWAWANCARA->Value
<100)
{kiki=(75-TBWAWANCARA->Value);
kim=(kiki/75);
output->Text=Convert::ToString(kim);}
else if (TBWAWANCARA->Value >100)
{lala=0;
output->Text=Convert::ToString(lala);}
}
};
}
ROCHMAT WIDODO/12518244005