using System;
using System.Collections.Generic;
using System.Windows.Forms;
//using System.Security.Permissions;
//using System.Security.Principal;

namespace VR2WinApp
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
/*
            try
            {
                // PrincipalPolicy must be set to WindowsPrincipal to check roles.
                AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
                // Check using the PrincipalPermissionAttribute
                CheckAdministrator();
                // Check using PrincipalPermission class.
                PrincipalPermission principalPerm = new PrincipalPermission(null, "Administrators");
                principalPerm.Demand();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }*/

            //Application.Run(new Form1());

            //SingleInstance.SingleApplication.Run(new Form1());
            SingleInstance.SingleApplication.Run(new VR2AppMainForm());
            
        }
/*
        [PrincipalPermission(SecurityAction.Demand, Role = "Administrators")]
        static void CheckAdministrator()
        {
            //Console.WriteLine("User is an administrator");
        }*/
    }
}