bool vdr_pi::DeInit(void) { SaveConfig(); if ( IsRunning() ) // Timer started? { Stop(); // Stop timer m_istream.Close(); } if ( m_pvdrcontrol ) { m_pauimgr->DetachPane( m_pvdrcontrol ); m_pvdrcontrol->Close(); m_pvdrcontrol->Destroy(); m_pvdrcontrol = NULL; } if ( m_recording ) { m_ostream.Close(); m_recording = false; } RemovePlugInTool( m_tb_item_id_record ); RemovePlugInTool( m_tb_item_id_play ); return true; }
bool watchdog_pi::DeInit(void) { Alarm::SaveConfigAll(); Alarm::DeleteAll(); Alarm::s_Alarms.clear(); // Record the dialog position if (m_WatchdogDialog) { if(m_ConfigurationDialog) { delete m_ConfigurationDialog; } m_WatchdogDialog->Close(); delete m_WatchdogDialog; m_WatchdogDialog = NULL; m_ConfigurationDialog = NULL; } m_Timer.Stop(); m_Timer.Disconnect(wxEVT_TIMER, wxTimerEventHandler( watchdog_pi::OnTimer ), NULL, this); RemovePlugInTool(m_leftclick_tool_id); return true; }
bool climatology_pi::DeInit() { SendClimatology(false); FreeData(); RemovePlugInTool(m_leftclick_tool_id); return true; }
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; }
void aisradar_pi::ShowPreferencesDialog( wxWindow* parent ) { wxDialog *dialog = new wxDialog( parent, wxID_ANY, _("Radar Preferences"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE ); int border_size = 4; wxColor cl; GetGlobalColor(_T("DILG1"), &cl); dialog->SetBackgroundColour(cl); wxBoxSizer* PanelSizer = new wxBoxSizer(wxVERTICAL); dialog->SetSizer(PanelSizer); // Radar toolbox icon checkbox wxStaticBox* RadarBox = new wxStaticBox(dialog, wxID_ANY, _("Radar")); wxStaticBoxSizer* RadarBoxSizer = new wxStaticBoxSizer(RadarBox, wxVERTICAL); PanelSizer->Add(RadarBoxSizer, 0, wxGROW|wxALL, border_size); m_pRadarShowIcon = new wxCheckBox( dialog, -1, _("Show RADAR icon:"), wxDefaultPosition, wxSize(-1, -1), 0 ); RadarBoxSizer->Add(m_pRadarShowIcon, 1, wxALIGN_LEFT|wxALL, border_size); m_pRadarShowIcon->SetValue(m_radar_show_icon); m_pRadarUseAis = new wxCheckBox( dialog, -1, _("Use AIS as radar source:"), wxDefaultPosition, wxSize(-1, -1), 0 ); RadarBoxSizer->Add(m_pRadarUseAis, 2, wxALIGN_LEFT|wxALL, border_size); m_pRadarUseAis->SetValue(m_radar_use_ais); wxStdDialogButtonSizer* DialogButtonSizer = dialog->CreateStdDialogButtonSizer(wxOK|wxCANCEL); PanelSizer->Add(DialogButtonSizer, 0, wxALIGN_RIGHT|wxALL, 5); dialog->Fit(); if(dialog->ShowModal() == wxID_OK) { // Show Icon changed value? if(m_radar_show_icon != m_pRadarShowIcon->GetValue()) { m_radar_show_icon= m_pRadarShowIcon->GetValue(); if(m_radar_show_icon) { m_leftclick_tool_id = InsertPlugInTool(_T(""), _img_radar, _img_radar, wxITEM_NORMAL, _("Radar"), _T(""), 0, RADAR_TOOL_POSITION, 0, this); } else { RemovePlugInTool(m_leftclick_tool_id); } } m_radar_use_ais = m_pRadarUseAis->GetValue(); SaveConfig(); } }