Пример #1
0
 private void onBeforItemInsert(EditFileExplorerEventArgs arg)
 {
     if (_BeforItemInsert != null)
     {
         _BeforItemInsert(this, arg);
     }
 }
Пример #2
0
        //初始化文件列表...
        private void createlistitem()
        {
            _SmallIconList.Images.Clear();
            _IconList.Images.Clear();
            lstFileExplorer.Items.Clear();

            foreach (FileDataInfo info in _FileList)
            {
                System.Windows.Forms.ListViewItem item = createItemByInfo(info);
                EditFileExplorerEventArgs         arg  = new EditFileExplorerEventArgs(item, item.Tag as FileDataInfo);
                onBeforItemInsert(arg);

                if (!arg.Cancel)
                {
                    lstFileExplorer.Items.Add(item);
                    onAfterItemInsert(new EditFileExplorerEventArgs(item, item.Tag as FileDataInfo));
                }
            }
        }