Exemple #1
0
 void Instance_PrefetchCompleted(Bright.Data.GroupingElement obj)
 {
     if (obj == curElem)
     {
         this.Invoke(new Action(Refresh));
     }
 }
Exemple #2
0
        public static Data.Operation Load(string source)
        {
            Operate op = null;
            var     bf = new BinaryFormatter();

            using (FileStream fs = new FileStream(source, FileMode.Open, FileAccess.Read))
            {
                op = bf.Deserialize(fs) as Operate;
            }
            var newop = new Data.Operation(op.Index, op.RewindArray);

            foreach (var dest in op.DestArray)
            {
                newop.Data.AddDestination(dest.LinkKey, new Bright.Data.Destination(dest.LinkKey, dest.Dest));
            }
            foreach (var elem in op.ElementArray)
            {
                var ne = new Bright.Data.GroupingElement(elem.Source)
                {
                    DistributionMode = elem.DistributionMode
                };
                foreach (var dpath in elem.Dest)
                {
                    ne.Destinations.Add(new Bright.Data.GroupingElement.DestData(dpath));
                }
                newop.Data.AddElement(ne);
            }
            return(newop);
        }
Exemple #3
0
 void Instance_PrefetchThumbnailCompleted(Bright.Data.GroupingElement obj)
 {
     try
     {
         if (Core.CurrentOperation != null &&
             elemList.IsVisible(Core.CurrentOperation.Data.IndexOfElement(obj)))
         {
             this.Invoke(new Action(() => this.Refresh()));
         }
     }
     catch (InvalidOperationException) { }
 }
Exemple #4
0
 public static Data.Operation Load(string source)
 {
     Operate op = null;
     var bf = new BinaryFormatter();
     using (FileStream fs = new FileStream(source, FileMode.Open, FileAccess.Read))
     {
         op = bf.Deserialize(fs) as Operate;
     }
     var newop = new Data.Operation(op.Index, op.RewindArray);
     foreach (var dest in op.DestArray)
     {
         newop.Data.AddDestination(dest.LinkKey, new Bright.Data.Destination(dest.LinkKey, dest.Dest));
     }
     foreach (var elem in op.ElementArray)
     {
         var ne = new Bright.Data.GroupingElement(elem.Source) { DistributionMode = elem.DistributionMode };
         foreach (var dpath in elem.Dest)
             ne.Destinations.Add(new Bright.Data.GroupingElement.DestData(dpath));
         newop.Data.AddElement(ne);
     }
     return newop;
 }