public String[] read() { if (File.Exists("data.mcw")) { file = new FileStream("data.mcw", FileMode.Open, FileAccess.ReadWrite); StreamReader reader = new StreamReader(file); content[0] = reader.ReadLine(); content[1] = reader.ReadLine(); content[2] = reader.ReadLine(); reader.Close(); file.Close(); } else { content[0] = "0"; content[1] = "KapsataWiFi"; content[2] = "freeWiFi99"; writeData(content); commander.setCredentials(content); } return(content); }
private void btnStart_Click(object sender, EventArgs e) { String[] content = { checkState, txtSSID.Text, txtKey.Text }; MessageBox.Show(commander.setCredentials(content)); db.writeData(content); }