Ejemplo n.º 1
0
        private void Settings_FormClosing(object sender, FormClosingEventArgs e)
        {
            Config config = Main.Get().GetConfig();


            // check if global map resolution is >= than model/texture resolutions
            if ((int)config.mapDetailLevel < (int)config.ModelDetailLevel || (int)config.mapDetailLevel < (int)config.TextureDetailLevel)
            {
                if (System.Windows.Forms.MessageBox.Show("The selected map resolution is lower than selected model and/or texture resolution. This will result in model and/or texture resolution being limited by the overall map detail level.", "GeoGen Studio Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.Cancel)
                {
                    e.Cancel = true;
                }
            }

            // the 3D view might need to reinitialize
            if (Main.Get().GetConfig().enable3d)
            {
                Main main = Main.Get();
                main.Output3dButtonsOff();
                main.SetupViewport();
                main.RebuildTerrain(main.currentImportedFile);
                main.viewport.Invalidate();
            }
        }