private List <IniBlock> ReadIni()
        {
            this.IsBini = false;
            IniManager iniManager = new IniManager(this.File)
            {
                ReadWriteComments = this.ReadWriteComments,
            };

            return(iniManager.Read());
        }
        public void Write(EditorIniData data)
        {
            // save data
            List <IniBlock> newData = new List <IniBlock>();

            foreach (EditorIniBlock block in data.Blocks)
            {
                IniOptions newBlock = new IniOptions();
                foreach (EditorIniOption option in block.Options)
                {
                    if (option.Values.Count > 0)
                    {
                        List <IniOption> newOption = new List <IniOption>();

                        foreach (EditorIniEntry entry in option.Values)
                        {
                            string optionValue = entry.Value.ToString();
                            if (optionValue == "=")
                            {
                                // use an empty value for options which dont have values and are simply defined when using the option key followed by a colon equal
                                newOption.Add(new IniOption {
                                    Value = string.Empty
                                });
                            }
                            else
                            {
                                newOption.Add(new IniOption {
                                    Value = optionValue
                                });
                            }

                            // add suboptions as options with defined parent
                            if (entry.SubOptions != null)
                            {
                                for (int k = 0; k < entry.SubOptions.Count; ++k)
                                {
                                    newOption.Add(
                                        new IniOption
                                    {
                                        Value = entry.SubOptions[k].ToString(), Parent = option.ChildName
                                    });
                                }
                            }
                        }

                        newBlock.Add(option.Name, newOption);
                    }
                }

                newData.Add(new IniBlock {
                    Name = block.Name, Options = newBlock, Comments = block.Comments,
                });
            }

            // if (IsBINI)
            // {
            // BINIManager biniManager = new BINIManager(File);
            // biniManager.Data = newData;
            // biniManager.Write();
            // }
            // else
            // {
            IniManager iniManager = new IniManager(this.File)
            {
                WriteEmptyLine    = this.WriteEmptyLine,
                WriteSpaces       = this.WriteSpaces,
                ReadWriteComments = this.ReadWriteComments,
            };

            iniManager.Write(newData);

            // }
        }