using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace SL_TrialMode
{
    public partial class MainPage : PhoneApplicationPage
    {
        public TestTrialMode g_trialmode = new TestTrialMode();
        // Constructor
        public MainPage()
        {
            InitializeComponent();
            checkTrialMode.IsChecked = g_trialmode.TrialMode();
        }

        private void QueryMode_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("TrialMode = " + g_trialmode.TrialMode().ToString());
        }

        private void ToggleMode_Click(object sender, RoutedEventArgs e)
        {
            g_trialmode.ToggleTrialMode();
            checkTrialMode.IsChecked = g_trialmode.TrialMode();
        }

        private void RealMode_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("TrialMode = " + g_trialmode.RealTrialMode().ToString());
        }

        private void checkTrialMode_Click(object sender, RoutedEventArgs e)
        {
            g_trialmode.g_boTrialMode = checkTrialMode.IsChecked.Value;
        }
    }
}
