コード例 #1
0
 void Instance_PrefetchCompleted(Bright.Data.GroupingElement obj)
 {
     if (obj == curElem)
     {
         this.Invoke(new Action(Refresh));
     }
 }
コード例 #2
0
ファイル: OperationPackager.cs プロジェクト: n0tzy/Typict
        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);
        }
コード例 #3
0
ファイル: OperationView.cs プロジェクト: misodengaku/Typict
 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) { }
 }
コード例 #4
0
ファイル: OperationPackager.cs プロジェクト: karno/Typict
 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;
 }