private void init() { this.clearCSV(); this.offset = 0; this.limit = STEP; this.file_offset = 0; this.loadFromFile = false; this.loadFromPath = ""; settings = new IniFiles(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "/Settings.ini"); this.limit = !settings.KeyExists("limit") ? Int32.Parse(settings.Write("limit", "" + STEP)) : Int32.Parse(settings.Read("limit")); this.loadFromFile = !settings.KeyExists("loadFromFile") ? Boolean.Parse(settings.Write("loadFromFile", "false")) : Boolean.Parse(settings.Read("loadFromFile")); this.loadFromPath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "/" + (!settings.KeyExists("loadFromPath") ? settings.Write("loadFromPath", "words.txt") : settings.Read("loadFromPath")); if (loadFromFile) { this.offset = !settings.KeyExists("file_offset") ? long.Parse(settings.Write("file_offset", "" + file_offset)) : long.Parse(settings.Read("file_offset")); } else { this.offset = !settings.KeyExists("offset") ? long.Parse(settings.Write("offset", "" + offset)) : long.Parse(settings.Read("offset")); } }
private void init() { this.clearCSV(); this.offset = 0; this.limit = STEP; this.file_offset = 0; this.loadFromFile = false; this.loadFromPath = ""; settings = new IniFiles("Settings.ini"); this.limit = !settings.KeyExists("limit") ? Int32.Parse(settings.Write("limit", "" + STEP)) : Int32.Parse(settings.Read("limit")); this.loadFromFile = !settings.KeyExists("loadFromFile") ? Boolean.Parse(settings.Write("loadFromFile", "false")) : Boolean.Parse(settings.Read("loadFromFile")); this.loadFromPath = !settings.KeyExists("loadFromPath") ? settings.Write("loadFromPath", "words.txt") : settings.Read("loadFromPath"); if (loadFromFile) { this.offset = !settings.KeyExists("file_offset") ? Int32.Parse(settings.Write("file_offset", "" + file_offset)) : Int32.Parse(settings.Read("file_offset")); } else { this.offset = !settings.KeyExists("offset") ? Int32.Parse(settings.Write("offset", "" + offset)) : Int32.Parse(settings.Read("offset")); } }