private ProfileManager()
 {
     if (!Directory.Exists(MainForm.GetFullPath("Profiles")))
     {
         try
         {
             Directory.CreateDirectory(MainForm.GetFullPath("Profiles"));
         }
         catch
         {
             int num = (int)MessageBox.Show("Error: Could not create a new profile folder.", "Swiss Army Knife");
         }
     }
     config_folder_base = MainForm.ExeFolder();
     config.InitProfile(config_folder_base, "Config.cfg");
     _triggerProfile.InitProfile("Profiles", "Config.cfg.trigger");
     for (int num = 1; num <= 8; ++num)
     {
         profiles[num - 1] = new MugenProfile();
         profiles[num - 1].InitProfile("Profiles", "profile_" + num.ToString() + ".cfg");
         profiles[num - 1].SetProfileNo(num);
     }
 }
        protected override bool LoadCfgFile(string the_file)
        {
            ResetConf();
            StreamReader streamReader = null;

            try
            {
                streamReader = new StreamReader(the_file, Encoding.Default);
                while (streamReader.Peek() >= 0)
                {
                    string str = streamReader.ReadLine();
                    if (_paramMode == ParamMode.CHARACTERS)
                    {
                        if (char_list_raw_data == null)
                        {
                            char_list_raw_data = str + Environment.NewLine;
                        }
                        else
                        {
                            MugenProfile mugenProfile = this;
                            mugenProfile.char_list_raw_data = mugenProfile.char_list_raw_data + str + Environment.NewLine;
                        }
                    }
                    string stBuffer = str.Trim();
                    if (stBuffer.IndexOf(";", 0) != 0)
                    {
                        int length = stBuffer.IndexOf(';');
                        if (length > 0)
                        {
                            stBuffer = stBuffer.Substring(0, length);
                        }
                        if (!CheckParamMode(stBuffer))
                        {
                            switch (_paramMode)
                            {
                            case ParamMode.MUGEN:
                                _LoadMugenParams(stBuffer);
                                continue;

                            case ParamMode.AUTO_MODE:
                                _LoadAutoModeParams(stBuffer);
                                continue;

                            case ParamMode.CHARACTERS:
                                _LoadCharacters(stBuffer);
                                continue;

                            default:
                                continue;
                            }
                        }
                    }
                }
            }
            catch
            {
                streamReader?.Close();
                return(false);
            }
            streamReader?.Close();
            return(true);
        }