//---------------------------------------------------------------------------------------------------------------------------------------------------
//
// Copyright (C)2007 DarkWynter Studios. All rights reserved.
//
//---------------------------------------------------------------------------------------------------------------------------------------------------
// {Contact : darkwynter.com for licensing information
//---------------------------------------------------------------------------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DarkWynter.Stream;
using DarkWynter.Engine.Globals;
using DarkWynter.Engine.Utilities;
using DarkWynter.App.Surveys;
using DarkWynter.App.ChallengeSet;
namespace DarkWynter.App
{
public partial class SurveyControl : UserControl
{
SurveyForm surveyForm;
public static List surveyList;
///
/// Creates the form for the Surveys
///
public SurveyControl()
{
InitializeComponent();
// Create the Pretest survey
surveyList = new List();
DarkWynter.Engine.DarkWynterEngine.onSurveyPretest += new DarkWynter.Engine.DarkWynterEngine.OnSurveyPretest(pretestButton_Click);
DarkWynter.Engine.DarkWynterEngine.onSurveyPosttest += new DarkWynter.Engine.DarkWynterEngine.OnSurveyPosttest(postTestOpen_Click);
}
///
/// Starts the pretest
///
/// mouse click (forms parameter)
/// event args (forms parameter)
public void pretestButton_Click(object sender, EventArgs e)
{
// Pretest Survey
surveyList.Clear();
surveyList.Add(new Survey("_xml/EventSettings/WLPreSurvey.xml"));
surveyForm = new SurveyForm();
surveyForm.MinimizeBox = false;
surveyForm.MaximizeBox = false;
surveyForm.ControlBox = false;
surveyForm.WindowState = FormWindowState.Maximized;
surveyForm.Show();
}
///
/// Start the Post Test
///
/// mouse click (forms parameter)
/// event args (forms parameter)
private void postTestOpen_Click(object sender, EventArgs e)
{
if (Statics_Engine.SystemSettings.gameState == Enums_Engine.EngineState.FINALIZE_G2LSTUFF)
{
// Posttest Survey
surveyList.Clear();
surveyList.Add(new Survey("_xml/EventSettings/WLPostSurvey.xml"));
surveyForm = new SurveyForm();
surveyForm.MinimizeBox = false;
surveyForm.MaximizeBox = false;
surveyForm.ControlBox = false;
surveyForm.WindowState = FormWindowState.Maximized;
surveyForm.Show();
}
}
}
}