コード例 #1
0
ファイル: FolderEntity.cs プロジェクト: VivekRagunathan/EI
        protected override void AttributeChanged(EntityAttributeEventArgs e)
        {
            if ( e.AttributeName == "SourceFolder" )
             {
            _subEntities.Clear();
            // Remove all the sub entities and read the entire sub folder contents and create new
            // sub entities

            RecursiveReadFolderAndCreateEntities(this, SourceFolder);
             }

             if ( e.AttributeName == "FolderName" )
             {
            UpdateDestination(GetAttribute<string>("DestinationFolder"));
             }
        }
コード例 #2
0
ファイル: FolderEntity.cs プロジェクト: VivekRagunathan/EI
 protected override void AttributeChanging(EntityAttributeEventArgs e)
 {
     if ( e.AttributeName == "SourceFolder" )
      {
     if ( !Directory.Exists(e.NewValue.ToString()) )
     {
        throw new DirectoryNotFoundException(e.NewValue.ToString());
     }
      }
 }
コード例 #3
0
ファイル: FolderEntity.cs プロジェクト: VivekRagunathan/EI
        void Parent_OnAttributeChanged(object sender, EntityAttributeEventArgs e)
        {
            if (e.AttributeName == "DestinationFolder")
             {
            // Modify the Destination folder of this folder according to the
            // parent entity's attribute

            UpdateDestination(e.NewValue as string);
             }
        }
コード例 #4
0
ファイル: FileEntity.cs プロジェクト: VivekRagunathan/EI
 protected override void AttributeChanged(EntityAttributeEventArgs e)
 {
     if (e.AttributeName == "FileName")
      {
     UpdateDestination(Path.GetDirectoryName(GetAttribute<string>("DestinationPath")));
      }
 }