public void ExportFile(Object.User u, Object.Profile p, ref List <compte> lTop5) { mPathKey = p.PathKey + mName; mPathData = p.PathData + mName; string s = ObtainTemplateKey(); base.ExportKeyFile(s); s = ObtainTemplateData(); for (int i = 1; i <= 5; i++) { string sTarget = "<user" + i.ToString() + ">"; if (i <= lTop5.Count) { string sLine = i.ToString() + "," + lTop5[i - 1].sUser + ":" + lTop5[i - 1].sProfile; s = s.Replace(sTarget, sLine); } else { sTarget += "\r\n"; s = s.Replace(sTarget, ""); } } base.ExportDataFile(s); }
public void ExportFile(Object.User u, Object.Profile p, List <Object.ShortcutInfo> lst) { mPathKey = p.PathKey + mName; mPathData = p.PathData + mName; string s = ObtainTemplateKey(); foreach (Object.ShortcutInfo i in lst) { s += ObtainScriptFromShortcutInfo(i); } base.ExportKeyFile(s); s = ObtainTemplateData(); foreach (Object.ShortcutInfo i in lst) { s += i.Hotkey; s += ","; s += i.Name; s += "\r\n"; } base.ExportDataFile(s); }
public void ExportFile(Object.User u, Object.Profile p) { mPathKey = p.PathKey + mName; string s = ObtainTemplateKey(); base.ExportKeyFile(s); }
public void ExportFile(Object.User u, Object.Profile p) { mPathKey = p.PathUI + mName; string s = ObtainTemplateKey(); s = s.Replace("<name>", u.NAME); s = s.Replace("<profile>", p.Name); base.ExportKeyFile(s); }
private void UpdateAllScriptForOneUser(int nCase) { if (m_listUser == null) { m_listUser = ObtaintUserTextList(); } if (nCase >= 0 && nCase < m_listUser.Items.Count) { mUser = new User(m_listUser.Items[nCase]); mUser.LoadData(false); mUser.UpdateAllProfileScript(); } }
private void SetCurrentUser(string name, bool bisCurrentProfile) { if (name != "") { System.IO.TextWriter f = new System.IO.StreamWriter(definitions.path.UserCurrent); f.WriteLine(name); f.Close(); mUser = new User(name); mUser.LoadData(bisCurrentProfile); if (bisCurrentProfile) { mUser.TransferCurrentProfileInCurrentScript(); } } }
private bool LoadCurrentUser() { File.textlist f = new PeonLib.File.textlist(definitions.path.UserCurrent); if (f.Items.Count == 0) { return(false); } if (f.Items[0] == "") { return(false); } mUser = new User(f.Items[0]); mUser.LoadData(true); return(true); }
public GetMatchesResponse(User user, List <Match> matches) { data = new Object[] {}; List <Object> Matches = new List <Object>(); foreach (Match match in matches) { bool found = false; foreach (Object m in Matches) { if (m.user.id == match.FirstUser.Id || m.user.id == match.SecondUser.Id) { List <string> events = new List <string>(m.events); events.Add(match.Event.Title); m.events = events.ToArray(); found = true; } } if (!found) { Object.User u = new Object.User(); if (match.FirstUser.Id == user.Id) { u = new Object.User() { id = match.SecondUser.Id, name = match.SecondUser.Name, birthday = match.SecondUser.Birthday.ToString("yyyy-MM-dd'T'HH:mm:ss'GMT'zzz"), gender = match.SecondUser.Gender, picture = match.SecondUser.UserPictures.First(x => x.IsDefault).Picture }; } else { u = new Object.User() { id = match.FirstUser.Id, name = match.FirstUser.Name, birthday = match.FirstUser.Birthday.ToString("yyyy-MM-dd'T'HH:mm:ss'GMT'zzz"), gender = match.FirstUser.Gender, picture = match.FirstUser.UserPictures.First(x => x.IsDefault).Picture }; } Matches.Add(new Object { ID = match.Id, events = new string[] { match.Event.Title }, user = u } ); } data = Matches.ToArray(); } }