本文整理汇总了C++中OptionsDialog::ShowModal方法的典型用法代码示例。如果您正苦于以下问题:C++ OptionsDialog::ShowModal方法的具体用法?C++ OptionsDialog::ShowModal怎么用?C++ OptionsDialog::ShowModal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OptionsDialog
的用法示例。
在下文中一共展示了OptionsDialog::ShowModal方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnAppOptions
void MainFrame::OnAppOptions(wxCommandEvent& event){
OptionsDialog optionsDialog;
optionsDialog.SetAppOptions(&m_appOptions);
optionsDialog.Create(this);
if (optionsDialog.ShowModal() == wxID_OK) {
m_appOptions.SaveAppOptions();
m_raceAnalyzerComm.SetSerialPort(m_appOptions.GetSerialPort());
}
}
示例2: DoInvokeOptionsDialog
void VAutoDialog::DoInvokeOptionsDialog(void)
{
wxString mountType = Properties::Instance().Get(MOUNT_TYPE);
wxString mountPort = Properties::Instance().Get(MOUNT_PORT);
wxString cameraType = Properties::Instance().Get(CAMERA_TYPE);
wxString cameraPort = Properties::Instance().Get(CAMERA_PORT);
wxString observationLogPath = Properties::Instance().Get (OBSERVATION_LOG_FOLDER);
wxString isoSpeed = Properties::Instance().Get (CAMERA_ISO_SPEED);
OptionsDialog *dlg = new OptionsDialog (this);
int rv = dlg->ShowModal ();
if (rv == wxID_OK) {
Properties::Instance().Save(CONFIG_FILE);
if (Properties::Instance().Get(MOUNT_TYPE) != mountType ||
Properties::Instance().Get(MOUNT_PORT) != mountPort) {
TelescopeFactory::Instance().ClearTelescope();
m_telescope = TelescopeFactory::Instance().GetTelescope (
Properties::Instance().Get(MOUNT_TYPE),
Properties::Instance().Get(MOUNT_PORT));
}
bool newCamera = false;
if (Properties::Instance().Get(CAMERA_TYPE) != cameraType ||
Properties::Instance().Get(CAMERA_PORT) != cameraPort) {
// CameraFactory::Instance().ClearCamera();
wxDELETE (m_camera);
m_camera = CameraFactory::Instance().GetCamera (
Properties::Instance().Get(CAMERA_TYPE),
Properties::Instance().Get(CAMERA_PORT));
newCamera = true;
}
if (Properties::Instance().Get (OBSERVATION_LOG_FOLDER) != observationLogPath) {
ObservationLog::Instance().SetPath (Properties::Instance().Get (OBSERVATION_LOG_FOLDER));
}
if (m_camera->HasFeature (Camera::DCP_CAN_SET_ISO_SPEED) && (newCamera || Properties::Instance().Get(CAMERA_ISO_SPEED) != isoSpeed)) {
unsigned long iso = wxAtol (Properties::Instance().Get(CAMERA_ISO_SPEED));
if (iso > 0)
m_camera->SetIsoSpeed (iso);
}
SetDeviceText ();
DoDisableControls (FALSE);
m_LogWindow->Show (Properties::Instance().GetBool(DEBUG_LOG_WINDOW));
}
}
示例3: ShowPreferencesDialog
void findit_pi::ShowPreferencesDialog( wxWindow* parent )
{
int buyNotemp = buyNo;
int toBuyZerotemp = toBuyZero;
int lastRowDefaulttemp = lastRowDefault;
OptionsDialog* dlg = new OptionsDialog(parent,this);
wxColour cl;
GetGlobalColor(_T("DILG1"), &cl);
dlg->SetBackgroundColour(cl);
// dlg->m_checkBoxShowLogbook->SetValue(m_bLOGShowIcon);
if(dlg->ShowModal() == wxID_OK)
{
buyNo = dlg->m_radioBox11->GetSelection();
toBuyZero = dlg->m_radioBox1->GetSelection();
lastRowDefault = dlg->m_radioBox5->GetSelection();
if((buyNo != buyNotemp) || (toBuyZero != toBuyZerotemp) || (lastRowDefault != lastRowDefaulttemp))
if(m_pFindItWindow)
m_pFindItWindow->reloadData();
// Show Icon changed value?
if(m_bFINDITShowIcon != dlg->m_checkBoxFindItIcon->GetValue())
{
m_bFINDITShowIcon = dlg->m_checkBoxFindItIcon->GetValue();
if(m_bFINDITShowIcon)
m_leftclick_tool_id = InsertPlugInTool(_T(""), _img_findit, _img_findit, wxITEM_NORMAL,
_("FindIt"), _T(""), NULL, FINDIT_TOOL_POSITION, 0, this);
else
RemovePlugInTool(m_leftclick_tool_id);
}
SaveConfig();
}
else
{
if(buyNo != buyNotemp || toBuyZero != toBuyZerotemp || lastRowDefault != lastRowDefaulttemp)
if(m_pFindItWindow)
m_pFindItWindow->reloadData();
}
delete dlg;
}