|
/* ConfigDialog.h
*
* Copyright (C) 3 September, 2005 Priyank Bolia
* http://www.priyank.in
*
* This code is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This code 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA
*/
#pragma once
#include "stdwx.h"
#include <wx/fileconf.h>
class CConfigDialog : public wxDialog
{
private:
wxStaticBox *m_pStaticBox;
wxStaticText *m_pRelaxText;
wxStaticText *m_pWashText;
wxStaticText *m_pCopyRightText;
wxButton *m_pOkButton;
wxButton *m_pCancelButton;
wxTextCtrl *m_pRelaxEdit;
wxTextCtrl *m_pWashEdit;
wxCheckBox *m_pStayTopCheckBox;
wxCheckBox *m_pHideIconCheckBox;
static wxString m_strRelax;
static wxString m_strWash;
enum
{
//GUI Enum Control ID Start
ID_WXSTATICBOX = 1301,
ID_WXSTATICTEXT_RELAX = 1302,
ID_WXSTATICTEXT_WASH = 1303,
ID_WXEDIT_RELAX = 1304,
ID_WXEDIT_WASH = 1305,
ID_CONFIG_BUTTON_OK = 1306,
ID_CHECKBOX_STAY_ON_TOP = 1307,
ID_CHECKBOX_HIDE_TRAY_ICON = 1308,
//GUI Enum Control ID End
ID_DUMMY_VALUE_ //Dont Delete this DummyValue
};
//End of Enum
static bool m_bStayOnTop;
static bool m_bHideTrayIcon;
public:
CConfigDialog(wxWindow *parent, wxWindowID id, const wxString &title = wxT("Configuration"), const wxPoint &position = wxDefaultPosition, const wxSize& size = wxSize(225, 167), long style = wxDEFAULT_DIALOG_STYLE);
virtual ~CConfigDialog(void);
static unsigned int GetRelaxTime(void);
static unsigned int GetWashTime(void);
static bool IsStayOnTop(void);
static bool IsHideIcon(void);
protected:
virtual bool DoOK();
private:
void OnOK(wxCommandEvent& event);
static void ReadConfig(void);
static void WriteConfig(void);
void OnCheckStayOnTop(wxCommandEvent& command);
void OnCheckHideTrayIcon(wxCommandEvent& command);
private:
DECLARE_EVENT_TABLE()
};
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.