-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTimeAlarm.cpp
47 lines (36 loc) · 1.11 KB
/
TimeAlarm.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/////////////////////////////////////////////////////////////////////////////
// Name: TimeAlarm.cpp
// Purpose: wxIndustrialControls Library
// Author: Marco Cavallini <m.cavallini AT koansoftware.com>
// Modified by:
// Copyright: (C)2004-2006 Copyright by Koan s.a.s. - www.koansoftware.com
// Licence: KWIC License http://www.koansoftware.com/kwic/kwic-license.htm
/////////////////////////////////////////////////////////////////////////////
//#include "kprec.h" //#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include <wx/datetime.h>
#include "TimeAlarm.h"
CTimeAlarm::CTimeAlarm()
{
m_dJAlarmTime = 0 ;
m_bEnable = false ;
}
void CTimeAlarm::SetAlarmTime(wxDateTime alarmtime)
{
m_dJAlarmTime = alarmtime.GetJDN();
}
void CTimeAlarm::SetAlarmTime(double alarmtime)
{
m_dJAlarmTime = alarmtime ;
}
//return DD-MM-YY HH:MM::SS dell'allarme corrente
wxString CTimeAlarm::GetAlarmString()
{
wxString sDate ;
wxDateTime jdate ;
jdate.Set(m_dJAlarmTime) ;
sDate = jdate.Format(wxT("%d-%m-%Y %H:%M:%S")) ;
return sDate ;
}