示例#1
0
 public FileControlEventArgs(int friendNumber, int fileNumber, bool isSend, ToxFileControl control, byte[] data)
     : base(friendNumber, fileNumber)
 {
     IsSend  = isSend;
     Control = control;
     Data    = (byte[])data.Clone();
 }
示例#2
0
        public bool FileControl(int friendNumber, int fileNumber, ToxFileControl control)
        {
            ToxErrorFileControl error;
            var retVal = _tox.FileControl(friendNumber, fileNumber, control, out error);

            ToxErrorViewModel.Instance.RelayError(error);
            return(retVal);
        }
示例#3
0
 private void HandleFileControl(ToxFileControl fileControl, TransferId transferId)
 {
     switch (fileControl)
     {
     case ToxFileControl.Cancel:
         RemoveTransfer(transferId);
         return;
     }
 }
示例#4
0
 public bool FileControl(int friendNumber, int fileNumber, ToxFileControl control)
 {
     ToxErrorFileControl error;
     var retVal = _tox.FileControl(friendNumber, fileNumber, control, out error);
     ToxErrorViewModel.Instance.RelayError(error);
     return retVal;
 }
示例#5
0
 public FileControlEventArgs(int friendNumber, int fileNumber, ToxFileControl control)
     : base(friendNumber, fileNumber)
 {
     Control = control;
 }
示例#6
0
 public FileControlEventArgs(int friendNumber, int fileNumber, ToxFileControl control)
     : base(friendNumber, fileNumber)
 {
     Control = control;
 }
示例#7
0
 public bool FileControl(int friendNumber, int fileNumber, ToxFileControl control)
 {
     return(true);
 }
示例#8
0
 internal static extern bool FileControl(ToxHandle tox, uint friendNumber, uint fileNumber, ToxFileControl control, ref ToxErrorFileControl error);
示例#9
0
 internal static extern bool FileControl(ToxHandle tox, uint friendNumber, uint fileNumber, ToxFileControl control, ref ToxErrorFileControl error);
示例#10
0
        /// <summary>
        /// Sends a file control request.
        /// </summary>
        /// <param name="friendnumber"></param>
        /// <param name="send_receive">0 if we're sending and 1 if we're receiving.</param>
        /// <param name="filenumber"></param>
        /// <param name="message_id"></param>
        /// <param name="data"></param>
        /// <returns>true on success and false on failure.</returns>
        public bool FileSendControl(int friendnumber, int send_receive, int filenumber, ToxFileControl message_id, byte[] data)
        {
            if (disposed)
                throw new ObjectDisposedException(GetType().FullName);

            return ToxFunctions.FileSendControl(tox, friendnumber, (byte)send_receive, (byte)filenumber, (byte)message_id, data, (ushort)data.Length) == 0;
        }
示例#11
0
文件: Tox.cs 项目: hexafluoride/Detox
 /// <summary>
 /// Sends a file control command to a friend for a given file transfer.
 /// </summary>
 /// <param name="friendNumber">The friend to send the file control to.</param>
 /// <param name="fileNumber">The file transfer that this control is meant for.</param>
 /// <param name="control">The control to send.</param>
 /// <returns>True on success.</returns>
 public bool FileControl(int friendNumber, int fileNumber, ToxFileControl control)
 {
     var error = ToxErrorFileControl.Ok;
     return FileControl(friendNumber, fileNumber, control, out error);
 }
示例#12
0
文件: Tox.cs 项目: hexafluoride/Detox
        /// <summary>
        /// Sends a file control command to a friend for a given file transfer.
        /// </summary>
        /// <param name="friendNumber">The friend to send the file control to.</param>
        /// <param name="fileNumber">The file transfer that this control is meant for.</param>
        /// <param name="control">The control to send.</param>
        /// <param name="error"></param>
        /// <returns>True on success.</returns>
        public bool FileControl(int friendNumber, int fileNumber, ToxFileControl control, out ToxErrorFileControl error)
        {
            ThrowIfDisposed();

            error = ToxErrorFileControl.Ok;

            return ToxFunctions.FileControl(_tox, (uint)friendNumber, (uint)fileNumber, control, ref error);
        }
示例#13
0
 public static extern Boolean Control(ToxHandle tox, UInt32 friendNumber, UInt32 fileNumber, ToxFileControl control, ref ToxErrorFileControl error);