mirror of
https://github.com/n5ac/mmsstv.git
synced 2026-01-08 09:30:06 +01:00
117 lines
3.2 KiB
C++
117 lines
3.2 KiB
C++
|
|
//---------------------------------------------------------------------
|
|||
|
|
#include <vcl.h>
|
|||
|
|
#pragma hdrstop
|
|||
|
|
|
|||
|
|
#include "OptDlg.h"
|
|||
|
|
#include "Country.h"
|
|||
|
|
//---------------------------------------------------------------------
|
|||
|
|
#pragma resource "*.dfm"
|
|||
|
|
//TOptDlgBox *OptDlgBox;
|
|||
|
|
//---------------------------------------------------------------------
|
|||
|
|
__fastcall TOptDlgBox::TOptDlgBox(TComponent* AOwner)
|
|||
|
|
: TForm(AOwner)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
//---------------------------------------------------------------------
|
|||
|
|
void __fastcall TOptDlgBox::SetLanguage(void)
|
|||
|
|
{
|
|||
|
|
if( RGL->ItemIndex ){
|
|||
|
|
Caption = "Setup";
|
|||
|
|
Font->Name = "Arial";
|
|||
|
|
Font->Charset = ANSI_CHARSET;
|
|||
|
|
|
|||
|
|
RGL->Caption = "Language";
|
|||
|
|
RGL->Items->Strings[0] = "Japanese";
|
|||
|
|
RGL->Items->Strings[1] = "English";
|
|||
|
|
L1->Caption = "Callsign";
|
|||
|
|
L2->Caption = "Year";
|
|||
|
|
RGC->Caption = "Entry Section";
|
|||
|
|
RGC->Items->Strings[0] = "J (Japan)";
|
|||
|
|
RGC->Items->Strings[1] = "S";
|
|||
|
|
RGF->Caption = "First time entry";
|
|||
|
|
RGF->Items->Strings[0] = "No";
|
|||
|
|
RGF->Items->Strings[1] = "Yes";
|
|||
|
|
L3->Caption = "ZIP";
|
|||
|
|
L4->Caption = "Address";
|
|||
|
|
// L5->Caption = "E-Mail";
|
|||
|
|
L6->Caption = "Name";
|
|||
|
|
L7->Caption = "License";
|
|||
|
|
L9->Caption = "Size of T-shirts as an Activity Premium";
|
|||
|
|
|
|||
|
|
CancelBtn->Caption = "Cancel";
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
Caption = "<EFBFBD>Z<EFBFBD>b<EFBFBD>g<EFBFBD>A<EFBFBD>b<EFBFBD>v";
|
|||
|
|
Font->Name = "<EFBFBD>l<EFBFBD>r <20>o<EFBFBD>S<EFBFBD>V<EFBFBD>b<EFBFBD>N";
|
|||
|
|
Font->Charset = SHIFTJIS_CHARSET;
|
|||
|
|
|
|||
|
|
RGL->Caption = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Language)";
|
|||
|
|
RGL->Items->Strings[0] = "<EFBFBD><EFBFBD><EFBFBD>{<7B><>(Japanese)";
|
|||
|
|
RGL->Items->Strings[1] = "<EFBFBD>p<EFBFBD><EFBFBD>(English)";
|
|||
|
|
L1->Caption = "<EFBFBD><EFBFBD>ٻ<EFBFBD><EFBFBD>";
|
|||
|
|
L2->Caption = "<EFBFBD>W<EFBFBD>v<EFBFBD>N<EFBFBD>x";
|
|||
|
|
RGC->Caption = "<EFBFBD>Q<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|||
|
|
RGC->Items->Strings[0] = "J (<28><><EFBFBD>{<7B><><EFBFBD><EFBFBD>)";
|
|||
|
|
RGC->Items->Strings[1] = "S (<28>C<EFBFBD>O)";
|
|||
|
|
RGF->Caption = "<EFBFBD><EFBFBD><EFBFBD>Q<EFBFBD><EFBFBD>";
|
|||
|
|
RGF->Items->Strings[0] = "<EFBFBD>ߋ<EFBFBD><EFBFBD>ɂ<EFBFBD><EFBFBD>Q<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|||
|
|
RGF->Items->Strings[1] = "<EFBFBD><EFBFBD><EFBFBD>Q<EFBFBD><EFBFBD>";
|
|||
|
|
L3->Caption = "<EFBFBD>X<EFBFBD>֔ԍ<EFBFBD>";
|
|||
|
|
L4->Caption = "<EFBFBD>Z<EFBFBD><EFBFBD>";
|
|||
|
|
// L5->Caption = "E-Mail";
|
|||
|
|
L6->Caption = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|||
|
|
L7->Caption = "<EFBFBD><EFBFBD><EFBFBD>i";
|
|||
|
|
L9->Caption = "<EFBFBD><EFBFBD>è<EFBFBD>ޏ܂̂s<EFBFBD>|<7C><><EFBFBD><C293>I<EFBFBD><49><EFBFBD>̊<EFBFBD><CC8A>]<5D><><EFBFBD><EFBFBD>";
|
|||
|
|
CancelBtn->Caption = "<EFBFBD><EFBFBD>ݾ<EFBFBD>";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//---------------------------------------------------------------------
|
|||
|
|
int __fastcall TOptDlgBox::Execute(void)
|
|||
|
|
{
|
|||
|
|
RGL->ItemIndex = MsgEng;
|
|||
|
|
SetLanguage();
|
|||
|
|
|
|||
|
|
EditCall->Text = sys.m_Call;
|
|||
|
|
EditYear->Text = sys.m_Year;
|
|||
|
|
RGC->ItemIndex = sys.m_Category;
|
|||
|
|
RGF->ItemIndex = sys.m_First;
|
|||
|
|
EditZip->Text = sys.m_Zip;
|
|||
|
|
EditAdr->Text = sys.m_Adr;
|
|||
|
|
EditMail->Text = sys.m_Mail;
|
|||
|
|
EditName->Text = sys.m_Name;
|
|||
|
|
EditLicense->Text = sys.m_License;
|
|||
|
|
EditPow->Text = sys.m_Pow;
|
|||
|
|
CBSex->ItemIndex = sys.m_Sexual;
|
|||
|
|
CBTSize->ItemIndex = sys.m_TSize;
|
|||
|
|
|
|||
|
|
if( ShowModal() == IDOK ){
|
|||
|
|
sys.m_Call = EditCall->Text.c_str();
|
|||
|
|
jstrupr(sys.m_Call.c_str());
|
|||
|
|
sscanf(AnsiString(EditYear->Text).c_str(), "%u", &sys.m_Year);
|
|||
|
|
|
|||
|
|
sys.m_Category = RGC->ItemIndex;
|
|||
|
|
sys.m_First = RGF->ItemIndex;
|
|||
|
|
sys.m_Zip = EditZip->Text;
|
|||
|
|
sys.m_Adr = EditAdr->Text;
|
|||
|
|
sys.m_Mail = EditMail->Text;
|
|||
|
|
sys.m_Name = EditName->Text;
|
|||
|
|
sys.m_License = EditLicense->Text;
|
|||
|
|
sys.m_Pow = EditPow->Text;
|
|||
|
|
sys.m_Sexual = CBSex->ItemIndex;
|
|||
|
|
sys.m_TSize = CBTSize->ItemIndex;
|
|||
|
|
|
|||
|
|
MsgEng = RGL->ItemIndex;
|
|||
|
|
return TRUE;
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
return FALSE;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//---------------------------------------------------------------------
|
|||
|
|
void __fastcall TOptDlgBox::RGLClick(TObject *Sender)
|
|||
|
|
{
|
|||
|
|
SetLanguage();
|
|||
|
|
}
|
|||
|
|
//---------------------------------------------------------------------------
|
|||
|
|
|
|||
|
|
|