コード例 #1
0
ファイル: BucketManager.cs プロジェクト: hpinsley/DiskView
 public object Clone()
 {
     BucketManager Other = new BucketManager();
     foreach(Bucket B in this) {
         Other._buckets.Add(B.FileType, B.Clone());
     }
     return Other;
 }
コード例 #2
0
ファイル: BucketManager.cs プロジェクト: hpinsley/DiskView
        /// <summary>
        /// Take all the buckets maintained by the SourceManager and add them to our totals.  If we won't have a
        /// particular bucket, it is added.  In this context, we are the Target.
        /// </summary>
        /// <param name="OtherManager"></param>
        public void AddBuckets(BucketManager SourceManager)
        {
            Bucket	TargetBucket;

            foreach(Bucket SourceBucket in SourceManager) {
                TargetBucket = this.FindOrAddBucket(SourceBucket.FileType);
                TargetBucket.AddOtherBucket(SourceBucket);
            }
        }
コード例 #3
0
ファイル: FrmFilter.cs プロジェクト: hpinsley/DiskView
        public FrmFilter(BucketManager TopBucketManager)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //Initialize our bucket manager with a clone of the one passed to us.
            //That way if he cancels, we have not touched the callers.  The
            //caller should use our BucketMgr property to obtain the filtered
            //buckets should we set our DialogResult to OK.

            this._bucketMgr = (BucketManager) TopBucketManager.Clone();
            FillListBox();
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
コード例 #4
0
ファイル: BucketManager.cs プロジェクト: hpinsley/DiskView
 /// <summary>
 /// Set our filters (i.e. the IncludeInTotals flags of our buckets
 /// to match that of the SourceManager.  We expect that our buckets
 /// match (that the SourceManager was probably set from our clone, but
 /// that is not a requirement of calling this method.
 /// </summary>
 /// <param name="SourceManager"></param>
 public void SetFiltersLike(BucketManager SourceManager)
 {
     Bucket Target;
     foreach(Bucket B in SourceManager) {
         Target = this.FindBucket(B.FileType);
         if (Target != null)
             Target.IncludedInTotals = B.IncludedInTotals;
     }
 }
コード例 #5
0
ファイル: Traverser.cs プロジェクト: hpinsley/DiskView
 public void SetFiltersLike(BucketManager BMgr)
 {
     this.RootFolder.Visit2(new FolderVisitor2(this.SetFiltersForFolderLike), BMgr);
 }