private void OnNewFolderCreating(NewFolderCancelEventArgs e)
 {
     if (NewFolderCreating != null)
     {
         NewFolderCreating(this, e);
     }
 }
示例#2
0
 void controller_NewFolderCreating(object sender, NewFolderCancelEventArgs e)
 {
     if (NewFolderCreating != null)
     {
         NewFolderCreating(this, e);
     }
 }
        private string ProcessNewFolder(FileManagerItemInfo destDir)
        {
            NewFolderCancelEventArgs cancelArg = new NewFolderCancelEventArgs();
            cancelArg.DestinationDirectory = destDir;
            OnNewFolderCreating(cancelArg);

            if (cancelArg.Cancel)
            {
                return ClientMessageEventReference(cancelArg.ClientMessage);
            }

            string folderName = GetResourceString("New_Folder_Name", "New Folder");

            string newFolderName = GetNotDuplicatedFolderName(destDir, folderName);

            FileManagerItemInfo itemInfo = ResolveFileManagerItemInfo(VirtualPathUtility.AppendTrailingSlash(destDir.FileManagerPath) + newFolderName);
            itemInfo.EnsureDirectoryExists();

            NewFolderEventArgs arg = new NewFolderEventArgs();
            arg.NewFolder = itemInfo;
            OnNewFolderCreated(arg);

            StringBuilder sb = new StringBuilder();
            AddFolderTreeRefreshEventReference(sb, destDir);
            sb.AppendLine(ClientRefreshEventReference);
            return sb.ToString();
        }
 private void OnNewFolderCreating(NewFolderCancelEventArgs e)
 {
     if (NewFolderCreating != null)
         NewFolderCreating (this, e);
 }
 void controller_NewFolderCreating(object sender, NewFolderCancelEventArgs e)
 {
     if (NewFolderCreating != null)
         NewFolderCreating(this, e);
 }