void TTrdItf_DDABOSS::SetConfig(void)
{
	if( FSetupFile== NULL ) return ;

	TMemIniFile *ini = new TMemIniFile( FSetupFile );
	try
	{
		ini->WriteString(PLUGINNAME,"pUser",FSet.pUser);
		ini->WriteString(PLUGINNAME,"pWtfs",FSet.pWtfs);
		ini->WriteString(PLUGINNAME,"pYyb",FSet.pYyb);
		ini->WriteString(PLUGINNAME,"pRight",FSet.pRight);
		ini->WriteString(PLUGINNAME,"pDest",FSet.pDest);
		ini->WriteString(PLUGINNAME,"pemote",FSet.pRemote);
		ini->UpdateFile();
	}
	__finally
	{
  	delete ini;
	}
}
Exemple #2
0
//---------------------------------------------------------------------------
void __fastcall TRADIOSetDlg::SaveBtnClick(TObject *Sender)
{
	TSaveDialog *pBox = MmttyWd->SaveDialog;
	if( (Font->Charset != SHIFTJIS_CHARSET) ){
		pBox->Title = "Save command file";
		pBox->Filter = "Command files(*.rcm)|*.rcm|";
	}
	else {
		pBox->Title = "コマンド定義ファイルの作成";
		pBox->Filter = "コマンド定義ファイル(*.rcm)|*.rcm|";
	}
	pBox->FileName = "MyRIG.rcm";
	pBox->DefaultExt = "rcm";
	pBox->InitialDir = BgnDir;
	NormalWindow(this);
	if( pBox->Execute() == TRUE ){
		CWaitCursor w;
		TMemIniFile *pIniFile = new TMemIniFile(pBox->FileName);
		pIniFile->WriteString("RADIO", "CmdInit", CmdInit->Text);
		pIniFile->WriteString("RADIO", "CmdRx", CmdRx->Text);
		pIniFile->WriteString("RADIO", "CmdTx", CmdTx->Text);
		pIniFile->WriteString("RADIO", "Cmdxx", Cmdxx->Text);
		pIniFile->WriteInteger("RADIO", "PollType", m_PollType);
		pIniFile->WriteInteger("RADIO", "PollOffset", FreqOffset->ItemIndex);
		double d;
		int dd = 5;
		if( sscanf(AnsiString(PollInt->Text).c_str(), "%lf", &d) == 1 ){	//JA7UDE 0428
			if( d >= 0.5 ){
				dd = int((d * 10.0) - 5);
				if( dd < 0 ) dd = 0;
			}
		}
		pIniFile->WriteInteger("RADIO", "PollInterval", dd);
		pIniFile->UpdateFile();
		delete pIniFile;
	}
	TopWindow(this);
}
Exemple #3
0
//---------------------------------------------------------------------------
void __fastcall TRADIOSetDlg::SaveBtnClick(TObject *Sender)
{
	TSaveDialog *pBox = new TSaveDialog(this);
	if( sys.m_MsgEng ){
		pBox->Title = "Save command file";
		pBox->Filter = "Command files(*.rcm)|*.rcm|";
	}
	else {
		pBox->Title = "コマンド定義ファイルの作成";
		pBox->Filter = "コマンド定義ファイル(*.rcm)|*.rcm|";
	}
	pBox->FileName = "MyRIG.rcm";
	pBox->DefaultExt = "rcm";
	pBox->InitialDir = sys.m_BgnDir;
	if( pBox->Execute() == TRUE ){
		CWaitCursor w;
		TMemIniFile *pIniFile = new TMemIniFile(pBox->FileName);
		pIniFile->WriteString("RADIO", "CmdInit", CmdInit->Text);
		pIniFile->WriteString("RADIO", "CmdRx", CmdRx->Text);
		pIniFile->WriteString("RADIO", "CmdTx", CmdTx->Text);
		pIniFile->WriteString("RADIO", "Cmdxx", Cmdxx->Text);
		pIniFile->WriteInteger("RADIO", "PollType", m_PollType);
		pIniFile->ReadInteger("RADIO", "Offset", RGFS->ItemIndex);
		double d;
		int dd = 5;
		if( sscanf(AnsiString(PollInt->Text).c_str(), "%lf", &d) == 1 ){	//JA7UDE 0428
			if( d >= 0.2 ){
				dd = int((d * 10.0) - 2);
				if( dd < 0 ) dd = 0;
			}
		}
		pIniFile->WriteInteger("RADIO", "PollInterval", dd);
		pIniFile->UpdateFile();
		delete pIniFile;
	}
    delete pBox;
}