public void SaveData() { List <JsonDataSaveGroup> json_groups = new List <JsonDataSaveGroup>(); for (int i = 0; i < GroupsWork.Count; i++) { if (GroupsWork[i].GroupData.status == StatusTransfer.Loading) { continue; } JsonDataSaveGroup json_item = new JsonDataSaveGroup(); json_item.fromfolder = GroupsWork[i].fromfolder; json_item.savefolder = GroupsWork[i].savefolder; json_item.Group = GroupsWork[i].GroupData; json_item.AreCut = GroupsWork[i].AreCut; json_groups.Add(json_item); } string json = JsonConvert.SerializeObject(json_groups); if (temp_jsonSaveData == json) { return; } else { temp_jsonSaveData = json; } ReadWriteData.Write(ReadWriteData.File_DataUploadDownload, Encoding.UTF8.GetBytes(json)); }
public void SaveSettings() { MemoryStream Stream = new MemoryStream(); TextWriter TxtWriter = new StreamWriter(Stream, Encoding.UTF8); xmlSettings.Save(TxtWriter); ReadWriteData.Write(ReadWriteData.File_Settings, Stream.GetBuffer()); }
public void SaveData() { string json = JsonConvert.SerializeObject(ItemsTransfer); if (temp_jsonSaveData == json) { return; } else { temp_jsonSaveData = json; } ReadWriteData.Write(ReadWriteData.File_DataUploadDownload, Encoding.UTF8.GetBytes(json)); }
public bool WriteDataLogin(LoginData Data) { byte[] data = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(Data)); ReadWriteData.Write(ReadWriteData.File_Login, data); return(true); }