<commit_before>using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;

using OpenTK;
using OpenTK.Graphics;
using SharpFlame.AppSettings;


namespace SharpFlame
{
    public sealed class Program
    {
        public static Timer InitializeDelay;
        public static clsResult InitializeResult = new clsResult("Startup result", false);

        public static frmMain frmMainInstance;
        public static frmGenerator frmGeneratorInstance;
        public static frmOptions frmOptionsInstance;

        public static GLControl OpenGL1;
        public static GLControl OpenGL2;

        [STAThread]
        public static void Main()
        {
            Application.EnableVisualStyles();

            App.PlatformPathSeparator = Path.DirectorySeparatorChar;
            App.SetProgramSubDirs();

            SettingsManager.CreateSettingOptions();
            KeyboardManager.CreateControls(); //needed to load key control settings

            try
            {
                Toolkit.Init();
            }
            catch
            {

            }

            clsResult SettingsLoadResult = SettingsManager.Settings_Load(ref SettingsManager.InitializeSettings);

            InitializeResult.Add(SettingsLoadResult);


            OpenGL1 =
                new GLControl(new GraphicsMode(new ColorFormat(SettingsManager.InitializeSettings.MapViewBPP), SettingsManager.InitializeSettings.MapViewDepth, 0));
            OpenGL2 =
                new GLControl(new GraphicsMode(new ColorFormat(SettingsManager.InitializeSettings.TextureViewBPP), SettingsManager.InitializeSettings.TextureViewDepth,
                    0));

            while ( OpenGL1.Context == null || OpenGL2.Context == null )
            {
                //todo, why is this needed
            }

            frmMainInstance = new frmMain();
            frmMainInstance.FormClosing += frmMainInstance.frmMain_FormClosing;
            frmMainInstance.DragEnter += frmMainInstance.OpenGL_DragEnter;
            frmMainInstance.DragDrop += frmMainInstance.OpenGL_DragDrop;

            try
            {
                App.ProgramIcon = Resources.flaME;
            }
            catch ( Exception ex )<commit_msg>Fixes a App.Random is unitialized.<commit_after>using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;

using OpenTK;
using OpenTK.Graphics;
using SharpFlame.AppSettings;


namespace SharpFlame
{
    public sealed class Program
    {
        public static Timer InitializeDelay;
        public static clsResult InitializeResult = new clsResult("Startup result", false);

        public static frmMain frmMainInstance;
        public static frmGenerator frmGeneratorInstance;
        public static frmOptions frmOptionsInstance;

        public static GLControl OpenGL1;
        public static GLControl OpenGL2;

        [STAThread]
        public static void Main()
        {
            Application.EnableVisualStyles();

            App.PlatformPathSeparator = Path.DirectorySeparatorChar;
            App.SetProgramSubDirs();

            SettingsManager.CreateSettingOptions();
            KeyboardManager.CreateControls(); //needed to load key control settings

            try
            {
                Toolkit.Init();
            }
            catch
            {

            }

            clsResult SettingsLoadResult = SettingsManager.Settings_Load(ref SettingsManager.InitializeSettings);

            InitializeResult.Add(SettingsLoadResult);


            OpenGL1 =
                new GLControl(new GraphicsMode(new ColorFormat(SettingsManager.InitializeSettings.MapViewBPP), SettingsManager.InitializeSettings.MapViewDepth, 0));
            OpenGL2 =
                new GLControl(new GraphicsMode(new ColorFormat(SettingsManager.InitializeSettings.TextureViewBPP), SettingsManager.InitializeSettings.TextureViewDepth,
                    0));

            App.Random = new Random ();             

            while ( OpenGL1.Context == null || OpenGL2.Context == null )
            {
                //todo, why is this needed
            }

            frmMainInstance = new frmMain();
            frmMainInstance.FormClosing += frmMainInstance.frmMain_FormClosing;
            frmMainInstance.DragEnter += frmMainInstance.OpenGL_DragEnter;
            frmMainInstance.DragDrop += frmMainInstance.OpenGL_DragDrop;

            try
            {
                App.ProgramIcon = Resources.flaME;
            }
            catch ( Exception ex )
{'fraction_non_alphanumeric': 0.06628242074927954, 'fraction_numerical': 0.0035468853912657946, 'mean_word_length': 2.1442508710801396, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5081974', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1071, 'n_words': 239}