⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chgpar.cpp

📁 公路站超载检测系统上位机软件系统源程序!
💻 CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop
#include "Pcom.h"
#include "unit1.h"
#include "ChgPar.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm7 *Form7;
//---------------------------------------------------------------------------
__fastcall TForm7::TForm7(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm7::BitBtn3Click(TObject *Sender)
{
    if (BitBtn3->Caption=="中文")
    {
    BitBtn3->Caption="English";
    Label1->Caption="前轴限重";
    Label2->Caption="单轴限重";
    Label3->Caption="双联轴限重";
    Label4->Caption="三联轴限重";
    Label5->Caption="两轴车限重";
    Label6->Caption="三轴车限重";
    Label7->Caption="四轴车限重";
    Label8->Caption="五轴车限重";
    Label9->Caption="六轴车限重";
    Label10->Caption="最大速度";
    Label11->Caption="静态分度值";
    Label12->Caption="动态分度值";
    Label13->Caption="总重分度值";
    Label14->Caption="双联轴间距";
    Label15->Caption="三联轴间距";
    Label16->Caption="线圈延时时间";
    Label17->Caption="自动处理时间";
    Label18->Caption="测试模式";
    Label19->Caption="静态灵敏度";
    Label20->Caption="动态灵敏度";
    Label21->Caption="系统参数修改";
    Label22->Caption="系统单位";
    Label23->Caption="系统语言";
    Label24->Caption="长报表格式";
    Label25->Caption="每页一轴";
    Label26->Caption="打印每个轴";
    }
    else
    {
    BitBtn3->Caption="中文";
    Label1->Caption="Max.FrontAxle";
    Label2->Caption="Max.SingleAxle";
    Label3->Caption="MaxWgh.Tandem";
    Label4->Caption="MaxWgh.Triple";
    Label5->Caption="MaxWgh.2-axle";
    Label6->Caption="MaxWgh.3-axle";
    Label7->Caption="MaxWgh.4-axle";
    Label8->Caption="MaxWgh.5-axle";
    Label9->Caption="MaxWgh.6-axle";
    Label10->Caption="Max.Speed";
    Label11->Caption="Resolution.Stat";
    Label12->Caption="Resolution.Dyna";
    Label13->Caption="Resolution.Total";
    Label14->Caption="Max.Space Tandem";
    Label15->Caption="Max.Space Triple";
    Label16->Caption="Loop extension";
    Label17->Caption="Loop no occupied";
    Label18->Caption="Test Mode";
    Label19->Caption="Sensitivity S";
    Label20->Caption="Sensitivity D";
    Label21->Caption="SYSPAR CHANGE";
    Label22->Caption="Unit";
    Label23->Caption="Language";
    Label24->Caption="Long report";
    Label25->Caption="One Veh.Per pg.";
    Label26->Caption="Print each Veh.";
    }
}
//---------------------------------------------------------------------------


void __fastcall TForm7::BitBtn1Click(TObject *Sender)
{  //系统参数的修改
   SysParameter[0]=RadioGroup1->ItemIndex;//0;
   SysParameter[1]=RadioGroup2->ItemIndex;//0;
   SysParameter[2]=StrToInt(Edit10->Text);//6;
   SysParameter[3]=StrToInt(Edit11->Text);//20;
   SysParameter[4]=StrToInt(Edit12->Text);//20;
   SysParameter[5]=StrToInt(Edit13->Text);//20;
   SysParameter[6]=StrToInt(Edit14->Text);//125;
   SysParameter[7]=StrToInt(Edit15->Text);//300;
   SysParameter[8]=StrToInt(Edit1->Text);//10000;
   SysParameter[9]=StrToInt(Edit2->Text);//10000;
   SysParameter[10]=StrToInt(Edit3->Text);//15000;
   SysParameter[11]=StrToInt(Edit4->Text);//20000;
   SysParameter[12]=StrToInt(Edit5->Text);//20000;
   SysParameter[13]=StrToInt(Edit6->Text);//30000;
   SysParameter[14]=StrToInt(Edit7->Text);//40000;
   SysParameter[15]=StrToInt(Edit8->Text);//50000;
   SysParameter[16]=StrToInt(Edit9->Text);//60000;
   SysParameter[17]=StrToInt(Edit16->Text);//0;
   SysParameter[18]=StrToInt(Edit17->Text);//60;
   SysParameter[19]=StrToInt(Edit18->Text);//0;
   SysParameter[20]=StrToInt(Edit19->Text);//1000;
   SysParameter[21]=StrToInt(Edit20->Text);//1000;
   SysParameter[22]=StrToInt(Edit21->Text);//0;
   SysParameter[23]=StrToInt(Edit22->Text);//0;
   SysParameter[24]=StrToInt(Edit23->Text);//0;
 
   ChgParam(); //修改参数命令
   BitBtn1->Enabled=false;
   Close();    //关闭窗体
}
//---------------------------------------------------------------------------

void __fastcall TForm7::BitBtn2Click(TObject *Sender)
{
    Form7->Close();
}
//---------------------------------------------------------------------------

void __fastcall TForm7::BitBtn5Click(TObject *Sender)
{
    Edit1->ReadOnly=false;
    Edit2->ReadOnly=false;
    Edit3->ReadOnly=false;
    Edit4->ReadOnly=false;
    Edit5->ReadOnly=false;
    Edit6->ReadOnly=false;
    Edit7->ReadOnly=false;
    Edit8->ReadOnly=false;
    Edit9->ReadOnly=false;
    Edit10->ReadOnly=false;
    Edit11->ReadOnly=false;
    Edit12->ReadOnly=false;
    Edit13->ReadOnly=false;
    Edit14->ReadOnly=false;
    Edit15->ReadOnly=false;
    Edit16->ReadOnly=false;
    Edit17->ReadOnly=false;
    Edit18->ReadOnly=false;
    Edit19->ReadOnly=false;
    Edit20->ReadOnly=false;
    Edit21->ReadOnly=false;
    Edit22->ReadOnly=false;
    Edit23->ReadOnly=false;
    BitBtn1->Enabled=true;
}
//---------------------------------------------------------------------------


void __fastcall TForm7::FormShow(TObject *Sender)
{
    Edit1->ReadOnly=true;
    Edit2->ReadOnly=true;
    Edit3->ReadOnly=true;
    Edit4->ReadOnly=true;
    Edit5->ReadOnly=true;
    Edit6->ReadOnly=true;
    Edit7->ReadOnly=true;
    Edit8->ReadOnly=true;
    Edit9->ReadOnly=true;
    Edit10->ReadOnly=true;
    Edit11->ReadOnly=true;
    Edit12->ReadOnly=true;
    Edit13->ReadOnly=true;
    Edit14->ReadOnly=true;
    Edit15->ReadOnly=true;
    Edit16->ReadOnly=true;
    Edit17->ReadOnly=true;
    Edit18->ReadOnly=true;
    Edit19->ReadOnly=true;
    Edit20->ReadOnly=true;
    Edit21->ReadOnly=true;
    Edit22->ReadOnly=true;
    Edit23->ReadOnly=true;
    BitBtn1->Enabled=false;
}
//---------------------------------------------------------------------------

void __fastcall TForm7::FormClose(TObject *Sender, TCloseAction &Action)
{
    ParForm->Visible =true;
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -