Esempio n. 1
0
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            FormRelationshipGoals formRelationshipGoals = new FormRelationshipGoals();

            formRelationshipGoals.Show();
            if (!SQLHandler.Check(Settings.Default.SQL_Server_Address, Settings.Default.SQL_Server_Schema, Settings.Default.SQL_Server_Login, Settings.Default.SQL_Server_Password))
            {
                MessageBox.Show(formRelationshipGoals, "Your SQL settings are not valid! Please provide valid SQL settings in the following window.");
                FormSettings formSettings = new FormSettings();
                formSettings.ShowDialog(formRelationshipGoals);
                while (formSettings.Visible) //Wait until valid settings have been provided before building ServiceProvider
                {
                    Thread.Sleep(1000);
                }
            }
            SQLHandler.Use(new SQLHandler(Settings.Default.SQL_Server_Address, Settings.Default.SQL_Server_Schema, Settings.Default.SQL_Server_Login, Settings.Default.SQL_Server_Password));

            BuildServiceProvider();

            BootAnimation.Play();
            Ready.Invoke();
            Application.Run(formRelationshipGoals);
        }