private void metroButton3_Click(object sender, EventArgs e) { IniFile settingsIni = new IniFile(Environment.CurrentDirectory + @"\settings.ini"); if (smbxPathTb.Text != null) { settingsIni.WriteValue("Settings", "smbxpath", smbxPathTb.Text); } if (worldPathTb.Text != null) { settingsIni.WriteValue("Settings", "worldlocation", worldPathTb.Text); } if (execLocTb.Text != null) { settingsIni.WriteValue("Settings", "executableloc", execLocTb.Text); } Main_NEW.smbxExeLoc = execLocTb.Text; Main_NEW.smbxWorldsDir = worldPathTb.Text; Main_NEW.smbxDir = smbxPathTb.Text; mf.populateListView(); //populateListView MessageBox.Show("Settings saved sucessfully!"); }