using System;
using System.Windows.Forms;
using ComponentFramework;
using FullScreenShaders.Forms;

namespace FullScreenShaders
{
    static class Program
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var chooser = new SettingsChooser();
            if (chooser.ShowDialog() == DialogResult.OK)
            {
                EngineSettings settings = chooser.ChosenSettings;
                var core = new FullScreenShaders();

                var window = new MainWindow(core);
                settings.WindowedHandle = window.DrawingTarget.Handle;
                // The form handle is deduced from the window handle

                core.Run(settings);
            }
        }
    }
}