public SendUserImage(DataPackage dataPackTemp) { dataPack = dataPackTemp; Buffer.BlockCopy(dataPackTemp.Data, 2, bPackBegin, 0, 4); FileCheck fileCheck = new FileCheck(); FileRequestConvert fileRc = new FileRequestConvert(); FileRequest fr = fileRc.ConvertToClass_Send(dataPackTemp.Data); path = fileCheck.SelUserImage(fr.User_id); }
public AccountRequest(DataPackage data) { SQLService sql = new SQLService(); dataResponse.Client = data.Client; LoginData loginData = convert.ConvertToClass(data.Data); loginData.User_id = sql.AccountRequest(loginData.User_password); dataResponse.Data = convert.ConvertToBytes(loginData); FileCheck fileCheck = new FileCheck(); fileCheck.CheckCreateUserDir(loginData.User_id); }
public bool Receive() { Newtalking_DAL_Server.ReceiveFile rece = new Newtalking_DAL_Server.ReceiveFile(remoteClient); FileCheck fileCheck = new FileCheck(); string[] strs = fileCheck.CheckCreateUserDir(rfr.User_id); WriteFile writer = new WriteFile(strs[0]); try { byte[] data; do { data = rece.Receive(); writer.Write(data); } while (data.Length == 1024); writer.fileStream.Close(); return true; } catch { writer.Delete(); return false; } }