コード例 #1
0
ファイル: WebsiteProject.cs プロジェクト: radtek/Shopdrawing
 private void EnsureDeepZoomProjectItems(IProjectItem deepZoomProjectItem)
 {
     string[] directoryExtensions = DeepZoomHelper.GetDirectoryExtensions(deepZoomProjectItem.DocumentReference.Path);
     if (directoryExtensions != null)
     {
         string[] strArrays = directoryExtensions;
         for (int i = 0; i < (int)strArrays.Length; i++)
         {
             string str = strArrays[i];
             Microsoft.Expression.Framework.Documents.DocumentReference documentReference = DeepZoomHelper.CreateDeepZoomDirectoryReference(deepZoomProjectItem.DocumentReference, str);
             IProjectItem projectItem = base.FindItem(documentReference);
             if (projectItem != null && !deepZoomProjectItem.Children.ToList <IProjectItem>().Contains(projectItem))
             {
                 this.RemoveProjectItem(projectItem, false);
                 projectItem = null;
             }
             if (projectItem == null && Microsoft.Expression.Framework.Documents.PathHelper.FileOrDirectoryExists(documentReference.Path))
             {
                 IProjectItem folderProjectItem = new FolderProjectItem(this, documentReference, base.Services.DocumentTypes()[DocumentTypeNamesHelper.Folder], base.Services, true, Microsoft.Expression.Project.FileTable.GetImageSource("Resources\\Folder_DeepZoom.png"));
                 if (this.AddProjectItem(folderProjectItem, ProjectItemEventOptions.None))
                 {
                     deepZoomProjectItem.AddChild(folderProjectItem);
                 }
             }
         }
     }
 }
コード例 #2
0
ファイル: WebsiteProject.cs プロジェクト: radtek/Shopdrawing
 private IProjectItem AddItemDuringLoad(IProjectItem projectItem, IProjectItem parentItem)
 {
     if (base.FindItem(projectItem.DocumentReference) == null)
     {
         base.AddProjectItem(projectItem);
         if (parentItem != null)
         {
             parentItem.AddChild(projectItem);
         }
     }
     return(projectItem);
 }