📄 u5_11_1.cpp
字号:
//--------------- u5_11_1 ------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "u5_11_1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
Tf5_11_1 *f5_11_1;
//---------------------------------------------------------------------------
__fastcall Tf5_11_1::Tf5_11_1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall Tf5_11_1::btnSumClick(TObject *Sender)
{
int cpu;
if (rbt333->Checked==True)
cpu=15000;
else if (rbt350->Checked==True)
cpu=18000;
else if (rbt400->Checked==True)
cpu=20000;
else
cpu=0;
lblCPUPrice->Caption=IntToStr(cpu);
//---------------------------------------
int mem;
if (rbt32->Checked==True)
mem=1500;
else if (rbt64->Checked==True)
mem=1800;
else if (rbt128->Checked==True)
mem=2400;
else
mem=0;
lblMemPrice->Caption=IntToStr(mem);
// ------------------------------------------
int crt;
if (rbt14->Checked==True)
crt=3500;
else if (rbt15->Checked==True)
crt=4500;
else if (rbt17->Checked==True)
crt=12000;
else
crt=0;
lblCrtPrice->Caption=IntToStr(crt);
// --------------------------------------
int mouse=0,kb=0,cd=0,other;
if (chkMouse->Checked==True)
mouse=500;
if (chkKB->Checked==True)
kb=400;
if (chkCD->Checked==True)
cd=2000;
other=mouse+kb+cd;
lblOtherPrice->Caption=IntToStr(other);
//----------------------------------------
int sum=cpu+mem+crt+other;
lblSum->Caption=IntToStr(sum);
}
//---------------------------------------------------------------------------
void __fastcall Tf5_11_1::btnEndClick(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -