2010-06-02 17:44:38 +00:00
|
|
|
// This file is part of BOINC.
|
|
|
|
// http://boinc.berkeley.edu
|
2014-11-25 11:24:07 +00:00
|
|
|
// Copyright (C) 2014 University of California
|
2010-06-02 17:44:38 +00:00
|
|
|
//
|
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
|
|
// This code was initially generated with wxFormBuilder (version Oct 13 2006)
|
2007-01-17 18:13:33 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef __DlgAdvPreferencesBase__
|
|
|
|
#define __DlgAdvPreferencesBase__
|
|
|
|
|
|
|
|
// Define WX_GCH in order to support precompiled headers with GCC compiler.
|
|
|
|
// You have to create the header "wx_pch.h" and include all files needed
|
|
|
|
// for compile your gui inside it.
|
|
|
|
// Then, compile it and place the file "wx_pch.h.gch" into the same
|
|
|
|
// directory that "wx_pch.h".
|
|
|
|
#ifdef WX_GCH
|
|
|
|
#include <wx_pch.h>
|
|
|
|
#else
|
|
|
|
#include <wx/wx.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <wx/button.h>
|
|
|
|
#include <wx/notebook.h>
|
|
|
|
#include <wx/panel.h>
|
2007-01-19 00:59:31 +00:00
|
|
|
#include <wx/statbmp.h>
|
2007-01-18 02:40:01 +00:00
|
|
|
|
2007-01-17 18:13:33 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2007-01-19 00:59:31 +00:00
|
|
|
#define ID_DEFAULT wxID_ANY // Default
|
2015-02-12 13:48:28 +00:00
|
|
|
#define ID_ADV_PREFS_START 20000
|
|
|
|
enum {
|
|
|
|
ID_BTN_CLEAR = ID_ADV_PREFS_START,
|
|
|
|
ID_CHKDISKLEASTFREE,
|
|
|
|
ID_CHKDISKMAXOFTOTAL,
|
|
|
|
ID_CHKDISKMAXSPACE,
|
|
|
|
ID_CHKMEMORYWHILESUSPENDED,
|
|
|
|
ID_CHKNETCONFIRMBEFORECONNECT,
|
|
|
|
ID_CHKNETDISCONNECTWHENDONE,
|
|
|
|
ID_CHKNETFRIDAY,
|
|
|
|
ID_CHKNETMONDAY,
|
|
|
|
ID_CHKNETSATURDAY,
|
|
|
|
ID_CHKNETSKIPIMAGEVERIFICATION,
|
|
|
|
ID_CHKNETSUNDAY,
|
|
|
|
ID_CHKNETTHURSDAY,
|
|
|
|
ID_CHKNETTUESDAY,
|
|
|
|
ID_CHKNETWEDNESDAY,
|
|
|
|
ID_CHKPROCEVERYDAY,
|
|
|
|
ID_CHKPROCFRIDAY,
|
|
|
|
ID_CHKPROCINUSE,
|
|
|
|
ID_CHKPROCMONDAY,
|
|
|
|
ID_CHKMAXLOAD,
|
|
|
|
ID_CHKPROCONBATTERIES,
|
|
|
|
ID_CHKPROCSATURDAY,
|
|
|
|
ID_CHKPROCSUNDAY,
|
|
|
|
ID_CHKPROCTHURSDAY,
|
|
|
|
ID_CHKPROCTUESDAY,
|
|
|
|
ID_CHKPROCWEDNESDAY,
|
|
|
|
ID_CHKPROCUSECPUTIME,
|
|
|
|
ID_CHKPROCUSEPROCESSORS,
|
|
|
|
ID_TABPAGE_DISK,
|
|
|
|
ID_TABPAGE_NET,
|
|
|
|
ID_TABPAGE_PROC,
|
|
|
|
ID_TXTDISKLEASTFREE,
|
|
|
|
ID_TXTDISKMAXOFTOTAL,
|
|
|
|
ID_TXTDISKMAXSPACE,
|
|
|
|
ID_TXTDISKWRITETODISK,
|
|
|
|
ID_TXTMEMORYMAXINUSE,
|
|
|
|
ID_TXTMEMORYMAXONIDLE,
|
|
|
|
ID_TXTNETADDITIONALDAYS,
|
|
|
|
ID_TXTNETCONNECTINTERVAL,
|
|
|
|
ID_TXTNETDOWNLOADRATE,
|
|
|
|
ID_TXTNETEVERYDAYSTART,
|
|
|
|
ID_TXTNETEVERYDAYSTOP,
|
|
|
|
ID_TXTNETFRIDAY,
|
|
|
|
ID_TXTNETMONDAY,
|
|
|
|
ID_TXTNETSATURDAY,
|
|
|
|
ID_TXTNETSUNDAY,
|
|
|
|
ID_TXTNETTHURSDAY,
|
|
|
|
ID_TXTNETTUESDAY,
|
|
|
|
ID_TXTNETUPLOADRATE,
|
|
|
|
ID_TXTNETWEDNESDAY,
|
|
|
|
ID_TXTPOCUSECPUTIME,
|
|
|
|
ID_TXTPROCEVERYDAYSTART,
|
|
|
|
ID_TXTPROCEVERYDAYSTOP,
|
|
|
|
ID_TXTPROCFRIDAY,
|
|
|
|
ID_TXTPROCIDLEFOR,
|
|
|
|
ID_TXTPROCMONDAY,
|
|
|
|
ID_TXTPROCSATURDAY,
|
|
|
|
ID_TXTPROCSUNDAY,
|
|
|
|
ID_TXTPROCSWITCHEVERY,
|
|
|
|
ID_TXTPROCTHURSDAY,
|
|
|
|
ID_TXTPROCTUESDAY,
|
|
|
|
ID_TXTPROCUSEPROCESSORS,
|
|
|
|
ID_TXTPROCWEDNESDAY,
|
|
|
|
ID_CHKGPUPROCINUSE,
|
|
|
|
ID_TXTMAXLOAD,
|
|
|
|
ID_DAILY_XFER_LIMIT_MB,
|
|
|
|
ID_DAILY_XFER_PERIOD_DAYS,
|
|
|
|
ID_ADV_PREFS_LAST
|
|
|
|
};
|
2011-04-28 13:00:04 +00:00
|
|
|
|
2007-01-17 18:13:33 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Class CDlgAdvPreferencesBase
|
|
|
|
*/
|
|
|
|
class CDlgAdvPreferencesBase : public wxDialog
|
|
|
|
{
|
2010-06-02 17:44:38 +00:00
|
|
|
protected:
|
|
|
|
wxStaticBitmap* m_bmpWarning;
|
|
|
|
wxButton* m_btnClear;
|
|
|
|
wxPanel* m_panelControls;
|
|
|
|
wxNotebook* m_Notebook;
|
|
|
|
wxPanel* m_panelProcessor;
|
2015-02-12 13:48:28 +00:00
|
|
|
wxCheckBox* m_chkProcUseProcessors;
|
|
|
|
wxTextCtrl* m_txtProcUseProcessors;
|
|
|
|
wxCheckBox* m_chkProcUseCPUTime;
|
|
|
|
wxTextCtrl* m_txtProcUseCPUTime;
|
2010-06-02 17:44:38 +00:00
|
|
|
wxCheckBox* m_chkProcOnBatteries;
|
|
|
|
wxCheckBox* m_chkProcInUse;
|
|
|
|
wxCheckBox* m_chkGPUProcInUse;
|
|
|
|
wxTextCtrl* m_txtProcIdleFor;
|
2015-02-12 13:48:28 +00:00
|
|
|
wxCheckBox* m_chkMaxLoad;
|
2010-06-02 17:44:38 +00:00
|
|
|
wxTextCtrl* m_txtMaxLoad;
|
2015-02-12 13:48:28 +00:00
|
|
|
wxCheckBox* m_chkProcEveryDay;
|
2010-06-02 17:44:38 +00:00
|
|
|
wxTextCtrl* m_txtProcEveryDayStart;
|
|
|
|
wxTextCtrl* m_txtProcEveryDayStop;
|
|
|
|
wxPanel* m_panelProcSpecialTimes;
|
|
|
|
wxCheckBox* m_chkProcMonday;
|
|
|
|
wxTextCtrl* m_txtProcMonday;
|
|
|
|
wxCheckBox* m_chkProcTuesday;
|
|
|
|
wxTextCtrl* m_txtProcTuesday;
|
|
|
|
wxCheckBox* m_chkProcWednesday;
|
|
|
|
wxTextCtrl* m_txtProcWednesday;
|
|
|
|
wxCheckBox* m_chkProcThursday;
|
|
|
|
wxTextCtrl* m_txtProcThursday;
|
|
|
|
wxCheckBox* m_chkProcFriday;
|
|
|
|
wxTextCtrl* m_txtProcFriday;
|
|
|
|
wxCheckBox* m_chkProcSaturday;
|
|
|
|
wxTextCtrl* m_txtProcSaturday;
|
|
|
|
wxCheckBox* m_chkProcSunday;
|
|
|
|
wxTextCtrl* m_txtProcSunday;
|
|
|
|
wxTextCtrl* m_txtProcSwitchEvery;
|
2015-02-12 13:48:28 +00:00
|
|
|
wxTextCtrl* m_txtDiskWriteToDisk;
|
2010-06-02 17:44:38 +00:00
|
|
|
wxPanel* m_panelNetwork;
|
|
|
|
wxTextCtrl* m_txtNetDownloadRate;
|
|
|
|
wxTextCtrl* m_txtNetUploadRate;
|
|
|
|
|
|
|
|
wxTextCtrl* m_txt_daily_xfer_limit_mb;
|
|
|
|
wxTextCtrl* m_txt_daily_xfer_period_days;
|
|
|
|
|
|
|
|
wxTextCtrl* m_txtNetConnectInterval;
|
|
|
|
wxTextCtrl* m_txtNetAdditionalDays;
|
|
|
|
wxCheckBox* m_chkNetSkipImageVerification;
|
|
|
|
wxCheckBox* m_chkNetConfirmBeforeConnect;
|
|
|
|
wxCheckBox* m_chkNetDisconnectWhenDone;
|
2015-02-12 13:48:28 +00:00
|
|
|
wxTextCtrl* m_txtNetEveryDayStart;
|
2010-06-02 17:44:38 +00:00
|
|
|
wxTextCtrl* m_txtNetEveryDayStop;
|
|
|
|
wxPanel* m_panelNetSpecialTimes;
|
|
|
|
wxCheckBox* m_chkNetMonday;
|
|
|
|
wxTextCtrl* m_txtNetMonday;
|
|
|
|
wxCheckBox* m_chkNetTuesday;
|
|
|
|
wxTextCtrl* m_txtNetTuesday;
|
|
|
|
wxCheckBox* m_chkNetWednesday;
|
|
|
|
wxTextCtrl* m_txtNetWednesday;
|
|
|
|
wxCheckBox* m_chkNetThursday;
|
|
|
|
wxTextCtrl* m_txtNetThursday;
|
|
|
|
wxCheckBox* m_chkNetFriday;
|
|
|
|
wxTextCtrl* m_txtNetFriday;
|
|
|
|
wxCheckBox* m_chkNetSaturday;
|
|
|
|
wxTextCtrl* m_txtNetSaturday;
|
|
|
|
wxCheckBox* m_chkNetSunday;
|
|
|
|
wxTextCtrl* m_txtNetSunday;
|
|
|
|
wxPanel* m_panelDiskAndMemory;
|
2015-02-12 13:48:28 +00:00
|
|
|
wxCheckBox* m_chkDiskMaxSpace;
|
2010-06-02 17:44:38 +00:00
|
|
|
wxTextCtrl* m_txtDiskMaxSpace;
|
2015-02-12 13:48:28 +00:00
|
|
|
wxCheckBox* m_chkDiskLeastFree;
|
2010-06-02 17:44:38 +00:00
|
|
|
wxTextCtrl* m_txtDiskLeastFree;
|
2015-02-12 13:48:28 +00:00
|
|
|
wxCheckBox* m_chkDiskMaxOfTotal;
|
2010-06-02 17:44:38 +00:00
|
|
|
wxTextCtrl* m_txtDiskMaxOfTotal;
|
|
|
|
wxTextCtrl* m_txtDiskMaxSwap;
|
|
|
|
wxTextCtrl* m_txtMemoryMaxInUse;
|
|
|
|
wxTextCtrl* m_txtMemoryMaxOnIdle;
|
|
|
|
wxCheckBox* m_chkMemoryWhileSuspended;
|
2014-11-25 11:24:07 +00:00
|
|
|
|
2010-06-02 17:44:38 +00:00
|
|
|
wxPanel* m_panelButtons;
|
|
|
|
wxButton* m_btnOK;
|
|
|
|
wxButton* m_btnCancel;
|
|
|
|
wxButton* m_btnHelp;
|
2014-11-25 12:59:38 +00:00
|
|
|
|
|
|
|
wxString *web_prefs_url;
|
2010-04-23 21:21:48 +00:00
|
|
|
|
2010-06-02 17:44:38 +00:00
|
|
|
public:
|
2014-07-30 10:42:25 +00:00
|
|
|
CDlgAdvPreferencesBase( wxWindow* parent, int id = -1, wxString title = wxT(""), wxPoint pos = wxDefaultPosition, wxSize size = wxDefaultSize, int style = wxDEFAULT_DIALOG_STYLE );
|
2010-04-23 21:21:48 +00:00
|
|
|
|
2010-06-02 17:44:38 +00:00
|
|
|
private:
|
|
|
|
wxPanel* createProcessorTab(wxNotebook* notebook);
|
|
|
|
wxPanel* createNetworkTab(wxNotebook* notebook);
|
|
|
|
wxPanel* createDiskAndMemoryTab(wxNotebook* notebook);
|
2014-07-30 10:42:25 +00:00
|
|
|
wxSize getTextCtrlSize(wxString maxText);
|
2014-11-25 12:59:38 +00:00
|
|
|
bool doesLocalPrefsFileExist();
|
2007-01-17 18:13:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__DlgAdvPreferencesBase__
|