public void imethod_5(string string_1, FileTransDisrupttedType fileTransDisrupttedType_0, string string_2) { if (this.iobjectManager_2.Contains(string_1)) { TransferingProject project = this.iobjectManager_2.Get(string_1); project.method_2(string_2); this.iobjectManager_2.Remove(string_1); this.FileTransDisruptted(project, fileTransDisrupttedType_0); } else { IFileTransHelper interface2 = this.iobjectManager_0.Get(string_1); if (interface2 == null) { if (this.iobjectManager_1.Contains(string_1)) { this.iobjectManager_1.Remove(string_1); } } else { interface2.imethod_1(fileTransDisrupttedType_0, false, string_2); } } }
private void method_5(string string_5, FileTransDisrupttedType fileTransDisrupttedType_0, string string_6) { this.ulong_2 = this.enisnmwGbe.imethod_9(); this.ulong_1 = this.enisnmwGbe.imethod_6(); this.string_1 = this.enisnmwGbe.imethod_8(); this.string_2 = this.enisnmwGbe.imethod_7().Substring(this.string_0.Length); this.FileTransDisruptted(this.string_3, fileTransDisrupttedType_0, string_6); }
public void imethod_0(FileTransDisrupttedType fileTransDisrupttedType_1, string string_4) { this.object_0 = 1; this.fileTransDisrupttedType_0 = fileTransDisrupttedType_1; this.string_3 = string_4; if ((fileTransDisrupttedType_1 == FileTransDisrupttedType.DestCancel) && (string_4 == "NetworkSpeedSlow")) { this.method_2(this.fileTransDisrupttedType_0, this.string_3); } }
private void method_2(FileTransDisrupttedType fileTransDisrupttedType_1, string string_4) { lock (this.object_1) { if (!this.bool_2) { this.bool_2 = true; this.cbFileTransDisruptted_1(this.imethod_5(), fileTransDisrupttedType_1, string_4); } } }
private void MhcyEttgGe(FileTransDisrupttedType fileTransDisrupttedType_1, string string_4) { lock (this.object_1) { if (!this.bool_2) { this.bool_2 = true; this.FileTransDisruptted(this.imethod_5(), fileTransDisrupttedType_1, string_4); } } }
private void method_10(string string_1, FileTransDisrupttedType fileTransDisrupttedType_0, string string_2) { TransferingProject project = this.imethod_2(string_1); if (project != null) { project.method_2(string_2); this.safeDictionary_1.Remove(string_1); this.safeDictionary_0.Remove(string_1); this.FileTransDisruptted(project, fileTransDisrupttedType_0); } }
private void OnFileTransDisruptted(string string_4, FileTransDisrupttedType fileTransDisrupttedType_1, string string_5) { lock (this.object_1) { if (this.bool_0) { return; } this.bool_0 = true; } this.manualResetEvent_0.Set(); this.FileTransDisruptted(this.string_3, fileTransDisrupttedType_1, string_5); }
public void imethod_1(FileTransDisrupttedType fileTransDisrupttedType_0, bool bool_1, string string_1) { try { this.object_0 = 1; this.stream_0.Flush(); this.stream_0 = null; } catch (Exception) { } this.FileTransDisruptted(this.string_0, fileTransDisrupttedType_0, string_1); }
public void imethod_1(FileTransDisrupttedType fileTransDisrupttedType_0, bool bool_1, string string_3) { try { this.object_0 = 1; this.fileStream_0.Flush(); this.fileStream_0.Close(); this.fileStream_0 = null; if (bool_1) { File.Delete(this.string_1); } } catch (Exception) { } this.FileTransDisruptted(this.HtwoUmmJj, fileTransDisrupttedType_0, string_3); }
public void imethod_7(string string_1, FileTransDisrupttedType fileTransDisrupttedType_0, string string_2) { IFileOutter interface2 = this.safeDictionary_1.Get(string_1); if (interface2 != null) { interface2.imethod_0(fileTransDisrupttedType_0, string_2); } else { TransferingProject project = this.safeDictionary_0.Get(string_1); if (project != null) { this.safeDictionary_0.Remove(string_1); project.method_2(string_2); this.FileTransDisruptted(project, fileTransDisrupttedType_0); } } }
void fileTransDisruptted(TransferingProject info, FileTransDisrupttedType disrupttedType) { //if (!this.IsHandleCreated) //{ // return; //} if (this.InvokeRequired) { this.Invoke(new CbGeneric <TransferingProject, FileTransDisrupttedType>(this.fileTransDisruptted), info, disrupttedType); } else { FileTransferItem item = this.GetExistedItem(info.ProjectID); if (item != null) { this.flowLayoutPanel1.Controls.Remove(item); this.FileTransDisruptted(info.ProjectName, info.IsSender, disrupttedType); } } }
private void method_3(string string_1, FileTransDisrupttedType fileTransDisrupttedType_0, string string_2) { TransferingProject project = this.GetTransferingProject(string_1); project.method_2(string_2); IFileTransHelper interface2 = this.iobjectManager_0.Get(string_1); ResumedProjectItem item = null; if (interface2.imethod_4()) { DirectoryReceiver class2 = (DirectoryReceiver)interface2; item = new ResumedProjectItem(project.SenderID, project.OriginPath, project.TotalSize, project.OriginLastUpdateTime, interface2.imethod_8(), interface2.imethod_7(), interface2.imethod_9(), class2.method_0(), class2.method_1(), class2.method_2()); } else { item = new ResumedProjectItem(project.SenderID, project.OriginPath, project.TotalSize, project.OriginLastUpdateTime, interface2.imethod_8(), interface2.imethod_7(), interface2.imethod_9()); } this.class93_0.UpdateResumedProjectItem(item); this.iobjectManager_1.Remove(string_1); this.iobjectManager_0.Remove(string_1); this.FileTransDisruptted(project, fileTransDisrupttedType_0); }
public void imethod_2() { if (this.object_0 == 0) { if (!this.bool_3) { this.ulong_3 = this.ulong_2; this.bool_3 = true; } else { ulong num = this.ulong_2 - this.ulong_3; if (num > 0L) { this.ulong_3 = this.ulong_2; } else { this.object_0 = 1; if (!this.bool_1) { this.fileTransDisrupttedType_0 = FileTransDisrupttedType.SendThreadNotStarted; this.method_2(this.fileTransDisrupttedType_0, this.string_3); } else if (!this.bool_0) { this.fileTransDisrupttedType_0 = FileTransDisrupttedType.ReadFileBlocked; this.method_2(this.fileTransDisrupttedType_0, this.string_3); } else { this.fileTransDisrupttedType_0 = FileTransDisrupttedType.NetworkSpeedSlow; this.method_2(this.fileTransDisrupttedType_0, this.string_3); } } } } }
private void HandleMessage(TransferingProject transferingProject_0, FileTransDisrupttedType fileTransDisrupttedType_0) { CancelFileContract contract; IMessageHandler interface2; if (fileTransDisrupttedType_0 == FileTransDisrupttedType.InnerError) { contract = new CancelFileContract(transferingProject_0.ProjectID, true, transferingProject_0.FileTransDisrupttedCause); interface2 = this.interface9_0.imethod_4 <CancelFileContract>(this.string_0, this.fileMessageTypeRoom_0.CancelFileReceiving, contract, transferingProject_0.SenderID); this.SendMessage(interface2, false); } else if (fileTransDisrupttedType_0 == FileTransDisrupttedType.ReliableP2PChannelClosed) { contract = new CancelFileContract(transferingProject_0.ProjectID, false, "ReliableP2PChannelClosed"); interface2 = this.interface9_0.imethod_4 <CancelFileContract>(this.string_0, this.fileMessageTypeRoom_0.CancelFileReceiving, contract, transferingProject_0.SenderID); this.SendMessage(interface2, false); } else if (fileTransDisrupttedType_0 == FileTransDisrupttedType.NetworkSpeedSlow) { contract = new CancelFileContract(transferingProject_0.ProjectID, false, "NetworkSpeedSlow"); interface2 = this.interface9_0.imethod_4 <CancelFileContract>(this.string_0, this.fileMessageTypeRoom_0.CancelFileReceiving, contract, transferingProject_0.SenderID); this.SendMessage(interface2, true); } }
void fileTransferingViewer1_FileTransDisruptted(string fileName, bool isSending, FileTransDisrupttedType disrupttedType) { string info = string.Format("{0} {1}中断!", fileName, isSending ? "上传" : "下载"); if (disrupttedType == FileTransDisrupttedType.ActiveCancel) { info += "原因:您取消了文件传送。"; } else if (disrupttedType == FileTransDisrupttedType.DestCancel) { info += "原因:对方取消了文件传送。"; } else if (disrupttedType == FileTransDisrupttedType.DestOffline) { info += "原因:对方已经掉线。"; } else if (disrupttedType == FileTransDisrupttedType.SelfOffline) { info += "原因:您已经掉线。"; } else if (disrupttedType == FileTransDisrupttedType.DestInnerError) { info += "原因:对方系统错误。"; } else if (disrupttedType == FileTransDisrupttedType.InnerError) { info += "原因:系统错误。"; } else if (disrupttedType == FileTransDisrupttedType.ReliableP2PChannelClosed) { info += "原因:可靠的P2P通道关闭。"; } else { } this.toolStripButton_state.Image = this.imageList2.Images[1]; this.toolStripLabel_msg.Text = string.Format("{0}: {1}", DateTime.Now.ToString(), info); }
private static void smethod_4(object object_1, FileTransDisrupttedType fileTransDisrupttedType_0, object object_2) { }
private static void smethod_3(object object_0, FileTransDisrupttedType fileTransDisrupttedType_0) { }
public void imethod_1(FileTransDisrupttedType fileTransDisrupttedType_0, bool bool_0, string string_5) { this.enisnmwGbe.imethod_1(fileTransDisrupttedType_0, bool_0, string_5); }
/// <summary> /// File transmission disruptted. /// </summary> /// <param name="transmittingFileInfo">transmitting file information</param> /// <param name="fileTransDisrupttedType">file transmission disruptted type</param> void FileReceivingEvents_FileTransDisruptted(TransferingProject transmittingFileInfo, FileTransDisrupttedType fileTransDisrupttedType) { if (fileTransDisrupttedType == FileTransDisrupttedType.SelfOffline) { return; } string sourcePath = AppDomain.CurrentDomain.BaseDirectory + "temp\\"; FileHelper.DeleteDirectory(sourcePath); Event_UpdateDisruptted?.Invoke(fileTransDisrupttedType.ToString()); }
internal void ShowFileTransferFailed(string fileName, bool isSender, FileTransDisrupttedType fileTransDisrupttedType) { this.agileRichTextBox_history.AppendRichText(string.Format("系统 {0}\n", DateTime.Now), null, null, Color.DarkGray); string showText = ""; switch (fileTransDisrupttedType) { case FileTransDisrupttedType.ActiveCancel: { if (isSender) { showText += string.Format("您取消了{0}的发送,文件传输失败\n ", fileName); } else { showText += string.Format("您中止了{0}的接收,文件传输失败\n ", fileName); } break; } case FileTransDisrupttedType.DestCancel: { if (isSender) { showText += string.Format("对方中止了{0}的接收,文件传输失败 \n", fileName); } else { showText += string.Format("对方取消了{0}的发送 ,文件传输失败\n", fileName); } break; } case FileTransDisrupttedType.DestOffline: { showText += "对方掉线,文件传输失败\n"; break; } case FileTransDisrupttedType.SelfOffline: { showText += "自己掉线,文件传输失败\n"; break; } case FileTransDisrupttedType.RejectAccepting: { showText += string.Format("对方拒绝接收{0},文件发送失败\n ", fileName); break; } case FileTransDisrupttedType.InnerError: { showText += "自己系统内部错误,文件传输失败\n"; break; } case FileTransDisrupttedType.DestInnerError: { showText += "对方系统内部错误,文件传输失败\n"; break; } case FileTransDisrupttedType.ReliableP2PChannelClosed: { showText += "P2P通道关闭,文件传输失败\n"; break; } } this.agileRichTextBox_history.AppendRichText(showText, null, null, Color.DarkGray); this.agileRichTextBox_history.ScrollToCaret(); }
void fileTransDisruptted(TransferingProject info, FileTransDisrupttedType disrupttedType) { //if (!this.IsHandleCreated) //{ // return; //} if (this.InvokeRequired) { this.Invoke(new CbGeneric<TransferingProject, FileTransDisrupttedType>(this.fileTransDisruptted), info, disrupttedType); } else { FileTransferItem item = this.GetExistedItem(info.ProjectID); if (item != null) { this.flowLayoutPanel1.Controls.Remove(item); this.FileTransDisruptted(info.ProjectName, info.IsSender, disrupttedType); } } }
private static void smethod_1(object object_2, FileTransDisrupttedType fileTransDisrupttedType_0, object object_3) { }
public void imethod_0(FileTransDisrupttedType fileTransDisrupttedType_1, string string_4) { this.class107_0.imethod_0(fileTransDisrupttedType_1, string_4); this.OnFileTransDisruptted(this.string_3, fileTransDisrupttedType_1, string_4); }
void FileReceivingEvents_FileTransDisruptted(TransferingProject transmittingFileInfo, FileTransDisrupttedType fileTransDisrupttedType) { if (fileTransDisrupttedType == FileTransDisrupttedType.SelfOffline) { return; } //删除已经更新的文件 string sourcePath = AppDomain.CurrentDomain.BaseDirectory + "temp\\"; ESBasic.Helpers.FileHelper.DeleteDirectory(sourcePath); if (this.UpdateDisruptted != null) { this.UpdateDisruptted(fileTransDisrupttedType.ToString()); } }
/// <summary> /// 文件传输中断 /// </summary> /// <param name="fileName">文件名</param> /// <param name="isSender">是接收者,还是发送者</param> /// <param name="fileTransDisrupttedType">中断原因</param> private void fileTransferingViewer1_FileTransDisruptted(string fileName, bool isSender, FileTransDisrupttedType fileTransDisrupttedType) { this.textChatControl1.ShowFileTransferFailed(fileName, isSender, fileTransDisrupttedType); if (!this.fileTransferingViewer1.IsFileTransfering) { this.panel_plus.Visible = false; this.Width = 500; } }