//transfers an animated motif from remote to local file system
 public TransferPacket(AnimatedMotif motif)
 {
     ItemID     = motif.ID;
     Parent     = motif;
     SourcePath = Settings.FtpUserSubdirectory + "/" + motif.AccountID + "/motifs/" + motif.ID + motif.Extension;
     TargetPath = Path.Combine(Settings.LocalProductionPath, motif.ID.ToString());
     Type       = TransferType.DownloadAnimatedMotif;
     LoginData  = Settings.MasterLogin;
 }
        private static AnimatedMotif ParseAnimatedMotif(Dictionary <string, string> motifDict)
        {
            AnimatedMotif result = new AnimatedMotif();

            result.ID        = Convert.ToInt32(motifDict["ID"]);
            result.AccountID = Convert.ToInt32(motifDict["AccountID"]);
            result.Extension = Convert.ToString(motifDict["Extension"]);

            return(result);
        }
        public static List <AnimatedMotif> ParseAnimatedMotifList(List <Dictionary <string, string> > motifDict)
        {
            List <AnimatedMotif> result = new List <AnimatedMotif>();

            foreach (Dictionary <string, string> animatedMotif in motifDict)
            {
                AnimatedMotif newAnimatedMotif = ParseAnimatedMotif(animatedMotif);
                if (result.Any(item => item.ID == newAnimatedMotif.ID) == false)
                {
                    result.Add(newAnimatedMotif);
                }
            }

            return(result);
        }
Esempio n. 4
0
 public AnimatedMotifWorker(AnimatedMotif motif)
 {
     this.motif = motif;
 }
 public AnimatedMotifDecoder(AnimatedMotif motif)
 {
     this.motif = motif;
 }