コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 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);
     }
 }