summaryrefslogtreecommitdiff
path: root/Checklist/ChecklistApp.cpp
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2003-09-17 19:07:23 +0000
committerStef Walter <stef@thewalter.net>2003-09-17 19:07:23 +0000
commit3f95d417d9e623ac0c74df8ef11d7a01846392dd (patch)
tree45ec73f2dc07eafd7f41a6f62a8cdfbaa279469f /Checklist/ChecklistApp.cpp
Initial ImportHEADmaster
Diffstat (limited to 'Checklist/ChecklistApp.cpp')
-rw-r--r--Checklist/ChecklistApp.cpp83
1 files changed, 83 insertions, 0 deletions
diff --git a/Checklist/ChecklistApp.cpp b/Checklist/ChecklistApp.cpp
new file mode 100644
index 0000000..503dfce
--- /dev/null
+++ b/Checklist/ChecklistApp.cpp
@@ -0,0 +1,83 @@
+// ChecklistApp.cpp: implementation of the CChecklistApp class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#include "stdafx.h"
+#include "ChecklistApp.h"
+#include "NightSecWizard.h"
+
+#include "FirstPage.h"
+#include "NormalPage.h"
+#include "DonePage.h"
+#include "AdvancedPage.h"
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CChecklistApp::CChecklistApp()
+ : CNightSecApp(_T("Night Security Checklist"), _T("NightSecurity.SecSetup.{2ED9B361-F6EF-11d2-A5A1-0020182B97FC}"))
+{ }
+
+CChecklistApp::~CChecklistApp()
+{ }
+
+bool CChecklistApp::InitInstance()
+{
+ if(!CNightSecApp::InitInstance())
+ return false;
+
+ // If more than one instance bail out early
+ if(m_oneInstance.IsAlreadyLoaded())
+ {
+ m_oneInstance.FindAndActivate(_T("#32770"), _T("Night Security Checklist"));
+ return false;
+ }
+
+ // Create the Normal Wizard
+ CNormalWizard wizNormal;
+
+ // Add Normal Wizard Pages
+ CFirstPage page1(&wizNormal, WIZPAGE_FIRST);
+ CNormalPage page2(&wizNormal, WIZPAGE_MIDDLE);
+ CDonePage page3(&wizNormal, WIZPAGE_LAST);
+
+ wizNormal.AddPage(&page1);
+ wizNormal.AddPage(&page2);
+ wizNormal.AddExtraPages();
+ wizNormal.AddPage(&page3);
+
+ // And Show it
+ int nRet = wizNormal.DoModal();
+
+ // If Advanced Button was pressed
+ if(nRet == IDC_ADVANCED)
+ {
+
+ // Create the Advanced Wizard
+ CAdvancedWizard wizAdvanced;
+
+ // Add advanced Wizard Pages
+ CAdvancedPage pageAdv1(&wizAdvanced, COMPONENT_WIN, IDD_ADVWIZWIN, WIZPAGE_FIRST);
+ CAdvancedPage pageAdv2(&wizAdvanced, COMPONENT_DOS, IDD_ADVWIZDOS, WIZPAGE_LAST);
+
+ wizAdvanced.AddPage(&pageAdv1);
+ wizAdvanced.AddPage(&pageAdv2);
+
+ // And Show it
+ nRet = wizAdvanced.DoModal();
+
+ }
+
+ if(nRet == ID_WIZFINISH)
+ {
+ // Set flag so Secure Shutdown Program doesn't prompt
+ m_settings.WriteInt("Is Setup", 1);
+ // If Finish Button was pressed then save data
+ g_aComponents.SaveComponentData();
+ }
+
+ // Since the dialog has been closed, return FALSE so that we exit the
+ // application, rather than start the application's message pump.
+ return false;
+}