From: Steve Brokenshire Date: Wed, 11 Jan 2017 19:33:13 +0000 (+0000) Subject: AppXestiaCalendar: Added forms and updated events X-Git-Tag: release-0.02~30 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=90d0626763aa5b7d1bcb545f49e54c7d9d6827e6;p=xestiacalendar%2F.git AppXestiaCalendar: Added forms and updated events Added forms and updated events --- diff --git a/source/AppXestiaCalendar.cpp b/source/AppXestiaCalendar.cpp index 360ec6e..d5a9af4 100644 --- a/source/AppXestiaCalendar.cpp +++ b/source/AppXestiaCalendar.cpp @@ -36,6 +36,12 @@ frmMainADT::frmMainADT( wxWindow* parent, wxWindowID id, const wxString& title, menuBar->Append( mnuManage, wxT("Manage") ); mnuCreate = new wxMenu(); + wxMenuItem* mnuCreateCalendar; + mnuCreateCalendar = new wxMenuItem( mnuCreate, wxID_ANY, wxString( wxT("Calendar...") ) , wxEmptyString, wxITEM_NORMAL ); + mnuCreate->Append( mnuCreateCalendar ); + + mnuCreate->AppendSeparator(); + wxMenuItem* mnuCreateEvent; mnuCreateEvent = new wxMenuItem( mnuCreate, wxID_ANY, wxString( wxT("Event...") ) , wxEmptyString, wxITEM_NORMAL ); mnuCreate->Append( mnuCreateEvent ); @@ -73,7 +79,12 @@ frmMainADT::frmMainADT( wxWindow* parent, wxWindowID id, const wxString& title, // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmMainADT::QuitApp ) ); + this->Connect( mnuManageNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenNewAccountDialog ) ); + this->Connect( mnuManagePreferences->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowPreferencesWindow ) ); this->Connect( mnuManageExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::QuitApp ) ); + this->Connect( mnuCreateCalendar->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CreateNewCalendar ) ); + this->Connect( mnuCreateEvent->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CreateNewEvent ) ); + this->Connect( mnuHelpShow->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowHelp ) ); this->Connect( mnuHelpUpdate->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowUpdateWindow ) ); this->Connect( mnuHelpAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowAboutWindow ) ); } @@ -82,7 +93,12 @@ frmMainADT::~frmMainADT() { // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmMainADT::QuitApp ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenNewAccountDialog ) ); + this->Disconnect( wxID_PREFERENCES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowPreferencesWindow ) ); this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::QuitApp ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CreateNewCalendar ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CreateNewEvent ) ); + this->Disconnect( wxID_HELP, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowHelp ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowUpdateWindow ) ); this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowAboutWindow ) ); @@ -207,7 +223,7 @@ frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxS tabGeneral->SetSizer( szrChecks ); tabGeneral->Layout(); szrChecks->Fit( tabGeneral ); - NbtPreferences->AddPage( tabGeneral, wxT("General"), true ); + NbtPreferences->AddPage( tabGeneral, wxT("General"), false ); tabTheme = new wxPanel( NbtPreferences, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); tabTheme->Hide(); @@ -283,7 +299,7 @@ frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxS tabAccounts->SetSizer( szrAccounts ); tabAccounts->Layout(); szrAccounts->Fit( tabAccounts ); - NbtPreferences->AddPage( tabAccounts, wxT("Accounts"), false ); + NbtPreferences->AddPage( tabAccounts, wxT("Accounts"), true ); szrTabs->Add( NbtPreferences, 1, wxALL|wxEXPAND, 5 ); @@ -325,11 +341,11 @@ frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxS btnThemeAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this ); btnThemeModify->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this ); btnThemeDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this ); - lstAccounts->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableABButtons ), NULL, this ); - lstAccounts->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableABButtons ), NULL, this ); - btnAccountAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this ); - btnAccountModify->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this ); - btnAccountDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this ); + lstAccounts->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableButtons ), NULL, this ); + lstAccounts->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableButtons ), NULL, this ); + btnAccountAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddAccount ), NULL, this ); + btnAccountModify->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyAccount ), NULL, this ); + btnAccountDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteAccount ), NULL, this ); btnSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::SavePreferences ), NULL, this ); btnCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::CloseWindow ), NULL, this ); } @@ -343,11 +359,11 @@ frmPreferencesADT::~frmPreferencesADT() btnThemeAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this ); btnThemeModify->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this ); btnThemeDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this ); - lstAccounts->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableABButtons ), NULL, this ); - lstAccounts->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableABButtons ), NULL, this ); - btnAccountAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this ); - btnAccountModify->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this ); - btnAccountDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this ); + lstAccounts->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableButtons ), NULL, this ); + lstAccounts->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableButtons ), NULL, this ); + btnAccountAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddAccount ), NULL, this ); + btnAccountModify->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyAccount ), NULL, this ); + btnAccountDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteAccount ), NULL, this ); btnSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::SavePreferences ), NULL, this ); btnCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::CloseWindow ), NULL, this ); @@ -452,10 +468,10 @@ frmNewAccountADT::frmNewAccountADT( wxWindow* parent, wxWindowID id, const wxStr lblType->Wrap( -1 ); fgSizer33->Add( lblType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - wxString cmbServerTypeChoices[] = { wxT("Local"), wxT("CardDAV") }; + wxString cmbServerTypeChoices[] = { wxT("Local") }; int cmbServerTypeNChoices = sizeof( cmbServerTypeChoices ) / sizeof( wxString ); cmbServerType = new wxChoice( tabType, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbServerTypeNChoices, cmbServerTypeChoices, 0 ); - cmbServerType->SetSelection( 1 ); + cmbServerType->SetSelection( 0 ); fgSizer33->Add( cmbServerType, 0, wxALL, 5 ); lblServerAddress = new wxStaticText( tabType, wxID_ANY, wxT("Server Address:"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -1265,3 +1281,235 @@ frmInvalidSSLCertificateADT::~frmInvalidSSLCertificateADT() btnViewCert->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmInvalidSSLCertificateADT::ViewCertificates ), NULL, this ); } + +frmCalendarEditorADT::frmCalendarEditorADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer44; + bSizer44 = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* fgSizer12; + fgSizer12 = new wxFlexGridSizer( 4, 2, 0, 0 ); + fgSizer12->AddGrowableCol( 1 ); + fgSizer12->AddGrowableRow( 3 ); + fgSizer12->SetFlexibleDirection( wxBOTH ); + fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + lblAccount = new wxStaticText( this, wxID_ANY, wxT("Account:"), wxDefaultPosition, wxDefaultSize, 0 ); + lblAccount->Wrap( -1 ); + fgSizer12->Add( lblAccount, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + wxArrayString cmbAccountChoices; + cmbAccount = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbAccountChoices, 0 ); + cmbAccount->SetSelection( 0 ); + fgSizer12->Add( cmbAccount, 0, wxALL|wxEXPAND, 5 ); + + lblName = new wxStaticText( this, wxID_ANY, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 ); + lblName->Wrap( -1 ); + fgSizer12->Add( lblName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + txtName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer12->Add( txtName, 1, wxALL|wxEXPAND, 5 ); + + lblColour = new wxStaticText( this, wxID_ANY, wxT("Colour:"), wxDefaultPosition, wxDefaultSize, 0 ); + lblColour->Wrap( -1 ); + fgSizer12->Add( lblColour, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + clpColour = new wxColourPickerCtrl( this, wxID_ANY, wxColour( 0, 0, 0 ), wxDefaultPosition, wxSize( 50,24 ), wxCLRP_DEFAULT_STYLE ); + fgSizer12->Add( clpColour, 0, wxALL, 5 ); + + lblDescription = new wxStaticText( this, wxID_ANY, wxT("Description:"), wxDefaultPosition, wxDefaultSize, 0 ); + lblDescription->Wrap( -1 ); + fgSizer12->Add( lblDescription, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + txtDescription = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); + fgSizer12->Add( txtDescription, 1, wxALL|wxEXPAND, 5 ); + + + bSizer44->Add( fgSizer12, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer46; + bSizer46 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer46->Add( 0, 0, 1, wxEXPAND, 5 ); + + btnCreate = new wxButton( this, wxID_ANY, wxT("Create"), wxDefaultPosition, wxDefaultSize, 0 ); + btnCreate->SetDefault(); + bSizer46->Add( btnCreate, 0, wxALL, 5 ); + + btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer46->Add( btnClose, 0, wxALL, 5 ); + + + bSizer44->Add( bSizer46, 0, wxEXPAND, 5 ); + + + this->SetSizer( bSizer44 ); + this->Layout(); + + this->Centre( wxBOTH ); + + // Connect Events + btnCreate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmCalendarEditorADT::ProcessCalendar ), NULL, this ); + btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmCalendarEditorADT::CloseWindow ), NULL, this ); +} + +frmCalendarEditorADT::~frmCalendarEditorADT() +{ + // Disconnect Events + btnCreate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmCalendarEditorADT::ProcessCalendar ), NULL, this ); + btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmCalendarEditorADT::CloseWindow ), NULL, this ); + +} + +frmEventEditorADT::frmEventEditorADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + menuBar = new wxMenuBar( 0 ); + mnuEvent = new wxMenu(); + wxMenuItem* mnuEventSave; + mnuEventSave = new wxMenuItem( mnuEvent, wxID_ANY, wxString( wxT("Save") ) , wxEmptyString, wxITEM_NORMAL ); + mnuEvent->Append( mnuEventSave ); + + wxMenuItem* mnuEventSaveNew; + mnuEventSaveNew = new wxMenuItem( mnuEvent, wxID_ANY, wxString( wxT("Save and New") ) , wxEmptyString, wxITEM_NORMAL ); + mnuEvent->Append( mnuEventSaveNew ); + + mnuEvent->AppendSeparator(); + + wxMenuItem* mnuEventClose; + mnuEventClose = new wxMenuItem( mnuEvent, wxID_ANY, wxString( wxT("Close") ) , wxEmptyString, wxITEM_NORMAL ); + mnuEvent->Append( mnuEventClose ); + + menuBar->Append( mnuEvent, wxT("Event") ); + + mnuEdit = new wxMenu(); + wxMenuItem* mnuEditCut; + mnuEditCut = new wxMenuItem( mnuEdit, wxID_CUT, wxString( wxT("Cut") ) , wxEmptyString, wxITEM_NORMAL ); + mnuEdit->Append( mnuEditCut ); + + wxMenuItem* mnuEditCopy; + mnuEditCopy = new wxMenuItem( mnuEdit, wxID_COPY, wxString( wxT("Copy") ) , wxEmptyString, wxITEM_NORMAL ); + mnuEdit->Append( mnuEditCopy ); + + wxMenuItem* mnuEditPaste; + mnuEditPaste = new wxMenuItem( mnuEdit, wxID_PASTE, wxString( wxT("Paste") ) , wxEmptyString, wxITEM_NORMAL ); + mnuEdit->Append( mnuEditPaste ); + + menuBar->Append( mnuEdit, wxT("Edit") ); + + this->SetMenuBar( menuBar ); + + wxBoxSizer* bSizer46; + bSizer46 = new wxBoxSizer( wxVERTICAL ); + + nbkNotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + tabProperties = new wxScrolledWindow( nbkNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + tabProperties->SetScrollRate( 5, 5 ); + szrList = new wxBoxSizer( wxVERTICAL ); + + szrDetails = new wxFlexGridSizer( 3, 2, 0, 0 ); + szrDetails->AddGrowableCol( 1 ); + szrDetails->SetFlexibleDirection( wxBOTH ); + szrDetails->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + lblCalendar = new wxStaticText( tabProperties, wxID_ANY, wxT("Calendar:"), wxDefaultPosition, wxDefaultSize, 0 ); + lblCalendar->Wrap( -1 ); + szrDetails->Add( lblCalendar, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + wxArrayString cmbCalendarChoices; + cmbCalendar = new wxChoice( tabProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbCalendarChoices, 0 ); + cmbCalendar->SetSelection( 0 ); + szrDetails->Add( cmbCalendar, 1, wxALL|wxEXPAND, 5 ); + + lblEventName = new wxStaticText( tabProperties, wxID_ANY, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 ); + lblEventName->Wrap( -1 ); + szrDetails->Add( lblEventName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + txtEventName = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + szrDetails->Add( txtEventName, 1, wxALL|wxEXPAND, 5 ); + + lblDescription = new wxStaticText( tabProperties, wxID_ANY, wxT("Description:"), wxDefaultPosition, wxDefaultSize, 0 ); + lblDescription->Wrap( -1 ); + szrDetails->Add( lblDescription, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + txtEventDescription = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); + txtEventDescription->SetMinSize( wxSize( -1,50 ) ); + + szrDetails->Add( txtEventDescription, 0, wxALL|wxEXPAND, 5 ); + + + szrList->Add( szrDetails, 0, wxEXPAND, 5 ); + + szrTime = new wxFlexGridSizer( 3, 3, 0, 0 ); + szrTime->SetFlexibleDirection( wxBOTH ); + szrTime->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + lblStartTime = new wxStaticText( tabProperties, wxID_ANY, wxT("Start Time:"), wxDefaultPosition, wxDefaultSize, 0 ); + lblStartTime->Wrap( -1 ); + szrTime->Add( lblStartTime, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + dapStartDate = new wxDatePickerCtrl( tabProperties, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_DROPDOWN|wxDP_SHOWCENTURY ); + szrTime->Add( dapStartDate, 0, wxALL, 5 ); + + txtStartTime = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + szrTime->Add( txtStartTime, 0, wxALL, 5 ); + + lblEndTime = new wxStaticText( tabProperties, wxID_ANY, wxT("End Time:"), wxDefaultPosition, wxDefaultSize, 0 ); + lblEndTime->Wrap( -1 ); + szrTime->Add( lblEndTime, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + dapEndDate = new wxDatePickerCtrl( tabProperties, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_SHOWCENTURY ); + szrTime->Add( dapEndDate, 0, wxALL, 5 ); + + txtEndTime = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + szrTime->Add( txtEndTime, 0, wxALL, 5 ); + + lblDuration = new wxStaticText( tabProperties, wxID_ANY, wxT("Duration:"), wxDefaultPosition, wxDefaultSize, 0 ); + lblDuration->Wrap( -1 ); + szrTime->Add( lblDuration, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_textCtrl20 = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + szrTime->Add( m_textCtrl20, 0, wxALL, 5 ); + + + szrList->Add( szrTime, 1, wxEXPAND, 5 ); + + + tabProperties->SetSizer( szrList ); + tabProperties->Layout(); + szrList->Fit( tabProperties ); + nbkNotebook->AddPage( tabProperties, wxT("Properties"), false ); + + bSizer46->Add( nbkNotebook, 1, wxEXPAND | wxALL, 5 ); + + + this->SetSizer( bSizer46 ); + this->Layout(); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( mnuEventSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::SaveContact ) ); + this->Connect( mnuEventSaveNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::SaveNewContact ) ); + this->Connect( mnuEventClose->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::CloseWindow ) ); + this->Connect( mnuEditCut->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::CutText ) ); + this->Connect( mnuEditCopy->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::CopyText ) ); + this->Connect( mnuEditPaste->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::PasteText ) ); +} + +frmEventEditorADT::~frmEventEditorADT() +{ + // Disconnect Events + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::SaveContact ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::SaveNewContact ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::CloseWindow ) ); + this->Disconnect( wxID_CUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::CutText ) ); + this->Disconnect( wxID_COPY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::CopyText ) ); + this->Disconnect( wxID_PASTE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::PasteText ) ); + +} diff --git a/source/AppXestiaCalendar.h b/source/AppXestiaCalendar.h index 6329767..c5c42af 100644 --- a/source/AppXestiaCalendar.h +++ b/source/AppXestiaCalendar.h @@ -37,6 +37,10 @@ #include #include #include +#include +#include +#include +#include /////////////////////////////////////////////////////////////////////////// @@ -58,7 +62,12 @@ class frmMainADT : public wxFrame // Virtual event handlers, overide them in your derived class virtual void QuitApp( wxCloseEvent& event ) { event.Skip(); } + virtual void OpenNewAccountDialog( wxCommandEvent& event ) { event.Skip(); } + virtual void ShowPreferencesWindow( wxCommandEvent& event ) { event.Skip(); } virtual void QuitApp( wxCommandEvent& event ) { event.Skip(); } + virtual void CreateNewCalendar( wxCommandEvent& event ) { event.Skip(); } + virtual void CreateNewEvent( wxCommandEvent& event ) { event.Skip(); } + virtual void ShowHelp( wxCommandEvent& event ) { event.Skip(); } virtual void ShowUpdateWindow( wxCommandEvent& event ) { event.Skip(); } virtual void ShowAboutWindow( wxCommandEvent& event ) { event.Skip(); } @@ -137,6 +146,11 @@ class frmPreferencesADT : public wxDialog virtual void AddABAccount( wxCommandEvent& event ) { event.Skip(); } virtual void ModifyABAccount( wxCommandEvent& event ) { event.Skip(); } virtual void DeleteABAccount( wxCommandEvent& event ) { event.Skip(); } + virtual void DisableButtons( wxListEvent& event ) { event.Skip(); } + virtual void EnableButtons( wxListEvent& event ) { event.Skip(); } + virtual void AddAccount( wxCommandEvent& event ) { event.Skip(); } + virtual void ModifyAccount( wxCommandEvent& event ) { event.Skip(); } + virtual void DeleteAccount( wxCommandEvent& event ) { event.Skip(); } virtual void SavePreferences( wxCommandEvent& event ) { event.Skip(); } virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); } @@ -422,4 +436,83 @@ class frmInvalidSSLCertificateADT : public wxDialog }; +/////////////////////////////////////////////////////////////////////////////// +/// Class frmCalendarEditorADT +/////////////////////////////////////////////////////////////////////////////// +class frmCalendarEditorADT : public wxDialog +{ + private: + + protected: + wxStaticText* lblAccount; + wxChoice* cmbAccount; + wxStaticText* lblName; + wxTextCtrl* txtName; + wxStaticText* lblColour; + wxColourPickerCtrl* clpColour; + wxStaticText* lblDescription; + wxTextCtrl* txtDescription; + wxButton* btnCreate; + wxButton* btnClose; + + // Virtual event handlers, overide them in your derived class + virtual void ProcessCalendar( wxCommandEvent& event ) { event.Skip(); } + virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); } + + + public: + + frmCalendarEditorADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Calendar Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,305 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~frmCalendarEditorADT(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class frmEventEditorADT +/////////////////////////////////////////////////////////////////////////////// +class frmEventEditorADT : public wxFrame +{ + private: + + protected: + wxMenuBar* menuBar; + wxMenu* mnuEvent; + wxMenu* mnuEdit; + wxNotebook* nbkNotebook; + wxScrolledWindow* tabProperties; + wxBoxSizer* szrList; + wxFlexGridSizer* szrDetails; + wxStaticText* lblCalendar; + wxChoice* cmbCalendar; + wxStaticText* lblEventName; + wxTextCtrl* txtEventName; + wxStaticText* lblDescription; + wxTextCtrl* txtEventDescription; + wxFlexGridSizer* szrTime; + wxStaticText* lblStartTime; + wxDatePickerCtrl* dapStartDate; + wxTextCtrl* txtStartTime; + wxStaticText* lblEndTime; + wxDatePickerCtrl* dapEndDate; + wxTextCtrl* txtEndTime; + wxStaticText* lblDuration; + wxTextCtrl* m_textCtrl20; + + // Virtual event handlers, overide them in your derived class + virtual void SaveContact( wxCommandEvent& event ) { event.Skip(); } + virtual void SaveNewContact( wxCommandEvent& event ) { event.Skip(); } + virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); } + virtual void CutText( wxCommandEvent& event ) { event.Skip(); } + virtual void CopyText( wxCommandEvent& event ) { event.Skip(); } + virtual void PasteText( wxCommandEvent& event ) { event.Skip(); } + + + public: + + frmEventEditorADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Event Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 546,401 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); + + ~frmEventEditorADT(); + +}; + #endif //__APPXESTIACALENDAR_H__