Exemplo n.º 1
0
        public void Append(string target, bool isSelf, FileSending fileSending)
        {
            FileProcess fileProcess = new FileProcess(target, isSelf, fileSending);

            this.FilePanel.Children.Add(fileProcess);
            fileProcess.OnSendFileAccepted += new FileProcess.SendFileAcceptedHandler((fileDialog, id, length) =>
            {
                OnSendFileAccepted(fileDialog, id, length);
            });
            fileProcess.OnSendFileRejected += new FileProcess.SendFileRejectedHandler(id =>
            {
                OnSendFileRejected(id);
            });
        }
Exemplo n.º 2
0
 public FileProcess(string User, bool IsSelf, FileSending fileSending)
 {
     InitializeComponent();
     this.IsSelf          = IsSelf;
     this.TargetUser      = User;
     this.FileIcon.Source = Imaging.CreateBitmapSourceFromHIcon(
         fileSending.ShellIcon.Handle,
         new Int32Rect(0, 0, fileSending.ShellIcon.Width, fileSending.ShellIcon.Height),
         BitmapSizeOptions.FromEmptyOptions());
     this.FileName.Text = fileSending.FullName;
     this.FileSize.Text = fileSending.SizeName;
     this.FilePath      = fileSending.FullPath;
     this.FileLength    = fileSending.Bytes;
     this.ID            = fileSending.ID;
 }
Exemplo n.º 3
0
 private void SendFile_Handler(FileSending fileSending)
 {
     OnSendFile(fileSending);
 }