internal void TransferReportProgress(ServerConnection serverConnection, int percentage, bool isCopy) { ServerTranferEventArgs args = new ServerTranferEventArgs { Server = serverConnection.Server, Position = serverConnessi.IndexOf(serverConnection), Copy = isCopy, Completed = false, Percentage = percentage }; EventHandler<ServerTranferEventArgs> handler = this.ServerTransferProgressChanged; if (handler != null) { handler(this, args); } }
internal void TransferStopped(ServerConnection serverConnection, bool isCopy) { ServerTranferEventArgs args = new ServerTranferEventArgs { Server = serverConnection.Server, Position = serverConnessi.IndexOf(serverConnection), Copy = isCopy, Completed = false, Percentage = 0 }; EventHandler<ServerTranferEventArgs> handler = this.ServerTransferCancelled; if (handler != null) { handler(this, args); } }
internal void TransferCompleted(ServerConnection serverConnection, MyClipboard clipboardServer, bool isCopy) { if (isCopy) { clipboardClient = new MyClipboard(clipboardServer); } ServerTranferEventArgs args = new ServerTranferEventArgs { Server = serverConnection.Server, Position = serverConnessi.IndexOf(serverConnection), Copy = isCopy, Completed = true, Percentage = 100 }; EventHandler<ServerTranferEventArgs> handler = this.ServerTransferCompleted; if (handler != null) { handler(this, args); } }