forked from ImpulseAdventure/JPEGsnoop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TermsDlg.cpp
95 lines (78 loc) · 3.08 KB
/
TermsDlg.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// JPEGsnoop - JPEG Image Decoder & Analysis Utility
// Copyright (C) 2017 - Calvin Hass
// http://www.impulseadventure.com/photo/jpeg-snoop.html
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// This program 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// TermsDlg.cpp : implementation file
//
#include "stdafx.h"
#include "JPEGsnoop.h"
#include "TermsDlg.h"
#include ".\termsdlg.h"
// CTermsDlg dialog
IMPLEMENT_DYNAMIC(CTermsDlg, CDialog)
CTermsDlg::CTermsDlg(CWnd* pParent /*=NULL*/)
: CDialog(CTermsDlg::IDD, pParent)
, strEula(_T(""))
, bEulaOk(FALSE)
, bUpdateAuto(FALSE)
{
bEulaOk = false;
bUpdateAuto = true;
// Present the user with the GPLv2 license
// - This is done primarily to inform the user of their rights and
// freedoms while reminding them that there are no warranties or
// guarantees supplied with the free software per GPLv2.
strEula = _T("");
strEula += _T("JPEGsnoop\r\n");
strEula += _T("Copyright (C) 2018 Calvin Hass\r\n");
strEula += _T("\r\n");
strEula += _T("This program is free software; you can redistribute it and/or modify\r\n");
strEula += _T("it under the terms of the GNU General Public License as published by\r\n");
strEula += _T("the Free Software Foundation; either version 2 of the License, or\r\n");
strEula += _T("(at your option) any later version.\r\n");
strEula += _T("\r\n");
strEula += _T("This program is distributed in the hope that it will be useful,\r\n");
strEula += _T("but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n");
strEula += _T("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n");
strEula += _T("GNU General Public License for more details.\r\n");
strEula += _T("\r\n");
strEula += _T("You should have received a copy of the GNU General Public License\r\n");
strEula += _T("along with this program. If not, see <http://www.gnu.org/licenses/>.\r\n");
}
CTermsDlg::~CTermsDlg()
{
}
void CTermsDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_EULA, strEula);
DDX_Check(pDX, IDC_EULA_OK, bEulaOk);
DDX_Check(pDX, IDC_UPDATE_AUTO, bUpdateAuto);
}
BEGIN_MESSAGE_MAP(CTermsDlg, CDialog)
ON_BN_CLICKED(IDOK, OnBnClickedOk)
END_MESSAGE_MAP()
// CTermsDlg message handlers
void CTermsDlg::OnBnClickedOk()
{
// TODO: Add your control notification handler code here
UpdateData(true);
if (bEulaOk) {
OnOK();
} else {
AfxMessageBox(_T("You need to agree to the terms or else click EXIT"));
}
}