Beispiel #1
0
 public static void OnFileMgrFile(FileMgrFileEventArgs e)
 {
     if (FileMgrFile != null)
     {
         FileMgrFile(new object(), e);
     }
 }
Beispiel #2
0
        public void onGetFiles(object o, FileMgrFileEventArgs e)
        {
            try
            {
                if (e.RemoteIP != RemoteIP || startDir == null && BackgroundLocation != e._FileMgrFile.FileLocation)
                    return;

                if (e._FileMgrFile.IconHandle > 0)
                    imageList1.Images.Add(Icon.FromHandle((IntPtr)e._FileMgrFile.IconHandle));
                else
                    imageList1.Images.Add(Properties.Resources.FileMgrError);

                string[] str = new string[4];
                str[0] = e._FileMgrFile.FileName;
                str[1] = e._FileMgrFile.Extension;
                str[2] = e._FileMgrFile.Date;
                str[3] = string.Format("{0:0.00} MB ({1})", (Convert.ToInt32(e._FileMgrFile.Size) / 1024) / 1024, e._FileMgrFile.Size);
                ListViewItem itm = new ListViewItem(str, IconIndex++);
                listView3.Items.Add(itm);
            }
            catch { }
        }
Beispiel #3
0
 public static void OnFileMgrFile(FileMgrFileEventArgs e)
 {
     if (FileMgrFile != null)
         FileMgrFile(new object(), e);
 }
Beispiel #4
0
 public override void Run()
 {
     FileMgrFileEventArgs e1 = new FileMgrFileEventArgs(info, Client.RemoteEndPoint.ToString());
     FileMgrFileEvent.OnFileMgrFile(e1);
     info = null; //clean memory
 }