public void replaceRecord() { string prePathRecord = "tmp.wav"; string newPathRecord = null; Splt sp = new Splt(); List <string> setting = sp.oneSplit(Properties.Settings.Default.Current); newPathRecord = setting[0] + "\\" + setting[0] + setting[2]; if (setting[1] == "1") { dt = DateTime.UtcNow; newPathRecord = newPathRecord + " " + dt.Year + "_" + dt.Month + "_" + dt.Day + " " + dt.Hour + "." + dt.Minute; } newPathRecord = newPathRecord + ".wav"; File.Copy(prePathRecord, newPathRecord); setting[2] = Convert.ToString(Convert.ToInt32(setting[2]) + 1); string upd = setting[0] + ":" + setting[1] + ":" + setting[2] + ";"; updateUsers(setting); Properties.Settings.Default.Current = upd; }
private void updateUsers(List <string> upd) { Splt sp = new Splt(); List <List <string> > tmp = sp.doSplit(Properties.Settings.Default.Users); for (int i = 0; i < tmp.Count - 1; i++) { if (tmp[i][0] == upd[0]) { tmp[i] = upd; break; } } MessageBox.Show(tmp.Count.ToString()); Properties.Settings.Default.Users = sp.undoSplt(tmp); }