HatchKeeper  0.90
The Free Open-Source Egg Incubation Software
/home/millj/Documents/1-Code/HatchKeeper/HatchKeeper.h
Go to the documentation of this file.
1 /*******************************************************************/
7 #ifndef _HATCHKEEPER_H__
8 #define _HATCHKEEPER_H__
9 
10 #include <wx/statline.h>
11 #include <ctime>
12 #include <dirent.h>
13 #include <string>
14 #include <wx/wx.h>
15 #include <wx/toolbar.h>
16 #include <wx/calctrl.h>
17 #include <wx/spinctrl.h>
18 #include <wx/choice.h>
19 #include <wx/datectrl.h>
20 #include <wx/listctrl.h>
21 #include <wx/filepicker.h>
22 #include <wx/splash.h>
23 #include <wx/generic/calctrlg.h>
24 #include <wx/panel.h>
25 #include <wx/notebook.h>
26 #include <wx/printdlg.h>
27 #include <wx/html/htmprint.h>
28 #include <wx/textdlg.h>
29 #include <wx/notifmsg.h>
30 #include <wx/generic/notifmsg.h>
31 #include <wx/clipbrd.h>
32 
34 #include "./.HatchKeeper_Data_90/Images/hatch.xpm" //for icon
35 
36 //libhatchkeeper
37 #include "headers/Date.h"
38 #include "headers/Storage.h"
39 
40 //Include Dialog classes
41 #include "src/GUI/BatchDialog.cpp"
42 #include "src/GUI/PrefDialog.cpp"
45 #include "src/GUI/HelpDialog.cpp"
46 #include "src/GUI/GraphDialog.cpp"
47 #include "src/GUI/SearchDialog.cpp"
48 
49 //Taskbar and notifications
50 #include "src/GUI/TaskbarIcon.cpp"
51 
52 //HatchFrame IDs////////////////////////
53 const int CALANDAR = 1000;
54 const int TEXT_LOG = 1001;
55 const int TOOLBAR = 1002;
56 const int MAIN_LIST = 1003;
57 const int ON_SORT = 1004;
58 const int ON_GRAPH = 1102;
59 const int ON_CLOSE = 1201;
60 const int ON_SEARCH = 1202;
61 const int TIMER1 = 1305;
62 const int TIMER2 = 1306;
63  //Events
64  const int ON_BATCH = 1103;
65  const int ON_SCH = 1005;
66  const int ON_PREF = 1006;
67  const int ON_REFR = 1007;
68  const int ON_REMIND = 1008;
69  const int ON_ABOUT = 1009;
70  const int ON_IMPORT = 1020;
71  const int ON_QUIT = 1024;
72 
73  const int ON_UPDATE = 1011;
74  const int ON_DELETE = 1012;
75  const int ON_MORE = 1013;
76  const int ON_CALPRN = 1015;
77 
78  const int CAL_CHANGE = 1010;
79  const int HIDE_HATCH = 1016;
80 
81  const int ON_EGG = 1021;
82  const int ON_FERTILE = 1022;
83  const int ON_HATCHED = 1023;
84 
85  //groups
86  const int GR_ADD = 1030;
87  const int GR_DELETE = 1031;
88  const int GR_MORE = 1032;
89  const int GR_COMMENT = 1035;
90 
91  const int ADV_ENABLE = 1050;
92  const int ADV_EGG_COM = 1051;
93  const int ADV_PIP = 1052;
94  const int ADV_FERTILE = 1053;
95  const int ADV_WEIGHT = 1054;
96  const int ADV_DAY_COM = 1055;
97  const int ADV_SAVE_CH = 1057;
98  const int ADV_RES_CH = 1058;
99  const int ADV_RES_DATE = 1059;
100  const int ADV_TAG_CH = 1060;
101 
103 
104 
105 extern int HatchCondition;
106 
107 using namespace std;
108 
115 class HatchFrame : public wxFrame
116 {
117  public:
118  HatchFrame();
119  ~HatchFrame();
120 
121  //ToolBar Functions/////////////////////////////////////////////////
122  void OnImport(wxCommandEvent&); //Imports a Batch File
123  void OnNewBatch(wxCommandEvent& ); //Opens BatchDialog
124  void OnSchedule(wxCommandEvent& ); //Opens ScheduleDialog
125  void OnRemind(wxCommandEvent& ); //Opens RemindDialog
126  void OnRefresh(wxCommandEvent& ); //Rescans Batches from database
127  void OnPreference(wxCommandEvent& ); //Opens PrefDialog
128 #ifndef __NO_GRAPH__
129  void OnGraph(wxCommandEvent&); //Opens GraphDialog
130 #endif //__NO_GRAPH__
131  void OnAbout(wxCommandEvent& ); //Opens HelpDialog
132  void OnQuit(wxCommandEvent& );
133  void OnSearch(wxCommandEvent& );
135 
136  //ListView Functions////////////////////////////////////////////////
137  void OnListSelect(wxListEvent& ); //calls SetupBatchStats
138  void OnListDESelect(wxListEvent& evt); //calls UnsetBatchStats
139  void OnColumnClick(wxListEvent& evt); //calls UnsetBatchStats
140  void OnSort(wxCommandEvent&); //Rescan batches sorted from database
141  void SetupBatchStats(int sel); //setup BatchStats with batch data
142  void UnsetBatchStats(void); //Clear BatchStats
143  void ShowBatches(bool Scan); //Show batches in MainList
144  int listSel; //for use with OnListDESelect and OnListSelect
146 
147  //BatchStat Panel Functions/////////////////////////////////////////
148  void OnEggSpinner(wxSpinEvent&); //Sets the # of Fertile Eggs spinner range
149  void OnFertileSpin(wxSpinEvent&); //Sets the # Chicks Hatched spinner range
150  void OnHatchedSpin(wxSpinEvent&); //Make Input Read-Only If advEnabled == 1
151  void OnBatchName(wxCommandEvent&);
152  void OnBatchType(wxCommandEvent&);
153  void OnBatchBreed(wxCommandEvent&);
154  void OnBatchGroup(wxCommandEvent&);
155  void OnBatchIncubator(wxCommandEvent&);
156  void OnBatchDates(wxDateEvent&);
157  void OnBatchComments(wxCommandEvent&);
158  void OnUpdate(wxCommandEvent&); //update batch
159  void OnDelete(wxCommandEvent&); //delete batch
160  void OnMoreActions(wxCommandEvent&);//More Actions For Batch
162 
163  //MainCalendar Functions////////////////////////////////////////////
164  void OnCalChange(wxCalendarEvent&); //do some things if the calendar gets changed
165  void OnCalPrn(wxCommandEvent&); //Print a calendar with all batch dates on it.
166  void RemoveAttr(void); //clears marked dates on the calendar
167  int daysWAttr[5];
168  int dwAttr = 0;
170 
171  //Advanced Functions////////////////////////////////////////////////
172  bool SetBatchAsAdvanced(int sel);
173  void OnEnableAdv(wxCommandEvent&);
174  void DeleteAdvanced(int sel);
175  void ScanAdvanced(int sel);
176  void ShowAdvanced();
177  void OnSelectEgg(wxListEvent&);
178  void OnUnSelectEgg(wxListEvent&);
179  void ClearAdvPanel();
180  void OnAdvDaySelect(wxListEvent&);
181  void OnAdvDayUnSelect(wxListEvent&);
182  void ShowAdvWeight(HK_Egg Egg, int Select);
183  string ReadableDate(wxDateTime date);
184 
185  //Adv Update Functions
186  void OnEggCommentChange(wxCommandEvent&);
187  void OnTagsChange(wxCommandEvent&);
188  void OnAdvFertileChecked(wxCommandEvent&);
189  void OnAdvPippedChecked(wxCommandEvent&);
190  void OnAdvResultChoice(wxCommandEvent&);
191  void OnAdvResultDate(wxDateEvent&);
192  void OnWeightChange(wxSpinDoubleEvent&);
193  void OnDayCommentChange(wxCommandEvent&);
194  void OnSaveAdvChanges(wxCommandEvent&);
195 
197 
198  //Groups////////////////////////////////////////////////////////////
199  void AddGroup(string Name, string Comment);
200  void OnAddGroup(wxCommandEvent&); //Add A Group
201  void OnDelGroup(wxCommandEvent&); //Delete Group
202  void OnMoreGroupActions(wxCommandEvent&);//More Actions For Group
203  void OnGrComment(wxCommandEvent&); //Update the notes for the group
204  void ShowGroups(bool Scan); //Insert Groups into GroupList
205  void OnGroupSelect(wxListEvent&); //if a group is selected in GroupList
206  void OnGroupUnSelect(wxListEvent&); //if group gets unselected in GroupList
208 
209  //notification functions
210  void ShowMsg(string Msg);
211  void OnTimer(wxTimerEvent&);
212  void ShowNotifications();
213  void OnCloseWindow(wxCloseEvent &evt);//hides main window
214  void OnNotificationClicked(wxCommandEvent&);
215  void OnNotificationDismissed(wxCommandEvent&);
216 
217  //Batch Graph
218  void ShowBatchGraph(int sel);
220 
221  //Hide Hatched
222  void OnHideChange(wxCommandEvent&);
223 
224  private:
225 
226  wxToolBar* TheToolBar;
227  wxGenericCalendarCtrl* MainCalendar;
228  wxNotebook* m_notebook2;
229  wxPanel* BatchPanel;
230  wxTextCtrl* BPNameCtrl;
231  wxChoice* BPTypeChoice;
232  wxChoice* BPBreedChoice;
233  wxChoice* BPGroupChoice;
234  wxGauge* BPProgressGauge;
235  wxChoice* BPIncubatorChoice;
236  wxSpinCtrl* BPEggSpin;
237  wxStaticBitmap* BPEggStat;
238  wxSpinCtrl* BPFertileSpin;
239  wxStaticBitmap* BPFertileStat;
240  wxSpinCtrl* BPChicksHatchSpin;
241  wxStaticBitmap* BPChicksStat;
242 
243  wxStaticLine* BPStatLine1;
244  wxStaticText* BPFerUnStat;
245  wxStaticText* BPPerWerFerStat;
246  wxStaticText* BPPerOfTotalStat;
247  wxStaticText* BPPerOfFerStat;
248  wxStaticText* BPPerUnhatchStat;
249  wxStaticLine* BPStatLine2;
250  wxDatePickerCtrl* BPStartDateCtrl;
251  wxStaticText* BPStartStat;
252  wxDatePickerCtrl* BPCandleDateCtrl;
253  wxStaticText* BPCandleStat;
254  wxDatePickerCtrl* BPLockDateCtrl;
255  wxStaticText* BPLockStat;
256  wxDatePickerCtrl* BPHatchDateCtrl;
257  wxStaticText* BPHatchStat;
258  wxTextCtrl* BPCommentCtrl;
259  wxStaticLine* BPStatLine3;
260  wxButton* BPUpdate;
261  wxChoice* MoreActionsChoice;
262  wxButton* BPDelete;
263  wxPanel* NotePanel;
264  wxListView* NoteList;
265  wxButton* ClearNoteButton;
266  wxSpinCtrl* ClearDaySpin;
267  wxStaticText* ClearDayStat;
268  wxListView* MainList;
269  wxStaticText* SortBatchStat;
270  wxChoice* SortBatchChoice;
271  wxButton* printCalButton;
272  wxCheckBox* HideCheckBox;
273 #ifndef __NO_GRAPH__
274  wxChartPanel* BatchGraphPanel;
275 #endif
276 
277  //Group
278  wxPanel* GroupPanel;
279  wxListView* GroupList;
280  wxTextCtrl* GrCommentCtrl;
281  wxButton* GrUpateButton;
282  wxListView* GrBatchList;
283  wxStaticBitmap* GrEggBitmap;
284  wxTextCtrl* GrTEggCtrl;
285  wxStaticBitmap* GrChickBitmap;
286  wxTextCtrl* GrTChickCtrl;
287  wxStaticText* GrAWFerStat;
288  wxStaticText* GrAOFHatchStat;
289  wxStaticText* GrAOTHatchStat;
290  wxStaticText* GrAOTUnHatchStat;
291  wxButton* GrAddButton;
292  wxChoice* GrMoreChoice;
293  wxButton* GrDeleteButton;
294 
295 
296  //Advanced
297  wxPanel* EggPanel;
298  wxListView* AdvEggList;
299  wxChoice* AdvTag1Choice;
300  wxChoice* AdvTag2Choice;
301  wxChoice* AdvTag3Choice;
302  wxStaticLine* m_staticline3;
303  wxCheckBox* AdvFertileCheckbox;
304  wxCheckBox* AdvPipCheckbox;
305  wxStaticLine* m_staticline4;
306  wxChoice* AdvResultChoice;
307  wxDatePickerCtrl* AdvResultDate;
308  wxTextCtrl* AdvCommentCtrl;
309  wxStaticLine* AdvStatLine1;
310  wxListView* AdvWeightList;
311  wxSpinCtrlDouble* AdvWeightCtrl;
312  wxStaticText* AdvTotalLossStat;
313  wxStaticText* AdvDayLossStat;
314  wxStaticText* AdvAvgBatchLossStat;
315  wxTextCtrl* AdvDayCommentCtrl;
316  wxStaticLine* AdvStatLine2;
317  wxButton* AdvUpdate;
318  wxChoice* AdvMoreChoice;
319  wxButton* AdvDelete;
320 
322 
323  DECLARE_EVENT_TABLE()
324 };
325 
326 class HatchApp : public wxApp
327 {
328 public:
329  //both EVT_QUERY_END_SESSION and EVT_END_SESSION use OnExitSession
330  void OnExitSession(wxCloseEvent& evt);
331  virtual void MacReopenApp();
332  virtual bool OnInit();
333  int OnExit();
335 private:
336 };
337 
338 
340 HatchFrame::HatchFrame() : wxFrame(NULL, -1, "HatchKeeper",wxDefaultPosition,wxSize(1164,650))
341 {
342  string FileFolder;
343 
344  //Make sure HATCHKEEPER_DATA is found
345  if( ! wxDirExists(HATCHKEEPER_DATA.c_str())) {
346 #ifdef __WXOSX__
347  //if not found copy HatchKeeper_Data to home folder.
348  system("cp -r ./HatchKeeper.app/Contents/Resources/.HatchKeeper_Data* ~");
349 #endif
350  if( ! wxDirExists(HATCHKEEPER_DATA.c_str())) {
351  ShowMsg("Can't Find: " + HATCHKEEPER_DATA + "\n HatchKeeper Will Exit...");
352  exit(1);
353  }
354  }
355 
356  FileFolder = HATCHKEEPER_DATA + "HatchKeeper.db";
357  cout<<FileFolder<<endl;
358  if( ! wxFileExists(FileFolder.c_str()))
359  Database.CreateDB();
360 
361  //ScanSettings();
363 
364  Language.SetPath(Settings.GetValue("LanguageXML"));
365 
366 
367  //Under Windows We Need This To Load Png Files
368  wxImage::AddHandler(new wxPNGHandler);
369 
370  if (Settings.GetInt("ShowSplash") == 0 && HatchCondition == 0) {
371  wxBitmap bitmap;
372 
373  FileFolder = HATCHKEEPER_DATA + "Images/Splash.png";
374  if (bitmap.LoadFile(FileFolder.c_str(), wxBITMAP_TYPE_PNG)) {
375  wxSplashScreen* splash = new wxSplashScreen(bitmap,
376  wxSPLASH_CENTRE_ON_PARENT|wxSPLASH_TIMEOUT,
377  3000, NULL, -1, wxDefaultPosition, wxDefaultSize,
378  wxBORDER_SIMPLE|wxSTAY_ON_TOP|wxHORIZONTAL|wxCENTER_ON_SCREEN);
379  }
380  }
381  wxYield();
382  //set up notification timer
383  wxTimer * timer1 = new wxTimer(this,TIMER1);
384 
385  //fires every 30 seconds
386  timer1->Start(30000);
387 
388  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
389 
390  //Colors
391  vector<int> ColorRed = Settings.GetIntArray("ColorRed");
392  vector<int> ColorGreen = Settings.GetIntArray("ColorGreen");
393  vector<int> ColorBlue = Settings.GetIntArray("ColorBlue");
394  this->SetBackgroundColour(wxColor(ColorRed[0],ColorGreen[0],ColorBlue[0],225) );
395 
396  wxBoxSizer* bSizer2;
397  bSizer2 = new wxBoxSizer( wxVERTICAL );
398 
399  TheToolBar = new wxToolBar( this, TOOLBAR, wxDefaultPosition, wxDefaultSize, wxTB_HORIZONTAL|wxTB_TEXT );
400  FileFolder = HATCHKEEPER_DATA + "Images/newBatch.png";
401  TheToolBar->AddTool( ON_BATCH, l("New Batch"), wxBitmap( FileFolder.c_str(), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
402  FileFolder = HATCHKEEPER_DATA + "Images/import.png";
403  TheToolBar->AddTool( ON_IMPORT, l("Import Batch"), wxBitmap( FileFolder.c_str(), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
404  FileFolder = HATCHKEEPER_DATA + "Images/sch.png";
405  TheToolBar->AddTool( ON_SCH, l("Schedules"), wxBitmap(FileFolder.c_str(), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
406  FileFolder = HATCHKEEPER_DATA + "Images/Remind.png";
407  TheToolBar->AddTool( ON_REMIND, l("Reminders"), wxBitmap( FileFolder.c_str(), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
408  FileFolder = HATCHKEEPER_DATA + "Images/pref.png";
409  TheToolBar->AddTool( ON_PREF, l("Settings"), wxBitmap( FileFolder.c_str(), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
410  FileFolder = HATCHKEEPER_DATA + "Images/refresh.png";
411  TheToolBar->AddTool( ON_REFR, l("Refresh"), wxBitmap( FileFolder.c_str(), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
412 #ifndef __NO_GRAPH__
413  FileFolder = HATCHKEEPER_DATA + "Images/Graph.png";
414  TheToolBar->AddTool( ON_GRAPH, l("Graphs"), wxBitmap(FileFolder.c_str(), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
415 #endif //__NO_GRAPH__
416  FileFolder = HATCHKEEPER_DATA + "Images/About.png";
417  TheToolBar->AddTool( ON_ABOUT, l("About"), wxBitmap(FileFolder.c_str(), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
418 
419  FileFolder = HATCHKEEPER_DATA + "Images/Search.png";
420  TheToolBar->AddTool( ON_SEARCH, l("Search"), wxBitmap(FileFolder.c_str(), wxBITMAP_TYPE_PNG ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
421 
422  FileFolder = HATCHKEEPER_DATA + "Images/Exit.png";
423  TheToolBar->AddTool( ON_QUIT, l("Exit"), wxBitmap(FileFolder.c_str(), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
424 
425 
426  TheToolBar->Realize();
427 
428  bSizer2->Add( TheToolBar, 0, wxEXPAND, 5 );
429 
430  wxGridSizer* gSizer1;
431  gSizer1 = new wxGridSizer( 0, 2, 0, 0 );
432 
433  wxGridSizer* gSizer3;
434  gSizer3 = new wxGridSizer( 2, 0, 0, 0 );
435 
436  wxBoxSizer* bSizer11;
437  bSizer11 = new wxBoxSizer( wxHORIZONTAL );
438 
439  MainCalendar = new wxGenericCalendarCtrl( this, CAL_CHANGE, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_SURROUNDING_WEEKS|wxCAL_SEQUENTIAL_MONTH_SELECTION );
440  bSizer11->Add( MainCalendar, 1, wxALL|wxEXPAND, 5 ); //set font and color
441  wxFont CalFont(Settings.GetInt("CalTextSize"), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL,wxFONTWEIGHT_BOLD, true);
442  MainCalendar->SetOwnFont(CalFont);
443  MainCalendar->SetBackgroundColour(wxColor(ColorRed[1],ColorGreen[1],ColorBlue[1],225));
444  MainCalendar->SetForegroundColour(wxColor(ColorRed[2],ColorGreen[2],ColorBlue[2],225));
445  MainCalendar->SetHeaderColours (wxColor(0,0,0,225), wxColor(211,211,211,225));
446 
447 #ifndef __NO_GRAPH__
448  BatchGraphPanel = new wxChartPanel(this,wxID_ANY, NULL, wxDefaultPosition, wxSize(130,325));
449  BatchGraphPanel->SetToolTip( l("Legend: Blue: % Were Fertile, Yellow: % Of Fertile Hatched, Red: % Of Total Hatched, Green: % Of Total Unhatched") );
450  bSizer11->Add( BatchGraphPanel, 0, wxALL|wxEXPAND, 5 );
451 #endif
452 
453  gSizer3->Add( bSizer11, 1, wxEXPAND, 5 );
454 
455  wxBoxSizer* bSizer4;
456  bSizer4 = new wxBoxSizer( wxVERTICAL );
457 
458  wxFlexGridSizer* gSizer11;
459  gSizer11 = new wxFlexGridSizer( 1, 4, 0, 0 );
460  gSizer11->SetFlexibleDirection(wxHORIZONTAL);
461  printCalButton = new wxButton( this, ON_CALPRN, l("Print Month"), wxDefaultPosition, wxDefaultSize, 0 );
462  printCalButton->SetToolTip( l("Prints The Month Selected Above With All Its Batch Dates") );
463  gSizer11->Add( printCalButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
464 
465  SortBatchStat = new wxStaticText( this, wxID_ANY, l("Sort Batches By") + "..", wxDefaultPosition, wxDefaultSize, 0 );
466  SortBatchStat->Wrap( -1 );
467  gSizer11->Add( SortBatchStat, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
468 
469  wxArrayString SortBatchChoiceChoices;
470  SortBatchChoice = new wxChoice( this, ON_SORT, wxDefaultPosition, wxDefaultSize, SortBatchChoiceChoices, 0 );
471  gSizer11->Add( SortBatchChoice, 1, wxALL, 5 );
472 
473  HideCheckBox = new wxCheckBox( this, HIDE_HATCH, l("Hide Hatched"), wxDefaultPosition, wxDefaultSize, 0 );
474  HideCheckBox->SetToolTip( l("Hide Batches That Have Hatched Already, Works Best If Sorted By Hatch Date") );
475  gSizer11->Add( HideCheckBox, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
476 
477  bSizer4->Add( gSizer11, 0, wxEXPAND, 5 );
478 
479  MainList = new wxListView( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL );
480  bSizer4->Add( MainList, 1, wxALL|wxEXPAND, 5 );
481  MainList->SetBackgroundColour(wxColor(ColorRed[3],ColorGreen[3],ColorBlue[3],225) );
482  MainList->SetForegroundColour(wxColor(ColorRed[4],ColorGreen[4],ColorBlue[4],225));
483 
484  gSizer3->Add( bSizer4, 1, wxEXPAND, 5 );
485 
486  gSizer1->Add( gSizer3, 1, wxEXPAND, 5 );
487 
488  m_notebook2 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
489  m_notebook2->SetBackgroundColour(wxColor(ColorRed[5],ColorGreen[5],ColorBlue[5],225) );
490  BatchPanel = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
491  BatchPanel->SetBackgroundColour( wxColor(ColorRed[5],ColorGreen[5],ColorBlue[5],225));
492  BatchPanel->SetForegroundColour( wxColor(ColorRed[6],ColorGreen[6],ColorBlue[6],225));
493 
494  wxBoxSizer* BPBoxSizer;
495  BPBoxSizer = new wxBoxSizer( wxVERTICAL );
496 
497  wxGridSizer* BPGridSizer;
498  BPGridSizer = new wxGridSizer( 0, 3, 0, 0 );
499 
500  //Exclude Illigal Chars
501  wxTextValidator textVal(wxFILTER_INCLUDE_CHAR_LIST,NULL);
502  textVal.SetCharIncludes(Info.GetValidChars().c_str());
503 
504  BPNameCtrl = new wxTextCtrl( BatchPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ,textVal);
505  BPNameCtrl->SetToolTip( l("Edit Batch Name") );
506  BPGridSizer->Add( BPNameCtrl, 0, wxALL|wxEXPAND, 5 );
507 
508  wxArrayString BPTypeChoiceChoices;
509  BPTypeChoice = new wxChoice( BatchPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, BPTypeChoiceChoices, 0 );
510  BPTypeChoice->SetSelection( 0 );
511  BPTypeChoice->SetToolTip( l("Edit Batch Type") );
512  BPGridSizer->Add( BPTypeChoice, 0, wxALL|wxEXPAND, 5 );
513 
514  wxArrayString BPBreedChoiceChoices;
515  BPBreedChoice = new wxChoice( BatchPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, BPBreedChoiceChoices, 0 );
516  BPBreedChoice->SetSelection( 0 );
517  BPBreedChoice->SetToolTip( l("Edit Batch Breed") );
518  BPGridSizer->Add( BPBreedChoice, 0, wxALL|wxEXPAND, 5 );
519 
520  wxArrayString BPGroupChoiceChoices;
521  BPGroupChoice = new wxChoice( BatchPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, BPGroupChoiceChoices, 0 );
522  BPGroupChoice->SetSelection( 0 );
523  BPGroupChoice->SetToolTip( l("Edit Group") );
524  BPGridSizer->Add( BPGroupChoice, 0, wxALL|wxEXPAND, 5 );
525 
526  BPProgressGauge = new wxGauge( BatchPanel, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL );
527  BPProgressGauge->SetValue( 0 );
528  BPProgressGauge->SetToolTip( l("Batch Progress") );
529  BPGridSizer->Add( BPProgressGauge, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
530 
531  wxArrayString BPIncubatorChoiceChoices;
532  BPIncubatorChoice = new wxChoice( BatchPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, BPIncubatorChoiceChoices, 0 );
533  BPIncubatorChoice->SetSelection( 0 );
534  BPIncubatorChoice->SetToolTip( l("Edit Incubator") );
535  BPGridSizer->Add( BPIncubatorChoice, 0, wxALL|wxEXPAND, 5 );
536 
537  wxBoxSizer* BPSizer5;
538  BPSizer5 = new wxBoxSizer( wxHORIZONTAL);
539 
540  BPEggSpin = new wxSpinCtrl( BatchPanel, ON_EGG, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 0, 10000, 1 );
541  BPEggSpin->SetToolTip(l("Enter Number Of Eggs In Batch") );
542  BPEggSpin->SetForegroundColour(wxColor(0,0,0,225));
543  BPSizer5->Add( BPEggSpin, 0, wxALL|wxEXPAND, 5 );
544 
545  BPEggStat = new wxStaticBitmap( BatchPanel, wxID_ANY, wxBitmap( HATCHKEEPER_DATA + "Images/egg.png", wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
546  BPSizer5->Add( BPEggStat, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
547 
548 
549  BPGridSizer->Add( BPSizer5, 0, wxALL|wxEXPAND, 0 );
550 
551  wxBoxSizer* BPSizer6;
552  BPSizer6 = new wxBoxSizer( wxHORIZONTAL);
553 
554  BPFertileSpin = new wxSpinCtrl( BatchPanel, ON_FERTILE, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 0, 10000, 2 );
555  BPFertileSpin->SetToolTip( l("Enter The Number Of Fertile Eggs") );
556  BPFertileSpin->SetForegroundColour(wxColor(0,0,0,225));
557  BPSizer6->Add( BPFertileSpin, 0, wxALL|wxEXPAND, 5 );
558 
559  BPFertileStat = new wxStaticBitmap( BatchPanel, wxID_ANY, wxBitmap( HATCHKEEPER_DATA + "Images/fertile.png", wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
560  BPSizer6->Add( BPFertileStat, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
561 
562 
563  BPGridSizer->Add( BPSizer6, 0, wxALL|wxEXPAND, 0 );
564 
565  wxBoxSizer* BPSizer7;
566  BPSizer7 = new wxBoxSizer( wxHORIZONTAL);
567 
568  BPChicksHatchSpin = new wxSpinCtrl( BatchPanel, ON_HATCHED, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 0, 10000, 0 );
569  BPChicksHatchSpin->SetToolTip( l("Edit Number Of Chick That Hatched") );
570  BPChicksHatchSpin->SetForegroundColour(wxColor(0,0,0,225));
571  BPSizer7->Add( BPChicksHatchSpin, 0, wxALL|wxEXPAND, 5 );
572 
573  BPChicksStat = new wxStaticBitmap( BatchPanel, wxID_ANY, wxBitmap( HATCHKEEPER_DATA + "Images/chick.png", wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
574  BPSizer7->Add( BPChicksStat, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
575 
576 
577  BPGridSizer->Add( BPSizer7, 0, wxALL|wxEXPAND, 0 );
578 
579  BPBoxSizer->Add( BPGridSizer, 0, wxEXPAND, 5 );
580 
581  BPStatLine1 = new wxStaticLine( BatchPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
582  BPBoxSizer->Add( BPStatLine1, 0, wxEXPAND | wxALL, 5 );
583 
584  wxGridSizer* BPStaticGridSizer;
585  BPStaticGridSizer = new wxGridSizer(3,2,0,0);
586 
587  BPFerUnStat = new wxStaticText( BatchPanel, wxID_ANY, l("Fertile Unhatched"), wxDefaultPosition, wxDefaultSize, 0 );
588  BPFerUnStat->Wrap( -1 );
589  BPStaticGridSizer->Add( BPFerUnStat, 0, wxALIGN_CENTER_VERTICAL, 5 );
590 
591  BPPerWerFerStat = new wxStaticText( BatchPanel, wxID_ANY, "% " + l("Were Fertile"), wxDefaultPosition, wxDefaultSize, 0 );
592  BPPerWerFerStat->Wrap( -1 );
593  BPStaticGridSizer->Add( BPPerWerFerStat, 0, wxALIGN_CENTER_VERTICAL, 5 );
594 
595  BPPerOfTotalStat = new wxStaticText( BatchPanel, wxID_ANY, "% " + l("Of Total Hatched"), wxDefaultPosition, wxDefaultSize, 0 );
596  BPPerOfTotalStat->Wrap( -1 );
597  BPStaticGridSizer->Add( BPPerOfTotalStat, 0, wxALIGN_CENTER_VERTICAL, 5 );
598 
599  BPPerOfFerStat = new wxStaticText( BatchPanel, wxID_ANY,"% " + l("Of Fertile Hatched"), wxDefaultPosition, wxDefaultSize, 0 );
600  BPPerOfFerStat->Wrap( -1 );
601  BPStaticGridSizer->Add( BPPerOfFerStat, 0, wxALIGN_CENTER_VERTICAL, 5 );
602 
603  BPPerUnhatchStat = new wxStaticText( BatchPanel, wxID_ANY, "% " + l("Of Total Unhatched"), wxDefaultPosition, wxDefaultSize, 0 );
604  BPPerUnhatchStat->Wrap( -1 );
605  BPStaticGridSizer->Add( BPPerUnhatchStat, 0, wxALIGN_CENTER_VERTICAL, 5 );
606 
607  BPBoxSizer->Add( BPStaticGridSizer, 1, wxEXPAND| wxALL, 5 );
608 
609  BPStatLine2 = new wxStaticLine( BatchPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
610  BPBoxSizer->Add( BPStatLine2, 0, wxEXPAND | wxALL, 5 );
611 
612  wxGridSizer* BPGridSizer1;
613  BPGridSizer1 = new wxGridSizer( 0, 2, 0, 0 );
614 
615  wxGridSizer* BPGridSizer2;
616  BPGridSizer2 = new wxGridSizer( 0, 2, 0, 0 );
617 
618  BPStartDateCtrl = new wxDatePickerCtrl( BatchPanel, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DROPDOWN );
619  BPStartDateCtrl->SetToolTip( l("Edit Start Date") );
620  BPGridSizer2->Add( BPStartDateCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
621 
622  BPStartStat = new wxStaticText( BatchPanel, wxID_ANY, l("Start Date"), wxDefaultPosition, wxDefaultSize, 0 );
623  BPStartStat->Wrap( -1 );
624  BPStartStat->SetForegroundColour(wxColor(152,0,255));
625  BPGridSizer2->Add( BPStartStat, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
626 
627  BPCandleDateCtrl = new wxDatePickerCtrl( BatchPanel, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DROPDOWN );
628  BPCandleDateCtrl->SetToolTip( l("Edit Candle Date") );
629  BPGridSizer2->Add( BPCandleDateCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
630 
631  BPCandleStat = new wxStaticText( BatchPanel, wxID_ANY, l("Candle Date"), wxDefaultPosition, wxDefaultSize, 0 );
632  BPCandleStat->Wrap( -1 );
633  BPCandleStat->SetForegroundColour(wxColor(0,0,255));
634  BPGridSizer2->Add( BPCandleStat, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
635 
636  BPLockDateCtrl = new wxDatePickerCtrl( BatchPanel, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DROPDOWN );
637  BPLockDateCtrl->SetToolTip( l("Edit Lockdown Date") );
638 
639  BPGridSizer2->Add( BPLockDateCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
640 
641  BPLockStat = new wxStaticText( BatchPanel, wxID_ANY, l("Lockdown Date"), wxDefaultPosition, wxDefaultSize, 0 );
642  BPLockStat->Wrap( -1 );
643  BPLockStat->SetForegroundColour(wxColor(0,128,0));
644  BPGridSizer2->Add( BPLockStat, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
645 
646  BPHatchDateCtrl = new wxDatePickerCtrl( BatchPanel, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DROPDOWN );
647  BPHatchDateCtrl->SetToolTip( l("Edit Hatch Date") );
648 
649  BPGridSizer2->Add( BPHatchDateCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
650 
651  BPHatchStat = new wxStaticText( BatchPanel, wxID_ANY, l("Hatch Date"), wxDefaultPosition, wxDefaultSize, 0 );
652  BPHatchStat->Wrap( -1 );
653  BPHatchStat->SetForegroundColour(wxColor(255,0,0));
654  BPGridSizer2->Add( BPHatchStat, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
655 
656  BPGridSizer1->Add( BPGridSizer2, 1, wxEXPAND, 5 );
657 
658  BPCommentCtrl = new wxTextCtrl( BatchPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE,textVal);
659  BPCommentCtrl->SetToolTip( l("Edit Comments For Selected Batch") );
660  BPGridSizer1->Add( BPCommentCtrl, 0, wxALL|wxEXPAND, 5 );
661 
662  BPBoxSizer->Add( BPGridSizer1, 1, wxEXPAND, 5 );
663 
664  BPStatLine3 = new wxStaticLine( BatchPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
665  BPBoxSizer->Add( BPStatLine3, 0, wxEXPAND | wxALL, 5 );
666 
667  wxGridSizer* BPGridSizer3;
668  BPGridSizer3 = new wxGridSizer( 0, 3, 0, 0 );
669 
670  BPUpdate = new wxButton( BatchPanel, ON_UPDATE, l("Update"), wxDefaultPosition, wxDefaultSize, 0 );
671  BPUpdate->SetToolTip( l("Save Changes To Database") );
672 
673  BPGridSizer3->Add( BPUpdate, 0, wxALL|wxEXPAND, 5 );
674 
675  wxString MoreActionsChoiceChoices[] = { l("More Actions"), l("Print Report"), l("Save Text Report"), l("Export Batch"), l("Export iCal"), l("Copy To Clipboard") };
676  int MoreActionsChoiceNChoices = sizeof( MoreActionsChoiceChoices ) / sizeof( wxString );
677  MoreActionsChoice = new wxChoice( BatchPanel, ON_MORE, wxDefaultPosition, wxDefaultSize, MoreActionsChoiceNChoices, MoreActionsChoiceChoices, 0 );
678  MoreActionsChoice->SetSelection( 0 );
679  MoreActionsChoice->SetToolTip( l("More Options For Batch") );
680  BPGridSizer3->Add( MoreActionsChoice, 0, wxALL|wxEXPAND, 5 );
681 
682  BPDelete = new wxButton( BatchPanel, ON_DELETE, l("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
683  BPDelete->SetToolTip( l("Completely Delete Batch From Database") );
684 
685  BPGridSizer3->Add( BPDelete, 0, wxALL|wxEXPAND, 5 );
686 
687  BPBoxSizer->Add( BPGridSizer3, 0, wxEXPAND, 5 );
688 
689  BatchPanel->SetSizer( BPBoxSizer );
690  BatchPanel->Layout();
691  BPBoxSizer->Fit( BatchPanel );
692  m_notebook2->AddPage( BatchPanel, l("Batch Statistics"), true );
693 
694 
695 
697  EggPanel = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
698  EggPanel->SetBackgroundColour( wxColor(ColorRed[5],ColorGreen[5],ColorBlue[5],225));
699  EggPanel->SetForegroundColour( wxColor(ColorRed[6],ColorGreen[6],ColorBlue[6],225));
700  wxBoxSizer* AdvBsizer1;
701  AdvBsizer1 = new wxBoxSizer( wxVERTICAL );
702 
703  wxGridSizer* AdvGsizer1;
704  AdvGsizer1 = new wxGridSizer( 0, 3, 0, 0 );
705 
706  AdvEggList = new wxListView( EggPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT );
707  AdvEggList->SetToolTip( l("Select An Egg To Edit It") );
708 
709  AdvGsizer1->Add( AdvEggList, 0, wxALL|wxEXPAND, 5 );
710 
711  wxBoxSizer* AdvBsizer2;
712  AdvBsizer2 = new wxBoxSizer( wxVERTICAL );
713 
714  wxString AdvTag1ChoiceChoices[] = { wxT("Tag 1") };
715  int AdvTag1ChoiceNChoices = sizeof( AdvTag1ChoiceChoices ) / sizeof( wxString );
716  AdvTag1Choice = new wxChoice( EggPanel, ADV_TAG_CH, wxDefaultPosition, wxDefaultSize, AdvTag1ChoiceNChoices, AdvTag1ChoiceChoices, 0 );
717  AdvTag1Choice->SetSelection( 0 );
718  AdvTag1Choice->SetToolTip( l("Edit Tag 1") );
719 
720  AdvBsizer2->Add( AdvTag1Choice, 0, wxALL|wxEXPAND, 5 );
721 
722  wxString AdvTag2ChoiceChoices[] = { wxT("Tag 2") };
723  int AdvTag2ChoiceNChoices = sizeof( AdvTag2ChoiceChoices ) / sizeof( wxString );
724  AdvTag2Choice = new wxChoice( EggPanel, ADV_TAG_CH, wxDefaultPosition, wxDefaultSize, AdvTag2ChoiceNChoices, AdvTag2ChoiceChoices, 0 );
725  AdvTag2Choice->SetSelection( 0 );
726  AdvTag2Choice->SetToolTip( l("Edit Tag 2") );
727 
728  AdvBsizer2->Add( AdvTag2Choice, 0, wxALL|wxEXPAND, 5 );
729 
730  wxString AdvTag3ChoiceChoices[] = { wxT("Tag 3") };
731  int AdvTag3ChoiceNChoices = sizeof( AdvTag3ChoiceChoices ) / sizeof( wxString );
732  AdvTag3Choice = new wxChoice( EggPanel, ADV_TAG_CH, wxDefaultPosition, wxDefaultSize, AdvTag3ChoiceNChoices, AdvTag3ChoiceChoices, 0 );
733  AdvTag3Choice->SetSelection( 0 );
734  AdvTag3Choice->SetToolTip( l("Edit Tag 3") );
735 
736  AdvBsizer2->Add( AdvTag3Choice, 0, wxALL|wxEXPAND, 5 );
737 
738  m_staticline3 = new wxStaticLine( EggPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
739  AdvBsizer2->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 );
740 
741  wxGridSizer* AdvGsizer2;
742  AdvGsizer2 = new wxGridSizer( 0, 2, 0, 0 );
743 
744  AdvFertileCheckbox = new wxCheckBox( EggPanel, ADV_FERTILE, l("Fertile"), wxDefaultPosition, wxDefaultSize, 0 );
745  AdvFertileCheckbox->SetToolTip( l("Edit Fertile Status") );
746 
747  AdvGsizer2->Add( AdvFertileCheckbox, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
748 
749  AdvPipCheckbox = new wxCheckBox( EggPanel, ADV_PIP, l("Pipped"), wxDefaultPosition, wxDefaultSize, 0 );
750  AdvPipCheckbox->SetToolTip( l("Edit Pipped Status") );
751 
752  AdvGsizer2->Add( AdvPipCheckbox, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
753 
754 
755  AdvBsizer2->Add( AdvGsizer2, 0, wxEXPAND, 5 );
756 
757  m_staticline4 = new wxStaticLine( EggPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
758  AdvBsizer2->Add( m_staticline4, 0, wxEXPAND | wxALL, 5 );
759 
760  wxString AdvResultChoiceChoices[] = { l("Result"), l("Hatched"), l("Quit") };
761  int AdvResultChoiceNChoices = sizeof( AdvResultChoiceChoices ) / sizeof( wxString );
762  AdvResultChoice = new wxChoice( EggPanel, ADV_RES_CH, wxDefaultPosition, wxDefaultSize, AdvResultChoiceNChoices, AdvResultChoiceChoices, 0 );
763  AdvResultChoice->SetSelection( 0 );
764  AdvResultChoice->SetToolTip( l("Set Result For Selected Egg") );
765 
766  AdvBsizer2->Add( AdvResultChoice, 0, wxALL|wxEXPAND, 5 );
767 
768  AdvResultDate = new wxDatePickerCtrl( EggPanel, ADV_RES_DATE, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_DROPDOWN );
769  AdvResultDate->SetToolTip( l("Set A Date For The Result") );
770 
771  AdvBsizer2->Add( AdvResultDate, 0, wxALL|wxEXPAND, 5 );
772 
773 
774  AdvGsizer1->Add( AdvBsizer2, 1, wxEXPAND, 5 );
775 
776  AdvCommentCtrl = new wxTextCtrl( EggPanel, ADV_EGG_COM, l("Egg Comments:"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
777  AdvCommentCtrl->SetToolTip( l("Add Comments For Selected Egg") );
778 
779  AdvGsizer1->Add( AdvCommentCtrl, 0, wxALL|wxEXPAND, 5 );
780 
781 
782  AdvBsizer1->Add( AdvGsizer1, 0, wxEXPAND, 5 );
783 
784  AdvStatLine1 = new wxStaticLine( EggPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
785  AdvBsizer1->Add( AdvStatLine1, 0, wxEXPAND | wxALL, 5 );
786 
787  wxGridSizer* AdvGsizer3;
788  AdvGsizer3 = new wxGridSizer( 0, 3, 0, 0 );
789 
790  AdvWeightList = new wxListView( EggPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT );
791  AdvWeightList->SetToolTip( l("Select A Day To Edit Weight And Comments") );
792 
793  AdvGsizer3->Add( AdvWeightList, 0, wxALL|wxEXPAND, 5 );
794 
795  wxGridSizer* AdvGsizer4;
796  AdvGsizer4 = new wxGridSizer( 0, 1, 0, 0 );
797 
798  AdvWeightCtrl = new wxSpinCtrlDouble( EggPanel, ADV_WEIGHT, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10000, 0, 0.001 );
799  AdvWeightCtrl->SetDigits( 3 );
800  AdvWeightCtrl->SetToolTip( l("Select A Day Then Edit Weight With This Control") );
801 
802  AdvGsizer4->Add( AdvWeightCtrl, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
803 
804  AdvTotalLossStat = new wxStaticText( EggPanel, wxID_ANY, "0% " + l("Total Weight Loss"), wxDefaultPosition, wxDefaultSize, 0 );
805  AdvTotalLossStat->Wrap( -1 );
806  AdvGsizer4->Add( AdvTotalLossStat, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
807 
808  AdvDayLossStat = new wxStaticText( EggPanel, wxID_ANY, "0% " + l("Loss On Day"), wxDefaultPosition, wxDefaultSize, 0 );
809  AdvDayLossStat->Wrap( 150 );
810  AdvGsizer4->Add( AdvDayLossStat, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
811 
812  AdvAvgBatchLossStat = new wxStaticText( EggPanel, wxID_ANY, "0% " + l("Avg Weight Loss For All Eggs In Batch"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL );
813  AdvAvgBatchLossStat->Wrap( 150 );
814  AdvGsizer4->Add( AdvAvgBatchLossStat, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
815 
816 
817  AdvGsizer3->Add( AdvGsizer4, 1, wxEXPAND, 5 );
818 
819  AdvDayCommentCtrl = new wxTextCtrl( EggPanel, ADV_DAY_COM, l("Day Comments"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
820  AdvDayCommentCtrl->SetToolTip( l("Edit Comments For This Day") );
821 
822  AdvGsizer3->Add( AdvDayCommentCtrl, 0, wxALL|wxEXPAND, 5 );
823 
824 
825  AdvBsizer1->Add( AdvGsizer3, 1, wxEXPAND, 5 );
826 
827  AdvStatLine2 = new wxStaticLine( EggPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
828  AdvBsizer1->Add( AdvStatLine2, 0, wxEXPAND | wxALL, 5 );
829 
830  wxGridSizer* AdvGsizer5;
831  AdvGsizer5 = new wxGridSizer( 0, 3, 0, 0 );
832 
833  AdvUpdate = new wxButton( EggPanel, ON_UPDATE, l("Update"), wxDefaultPosition, wxDefaultSize, 0 );
834  AdvUpdate->SetToolTip( l("Save Changes To Database") );
835 
836  AdvGsizer5->Add( AdvUpdate, 0, wxALL|wxEXPAND, 5 );
837 
838  AdvMoreChoice = new wxChoice( EggPanel, ON_MORE, wxDefaultPosition, wxDefaultSize, MoreActionsChoiceNChoices, MoreActionsChoiceChoices, 0 );
839  AdvMoreChoice->SetSelection( 0 );
840  AdvMoreChoice->SetToolTip( l("More Options For Batch") );
841 
842  AdvGsizer5->Add( AdvMoreChoice, 0, wxALL|wxEXPAND, 5 );
843 
844  AdvDelete = new wxButton( EggPanel, ON_DELETE, l("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
845  AdvDelete->SetToolTip( l("Completely Delete Batch From Database") );
846 
847  AdvGsizer5->Add( AdvDelete, 0, wxALL|wxEXPAND, 5 );
848 
849 
850  AdvBsizer1->Add( AdvGsizer5, 0, wxEXPAND, 5 );
851 
852 
853  EggPanel->SetSizer( AdvBsizer1 );
854  EggPanel->Layout();
855  AdvBsizer1->Fit( EggPanel );
856  m_notebook2->AddPage( EggPanel, l("Advanced"), true );
857 
858 
859  GroupPanel = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
860  GroupPanel->SetBackgroundColour( wxColor(ColorRed[5],ColorGreen[5],ColorBlue[5],225));
861  GroupPanel->SetForegroundColour( wxColor(ColorRed[6],ColorGreen[6],ColorBlue[6],225));
862  wxBoxSizer* GrBSizer1;
863  GrBSizer1 = new wxBoxSizer( wxVERTICAL );
864 
865  wxGridSizer* GrGSizer1;
866  GrGSizer1 = new wxGridSizer( 0, 2, 0, 0 );
867 
868  GroupList = new wxListView( GroupPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL );
869  GrGSizer1->Add( GroupList, 0, wxALL|wxEXPAND, 5 );
870 
871  wxBoxSizer* GRBSizer2;
872  GRBSizer2 = new wxBoxSizer( wxVERTICAL );
873 
874  GrCommentCtrl = new wxTextCtrl( GroupPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
875  GRBSizer2->Add( GrCommentCtrl, 1, wxALL|wxEXPAND, 5 );
876 
877  GrUpateButton = new wxButton( GroupPanel, GR_COMMENT, l("Update Comments"), wxDefaultPosition, wxDefaultSize, 0 );
878  GRBSizer2->Add( GrUpateButton, 0, wxALL|wxEXPAND, 5 );
879 
880 
881  GrGSizer1->Add( GRBSizer2, 1, wxEXPAND, 5 );
882 
883 
884 
885  GrBatchList = new wxListView( GroupPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT );
886  GrGSizer1->Add( GrBatchList, 0, wxALL|wxEXPAND, 5 );
887 
888  wxBoxSizer* GrBSizer2;
889  GrBSizer2 = new wxBoxSizer( wxVERTICAL );
890 
891  wxGridSizer* GrGSizer;
892  GrGSizer = new wxGridSizer( 0, 4, 0, 0 );
893 
894  GrEggBitmap = new wxStaticBitmap( GroupPanel, wxID_ANY, wxBitmap( HATCHKEEPER_DATA + "Images/egg.png", wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
895  GrGSizer->Add( GrEggBitmap, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
896 
897  GrTEggCtrl = new wxTextCtrl( GroupPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 50,-1 ), wxTE_READONLY );
898  GrGSizer->Add( GrTEggCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
899 
900  GrChickBitmap = new wxStaticBitmap( GroupPanel, wxID_ANY, wxBitmap( HATCHKEEPER_DATA + "Images/chick.png", wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
901  GrGSizer->Add( GrChickBitmap, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
902 
903  GrTChickCtrl = new wxTextCtrl( GroupPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 50,-1 ), wxTE_READONLY );
904  GrGSizer->Add( GrTChickCtrl, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
905 
906 
907  GrBSizer2->Add( GrGSizer, 0, wxEXPAND, 5 );
908 
909  GrAWFerStat = new wxStaticText( GroupPanel, wxID_ANY, l("Avg % Fertile"), wxDefaultPosition, wxDefaultSize, 0 );
910  GrAWFerStat->Wrap( 275 );
911  GrBSizer2->Add( GrAWFerStat, 1, wxALIGN_LEFT, 5 );
912 
913  GrAOFHatchStat = new wxStaticText( GroupPanel, wxID_ANY, l("Avg % Of Fertile Hatched"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
914  GrAOFHatchStat->Wrap( 275 );
915  GrBSizer2->Add( GrAOFHatchStat, 1, wxALIGN_LEFT, 5 );
916 
917  GrAOTHatchStat = new wxStaticText( GroupPanel, wxID_ANY, l("Avg % of Total Hatched"), wxDefaultPosition, wxDefaultSize, 0 );
918  GrAOTHatchStat->Wrap( 275 );
919  GrBSizer2->Add( GrAOTHatchStat, 1, wxALIGN_LEFT, 5 );
920 
921  GrAOTUnHatchStat = new wxStaticText( GroupPanel, wxID_ANY, l("Avg % of Total Unhatched"), wxDefaultPosition, wxDefaultSize, 0 );
922  GrAOTUnHatchStat->Wrap( 275 );
923  GrBSizer2->Add( GrAOTUnHatchStat, 1, wxALIGN_LEFT, 5 );
924 
925 
926 
927  GrGSizer1->Add( GrBSizer2, 1, wxEXPAND, 5 );
928 
929 
930  GrBSizer1->Add( GrGSizer1, 1, wxEXPAND, 5 );
931 
932 
933  wxGridSizer* GRBSizer4;
934  GRBSizer4 = new wxGridSizer( 0, 3, 0, 0 );
935 
936  GrAddButton = new wxButton( GroupPanel, GR_ADD, l("Add Group"), wxDefaultPosition, wxDefaultSize, 0 );
937  GRBSizer4->Add( GrAddButton, 0, wxALL|wxEXPAND, 5 );
938 
939  wxString GrMoreChoiceChoices[] = { l("More Actions"), l("Save Text Group Report"), l("Print Group Report"), l("Export Group"), l("Export Group iCal") };
940  int GrMoreChoiceNChoices = sizeof( GrMoreChoiceChoices ) / sizeof( wxString );
941  GrMoreChoice = new wxChoice( GroupPanel, GR_MORE, wxDefaultPosition, wxDefaultSize,GrMoreChoiceNChoices, GrMoreChoiceChoices, 0 );
942  GrMoreChoice->SetSelection( 0 );
943  GRBSizer4->Add( GrMoreChoice, 0, wxALL|wxEXPAND, 5 );
944 
945  GrDeleteButton = new wxButton( GroupPanel, GR_DELETE, l("Delete Group"), wxDefaultPosition, wxDefaultSize, 0 );
946  GRBSizer4->Add( GrDeleteButton, 0, wxALL|wxEXPAND, 5 );
947 
948 
949  GrBSizer1->Add( GRBSizer4, 0, wxEXPAND, 5 );
950 
951 
952  GroupPanel->SetSizer( GrBSizer1 );
953  GroupPanel->Layout();
954  GrBSizer1->Fit( GroupPanel );
955 
956  m_notebook2->AddPage( GroupPanel, l("Groups"), false );
957  NotePanel = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
958  NotePanel->SetBackgroundColour( wxColor(ColorRed[5],ColorGreen[5],ColorBlue[5],225));
959  NotePanel->SetForegroundColour( wxColor(ColorRed[6],ColorGreen[6],ColorBlue[6],225));
960  wxBoxSizer* bSizer3;
961  bSizer3 = new wxBoxSizer( wxVERTICAL );
962 
963  NoteList = new wxListView( NotePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT );
964  bSizer3->Add( NoteList, 1, wxALL|wxEXPAND, 5 );
965  NoteList->SetBackgroundColour(wxColor(ColorRed[9],ColorGreen[9],ColorBlue[9],225) );
966  NoteList->SetForegroundColour(wxColor(ColorRed[10],ColorGreen[10],ColorBlue[10],225));
967 
968  ClearDayStat = new wxStaticText( NotePanel, wxID_ANY, l("Notifications Automatically Clear After 3 Days."), wxDefaultPosition, wxDefaultSize, 0 );
969  ClearDayStat->Wrap( -1 );
970  bSizer3->Add( ClearDayStat, 0, wxALL|wxEXPAND, 5 );
971 
972  NotePanel->SetSizer( bSizer3 );
973  NotePanel->Layout();
974  bSizer3->Fit( NotePanel );
975  m_notebook2->AddPage( NotePanel, l("Notifications"), false );
976 
977  gSizer1->Add( m_notebook2, 1, wxEXPAND | wxALL, 5 );
978 
979  bSizer2->Add( gSizer1, 1, wxEXPAND, 5 );
980 
981  this->SetSizer( bSizer2 );
982  this->Layout();
983 
984  this->Centre( wxBOTH );
985 
986  MainList->Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, &HatchFrame::OnListSelect, this);
987  MainList->Bind(wxEVT_COMMAND_LIST_ITEM_DESELECTED, &HatchFrame::OnListDESelect, this );
988  MainList->Bind(wxEVT_LIST_COL_CLICK, &HatchFrame::OnColumnClick, this );
989 
990  GroupList->Bind( wxEVT_COMMAND_LIST_ITEM_SELECTED, &HatchFrame::OnGroupSelect, this );
991  GroupList->Bind( wxEVT_COMMAND_LIST_ITEM_DESELECTED, &HatchFrame::OnGroupUnSelect, this );
992 
993  AdvEggList->Bind( wxEVT_COMMAND_LIST_ITEM_SELECTED, &HatchFrame::OnSelectEgg, this );
994  AdvEggList->Bind( wxEVT_COMMAND_LIST_ITEM_DESELECTED, &HatchFrame::OnUnSelectEgg, this );
995 
996  AdvWeightList->Bind( wxEVT_COMMAND_LIST_ITEM_SELECTED, &HatchFrame::OnAdvDaySelect, this );
997  AdvWeightList->Bind( wxEVT_COMMAND_LIST_ITEM_DESELECTED, &HatchFrame::OnAdvDayUnSelect, this );
998 
999  //Statistics Panel Events
1000  BPNameCtrl->Bind(wxEVT_TEXT, &HatchFrame::OnBatchName, this );
1001  BPTypeChoice->Bind(wxEVT_CHOICE, &HatchFrame::OnBatchType, this );
1002  BPBreedChoice->Bind(wxEVT_CHOICE, &HatchFrame::OnBatchBreed, this );
1003  BPGroupChoice->Bind(wxEVT_CHOICE, &HatchFrame::OnBatchGroup, this );
1004  BPIncubatorChoice->Bind(wxEVT_CHOICE, &HatchFrame::OnBatchIncubator, this );
1005  BPCommentCtrl->Bind(wxEVT_TEXT, &HatchFrame::OnBatchComments, this );
1006  BPStartDateCtrl->Bind(wxEVT_DATE_CHANGED, &HatchFrame::OnBatchDates, this );
1007  BPCandleDateCtrl->Bind(wxEVT_DATE_CHANGED, &HatchFrame::OnBatchDates, this );
1008  BPLockDateCtrl->Bind(wxEVT_DATE_CHANGED, &HatchFrame::OnBatchDates, this );
1009  BPHatchDateCtrl->Bind(wxEVT_DATE_CHANGED, &HatchFrame::OnBatchDates, this );
1010 
1011  //Set Icon Up
1012  SetIcon(hatch_xpm);
1013 
1014  //Set up sort options
1015  SortBatchChoice->Append(l("Default"));
1016  SortBatchChoice->Append(l("Hatch Date"));
1017  SortBatchChoice->Append(l("Start Date"));
1018  SortBatchChoice->Append(l("Type"));
1019  SortBatchChoice->Append(l("Breed"));
1020  SortBatchChoice->SetSelection(Settings.GetInt("BatchSortState"));
1021 
1022 
1024  Types = Database.ReadTypes();
1027  Batches = Database.ReadBatches(Settings.GetInt("BatchSortState"));
1028  ShowBatches(false);
1029 
1030  m_notebook2->SetSelection(0);
1031 
1032  ShowGroups(true);
1033 
1034  //ScanNotifications();
1037 
1038  //set up taskbar icon
1040 
1041  if ( !m_taskBarIcon->SetIcon(TaskBar_xpm, "HatchKeeper.") ) {
1042  cout<<"Log: Could Not Set Taskbar Icon."<<endl;
1043  }
1044 }
1045 
1046 #endif
HK_Language Language
Definition: Declare.h:49
HK_KeyValue Settings
Definition: Declare.h:36
HK_Info Info
Definition: Declare.h:34
HK_Notifications Notify
Definition: Declare.h:42
HK_Batches Batches
Definition: Declare.h:44
HK_Storage Types
Definition: Declare.h:38
HK_Storage Remind
Definition: Declare.h:40
std::string HATCHKEEPER_DATA
Definition: Declare.h:30
HK_Storage Breeds
Definition: Declare.h:37
HK_Database Database(HATCHKEEPER_DATA+"HatchKeeper.db")
std::string l(std::string Text)
A Helper Function For HK_Language.
Definition: Declare.h:52
HK_Storage Schedules
Definition: Declare.h:39
const int TIMER1
Definition: HatchKeeper.h:61
const int GR_ADD
Definition: HatchKeeper.h:86
const int ON_ABOUT
Definition: HatchKeeper.h:69
const int ON_IMPORT
Definition: HatchKeeper.h:70
const int HIDE_HATCH
Definition: HatchKeeper.h:79
const int ON_FERTILE
Definition: HatchKeeper.h:82
const int CALANDAR
Definition: HatchKeeper.h:53
const int ADV_FERTILE
Definition: HatchKeeper.h:94
const int GR_DELETE
Definition: HatchKeeper.h:87
const int ADV_TAG_CH
Definition: HatchKeeper.h:100
const int ON_PREF
Definition: HatchKeeper.h:66
const int ON_CALPRN
Definition: HatchKeeper.h:76
int HatchCondition
Definition: HatchKeeper.cpp:29
const int ON_HATCHED
Definition: HatchKeeper.h:83
const int MAIN_LIST
Definition: HatchKeeper.h:56
const int ON_REFR
Definition: HatchKeeper.h:67
const int CAL_CHANGE
Definition: HatchKeeper.h:78
const int TIMER2
Definition: HatchKeeper.h:62
const int ON_SEARCH
Definition: HatchKeeper.h:60
const int ADV_SAVE_CH
Definition: HatchKeeper.h:97
const int ON_UPDATE
Definition: HatchKeeper.h:73
const int ON_SORT
Definition: HatchKeeper.h:57
const int ADV_EGG_COM
Definition: HatchKeeper.h:92
const int ADV_ENABLE
Definition: HatchKeeper.h:91
const int ADV_RES_CH
Definition: HatchKeeper.h:98
const int ON_GRAPH
Definition: HatchKeeper.h:58
const int ADV_RES_DATE
Definition: HatchKeeper.h:99
const int ADV_DAY_COM
Definition: HatchKeeper.h:96
const int TEXT_LOG
Definition: HatchKeeper.h:54
const int ON_DELETE
Definition: HatchKeeper.h:74
const int ON_BATCH
Definition: HatchKeeper.h:64
const int ADV_PIP
Definition: HatchKeeper.h:93
const int GR_MORE
Definition: HatchKeeper.h:88
const int ON_EGG
Definition: HatchKeeper.h:81
const int ON_MORE
Definition: HatchKeeper.h:75
const int ADV_WEIGHT
Definition: HatchKeeper.h:95
const int ON_SCH
Definition: HatchKeeper.h:65
const int TOOLBAR
Definition: HatchKeeper.h:55
const int GR_COMMENT
Definition: HatchKeeper.h:89
const int ON_REMIND
Definition: HatchKeeper.h:68
const int ON_CLOSE
Definition: HatchKeeper.h:59
const int ON_QUIT
Definition: HatchKeeper.h:71
Holds Classes Related Single Instance Features.
Holds stuff related to displaying a taskbar icon.
HK_Notifications ReadNotify()
Scans Notifications Into A HK_Storage Object.
HK_KeyValue ReadSettings()
Reads Settings Table Into HK_KeyValue Object.
HK_Storage ReadSchedules()
Reads Schedules Table Into HK_Storage Object.
HK_Storage ReadRemind()
Reads Reminders Table Into HK_Storage Object.
HK_Storage ReadTypes()
Reads Types Table Into HK_Storage Object.
bool CreateDB()
Populates Database With Defaults.
Definition: HK_Database.cpp:41
HK_Batches ReadBatches(int Sort)
Scans Batches Into HK_Batches Object.
HK_Storage ReadBreeds()
Scans Breeds Into A HK_Storage Object.
A Class For Storing And Retieving Data For One Egg.
Definition: Egg.h:24
std::string GetValidChars()
Returns Chars That Are Allowed In Text Controls.
Definition: HK_Info.cpp:12
vector< int > GetIntArray(int Selection)
Returns The Selected Value As An Array Of Integers.
int GetInt(int Selection)
Returns The Selected Setting Value As An Integer.
Definition: HK_KeyValue.cpp:49
string GetValue(int Selection)
Returns The Selected Setting Value As A String.
Definition: HK_KeyValue.cpp:67
void SetPath(std::string Path)
Sets/Loads Path Opens the xml language file and reads it into two arrays.
Definition: HK_Language.cpp:25
DECLARE_EVENT_TABLE()
The Main Window.
Definition: HatchKeeper.h:116
wxChoice * BPGroupChoice
Definition: HatchKeeper.h:233
void ClearBatchGraph()
wxChoice * AdvMoreChoice
Definition: HatchKeeper.h:318
wxStaticText * AdvTotalLossStat
Definition: HatchKeeper.h:312
wxChoice * SortBatchChoice
Definition: HatchKeeper.h:270
wxCheckBox * AdvPipCheckbox
Definition: HatchKeeper.h:304
wxButton * printCalButton
Definition: HatchKeeper.h:271
wxListView * MainList
Definition: HatchKeeper.h:268
wxCheckBox * AdvFertileCheckbox
Definition: HatchKeeper.h:303
wxPanel * NotePanel
Definition: HatchKeeper.h:263
wxStaticText * BPStartStat
Definition: HatchKeeper.h:251
void OnUnSelectEgg(wxListEvent &)
Resets Ctrls With Default Values.
wxGenericCalendarCtrl * MainCalendar
Definition: HatchKeeper.h:227
wxStaticText * BPPerWerFerStat
Definition: HatchKeeper.h:245
wxStaticText * BPPerOfFerStat
Definition: HatchKeeper.h:247
wxStaticText * GrAOFHatchStat
Definition: HatchKeeper.h:288
void ShowGroups(bool Scan)
Populates GroupList.
void ScanAdvanced(int sel)
wxStaticText * BPCandleStat
Definition: HatchKeeper.h:253
wxSpinCtrlDouble * AdvWeightCtrl
Definition: HatchKeeper.h:311
void OnBatchName(wxCommandEvent &)
Fired When BPNameCtrl Is Edited. Updates Batches With New Name.
wxTextCtrl * AdvCommentCtrl
Definition: HatchKeeper.h:308
void OnBatchGroup(wxCommandEvent &)
Fired When BPGroupChoice Is Changed. Updates Batches With New Group Name.
void ShowBatches(bool Scan)
Populates MainList With Data From Batches.
wxStaticText * AdvDayLossStat
Definition: HatchKeeper.h:313
wxStaticBitmap * BPEggStat
Definition: HatchKeeper.h:237
wxStaticText * BPFerUnStat
Definition: HatchKeeper.h:244
wxStaticBitmap * GrChickBitmap
Definition: HatchKeeper.h:285
wxPanel * GroupPanel
Definition: HatchKeeper.h:278
wxListView * AdvEggList
Definition: HatchKeeper.h:298
wxStaticText * SortBatchStat
Definition: HatchKeeper.h:269
wxChoice * BPTypeChoice
Definition: HatchKeeper.h:231
wxSpinCtrl * BPEggSpin
Definition: HatchKeeper.h:236
wxStaticText * BPHatchStat
Definition: HatchKeeper.h:257
wxDatePickerCtrl * AdvResultDate
Definition: HatchKeeper.h:307
wxChoice * AdvResultChoice
Definition: HatchKeeper.h:306
wxChoice * AdvTag1Choice
Definition: HatchKeeper.h:299
wxChoice * BPBreedChoice
Definition: HatchKeeper.h:232
wxListView * GroupList
Definition: HatchKeeper.h:279
wxChoice * GrMoreChoice
Definition: HatchKeeper.h:292
wxStaticBitmap * BPFertileStat
Definition: HatchKeeper.h:239
wxButton * GrDeleteButton
Definition: HatchKeeper.h:293
wxButton * GrUpateButton
Definition: HatchKeeper.h:281
void OnAdvDayUnSelect(wxListEvent &)
Called When Day Is Unselected.
wxStaticLine * BPStatLine1
Definition: HatchKeeper.h:243
void OnGroupUnSelect(wxListEvent &)
Fired When A GroupList Item Gets Unselected.
wxStaticText * GrAOTHatchStat
Definition: HatchKeeper.h:289
wxStaticLine * BPStatLine3
Definition: HatchKeeper.h:259
wxChoice * BPIncubatorChoice
Definition: HatchKeeper.h:235
wxPanel * EggPanel
Definition: HatchKeeper.h:297
wxDatePickerCtrl * BPStartDateCtrl
Definition: HatchKeeper.h:250
wxStaticLine * AdvStatLine1
Definition: HatchKeeper.h:309
wxChartPanel * BatchGraphPanel
Definition: HatchKeeper.h:274
wxStaticText * BPLockStat
Definition: HatchKeeper.h:255
wxToolBar * TheToolBar
Definition: HatchKeeper.h:226
wxDatePickerCtrl * BPCandleDateCtrl
Definition: HatchKeeper.h:252
wxStaticText * BPPerOfTotalStat
Definition: HatchKeeper.h:246
void OnBatchComments(wxCommandEvent &)
Fired When Batch Comments Are Edited.
wxSpinCtrl * BPChicksHatchSpin
Definition: HatchKeeper.h:240
wxSpinCtrl * BPFertileSpin
Definition: HatchKeeper.h:238
void OnSelectEgg(wxListEvent &)
Fired When An Egg Is Selected.
wxChoice * MoreActionsChoice
Definition: HatchKeeper.h:261
wxStaticText * GrAWFerStat
Definition: HatchKeeper.h:287
void ShowMsg(string Msg)
Uses wxMessageDialog To Display Message.
wxStaticBitmap * GrEggBitmap
Definition: HatchKeeper.h:283
wxListView * NoteList
Definition: HatchKeeper.h:264
void OnAdvDaySelect(wxListEvent &)
Called When User Selects A Day.
void OnSaveAdvChanges(wxCommandEvent &)
void OnEnableAdv(wxCommandEvent &)
wxChoice * AdvTag2Choice
Definition: HatchKeeper.h:300
wxTextCtrl * GrCommentCtrl
Definition: HatchKeeper.h:280
wxNotebook * m_notebook2
Definition: HatchKeeper.h:228
wxTextCtrl * AdvDayCommentCtrl
Definition: HatchKeeper.h:315
wxStaticText * GrAOTUnHatchStat
Definition: HatchKeeper.h:290
wxButton * AdvUpdate
Definition: HatchKeeper.h:317
wxStaticLine * m_staticline4
Definition: HatchKeeper.h:305
wxCheckBox * HideCheckBox
Definition: HatchKeeper.h:272
wxStaticLine * AdvStatLine2
Definition: HatchKeeper.h:316
wxStaticText * AdvAvgBatchLossStat
Definition: HatchKeeper.h:314
wxStaticLine * m_staticline3
Definition: HatchKeeper.h:302
void OnGroupSelect(wxListEvent &)
Fires When A GroupList Item Get Selected.
wxTextCtrl * GrTEggCtrl
Definition: HatchKeeper.h:284
void OnColumnClick(wxListEvent &evt)
Switches Groups Column.
wxButton * ClearNoteButton
Definition: HatchKeeper.h:265
void OnBatchBreed(wxCommandEvent &)
Fired When BPBreedChoice Is Changed. Updates Batches With New Breed.
wxGauge * BPProgressGauge
Definition: HatchKeeper.h:234
wxTextCtrl * BPCommentCtrl
Definition: HatchKeeper.h:258
void OnBatchType(wxCommandEvent &)
Fired When BPTypeChoice Is Changed. Updates Batches With New Type And Sets Breed To Unknown.
wxTextCtrl * GrTChickCtrl
Definition: HatchKeeper.h:286
HatchFrame()
The Main Window Constructor.
Definition: HatchKeeper.h:340
wxStaticText * ClearDayStat
Definition: HatchKeeper.h:267
wxStaticBitmap * BPChicksStat
Definition: HatchKeeper.h:241
wxButton * BPDelete
Definition: HatchKeeper.h:262
HatchTaskBarIcon * m_taskBarIcon
Definition: HatchKeeper.h:321
void OnListSelect(wxListEvent &)
Fired When A MainList Item Gets Selected.
void OnBatchDates(wxDateEvent &)
Fired When Any Of The Batch Dates Are Changed.
wxButton * GrAddButton
Definition: HatchKeeper.h:291
void OnBatchIncubator(wxCommandEvent &)
Fired When BPIncubatorChoice Is Changed. Updates Batches With New Incubator.
wxDatePickerCtrl * BPLockDateCtrl
Definition: HatchKeeper.h:254
wxStaticLine * BPStatLine2
Definition: HatchKeeper.h:249
wxStaticText * BPPerUnhatchStat
Definition: HatchKeeper.h:248
wxTextCtrl * BPNameCtrl
Definition: HatchKeeper.h:230
wxDatePickerCtrl * BPHatchDateCtrl
Definition: HatchKeeper.h:256
void OnListDESelect(wxListEvent &evt)
Fired When A MainList Item Gets Unselected.
wxListView * GrBatchList
Definition: HatchKeeper.h:282
wxPanel * BatchPanel
Definition: HatchKeeper.h:229
wxListView * AdvWeightList
Definition: HatchKeeper.h:310
void ShowNotifications()
Shows Popup Notifications To User And Adds Them To NoteList.
wxChoice * AdvTag3Choice
Definition: HatchKeeper.h:301
wxSpinCtrl * ClearDaySpin
Definition: HatchKeeper.h:266
string ReadableDate(wxDateTime date)
wxButton * AdvDelete
Definition: HatchKeeper.h:319
wxButton * BPUpdate
Definition: HatchKeeper.h:260
A Taskbar Icon That Is Visable When HatchKeeper Is Running.
Definition: TaskbarIcon.cpp:22