forked from gopa810/gcal-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDlgSetAyanamsaType.cpp
81 lines (62 loc) · 2.29 KB
/
DlgSetAyanamsaType.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// DlgSetAyanamsaType.cpp : implementation file
//
#include "stdafx.h"
#include "vcal5beta.h"
#include "DlgSetAyanamsaType.h"
#include "GCAyanamsha.h"
#include "GCSankranti.h"
#include "GCDisplaySettings.h"
/////////////////////////////////////////////////////////////////////////////
// DlgSetAyanamsaType dialog
DlgSetAyanamsaType::DlgSetAyanamsaType(CWnd* pParent /*=NULL*/)
: CDialog(DlgSetAyanamsaType::IDD, pParent)
{
//{{AFX_DATA_INIT(DlgSetAyanamsaType)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void DlgSetAyanamsaType::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(DlgSetAyanamsaType)
DDX_Control(pDX, IDC_LIST2, m_san);
DDX_Control(pDX, IDC_LIST1, m_list);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(DlgSetAyanamsaType, CDialog)
//{{AFX_MSG_MAP(DlgSetAyanamsaType)
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDC_CHECK2, &DlgSetAyanamsaType::OnBnClickedCheck2)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// DlgSetAyanamsaType message handlers
BOOL DlgSetAyanamsaType::OnInitDialog()
{
CDialog::OnInitDialog();
m_list.AddString(GCAyanamsha::GetAyanamsaName(0));
m_list.AddString(GCAyanamsha::GetAyanamsaName(1));
m_list.AddString(GCAyanamsha::GetAyanamsaName(2));
m_list.AddString(GCAyanamsha::GetAyanamsaName(3));
m_list.SetCurSel(GCAyanamsha::GetAyanamsaType());
m_san.AddString(GCSankranti::GetSankMethodName(0));
m_san.AddString(GCSankranti::GetSankMethodName(1));
m_san.AddString(GCSankranti::GetSankMethodName(2));
m_san.AddString(GCSankranti::GetSankMethodName(3));
m_san.SetCurSel(GCSankranti::GetSankrantiType());
CheckDlgButton(IDC_CHECK1, GCDisplaySettings::getValue(44));
CheckDlgButton(IDC_CHECK2, GCDisplaySettings::getValue(71));
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void DlgSetAyanamsaType::OnOK()
{
GCAyanamsha::SetAyanamsaType(m_list.GetCurSel());
GCSankranti::SetSankrantiType(m_san.GetCurSel());
GCDisplaySettings::setValue(44, IsDlgButtonChecked(IDC_CHECK1));
GCDisplaySettings::setValue(71, IsDlgButtonChecked(IDC_CHECK2));
CDialog::OnOK();
}
void DlgSetAyanamsaType::OnBnClickedCheck2()
{
// TODO: Add your control notification handler code here
}