Exemple #1
0
 /// <summary>
 /// Constructor for TV rename/missing check where file was not found.
 /// </summary>
 /// <param name="status">Status of rename/missing</param>
 /// <param name="action">action to be performed</param>
 /// <param name="episode">TV episode for file</param>
 /// <param name="episode2">2nd Tv epsidoe for file</param>
 /// <param name="category">file category</param>
 public OrgItem(OrgStatus status, OrgAction action, TvEpisode episode, TvEpisode episode2, FileCategory category, OrgFolder scanDir, TvEpisodeTorrent torrentEp)
     : this()
 {
     this.Status = status;
     this.Progress = 0;
     this.Action = action;
     this.SourcePath = string.Empty;
     if (action == OrgAction.Delete)
         this.DestinationPath = FileHelper.DELETE_DIRECTORY;
     else
         this.DestinationPath = string.Empty;
     this.TvEpisode = new TvEpisode(episode);
     if (episode2 != null)
         this.TvEpisode2 = new TvEpisode(episode2);
     this.TorrentTvEpisode = torrentEp;
     this.Category = category;
     this.Enable = action == OrgAction.Torrent;
     this.ScanDirectory = scanDir;
     this.Number = 0;
 }
        private void WriteAttributes(XmlWriter w, bool newGuids = false)
        {
            if (newGuids)
            {
                w.WriteAttributeString("Id", Guid.NewGuid().ToString());
            }
            else
            {
                w.WriteAttributeString("Id", Id.ToString());
            }

            w.WriteAttributeString("Order", Order.ToString());
            w.WriteAttributeString("Field", ConditionName);
            w.WriteAttributeString("Comparison", Comparison);
            if (Description.HasValue())
            {
                w.WriteAttributeString("Description", Description);
            }
            if (PreviousName.HasValue())
            {
                w.WriteAttributeString("PreviousName", Description);
            }
            if (TextValue.HasValue())
            {
                w.WriteAttributeString("TextValue", TextValue);
            }
            if (DateValue.HasValue)
            {
                w.WriteAttributeString("DateValue", DateValue.ToString());
            }
            if (CodeIdValue.HasValue())
            {
                w.WriteAttributeString("CodeIdValue", CodeIdValue);
            }
            if (StartDate.HasValue)
            {
                w.WriteAttributeString("StartDate", StartDate.ToString());
            }
            if (EndDate.HasValue)
            {
                w.WriteAttributeString("EndDate", EndDate.ToString());
            }
            if (Program > 0)
            {
                w.WriteAttributeString("Program", Program.ToString());
            }
            if (Division > 0)
            {
                w.WriteAttributeString("Division", Division.ToString());
            }
            if (Organization > 0)
            {
                w.WriteAttributeString("Organization", Organization.ToString());
            }
            if (OrgType > 0)
            {
                w.WriteAttributeString("OrgType", OrgType.ToString());
            }
            if (Days > 0)
            {
                w.WriteAttributeString("Days", Days.ToString());
            }
            if (Quarters.HasValue())
            {
                w.WriteAttributeString("Quarters", Quarters);
            }
            if (Tags.HasValue())
            {
                w.WriteAttributeString("Tags", Tags);
            }
            if (Schedule != 0)
            {
                w.WriteAttributeString("Schedule", Schedule.ToString());
            }
            if (Campus > 0)
            {
                w.WriteAttributeString("Campus", Campus.ToString());
            }
            if (ConditionName != "FamilyHasChildrenAged")
            {
                Age = null;
            }
            if (Age.HasValue)
            {
                w.WriteAttributeString("Age", Age.ToString());
            }
            if (SavedQuery.HasValue())
            {
                w.WriteAttributeString("SavedQueryIdDesc", SavedQuery);
            }
            if (OnlineReg.HasValue)
            {
                w.WriteAttributeString("OnlineReg", OnlineReg.ToString());
            }
            if (OrgStatus.HasValue)
            {
                w.WriteAttributeString("OrgStatus", OrgStatus.ToString());
            }
            if (OrgType2.HasValue)
            {
                w.WriteAttributeString("OrgType2", OrgType2.ToString());
            }
            if (OrgName.HasValue())
            {
                w.WriteAttributeString("OrgName", OrgName);
            }
        }
Exemple #3
0
 /// <summary>
 /// Constructor for TV rename/missing check where file was found.
 /// </summary>
 /// <param name="status">Status of rename/missing</param>
 /// <param name="action">action to be performed</param>
 /// <param name="file">source path</param>
 /// <param name="destination">destination path</param>
 /// <param name="episode">TV episode for file</param>
 /// <param name="episode2">2nd Tv epsidoe for file</param>
 /// <param name="category">file category</param>
 public OrgItem(OrgStatus status, OrgAction action, string file, string destination, TvEpisode episode, TvEpisode episode2, FileCategory category, OrgFolder scanDir)
     : this(action, file, destination, episode, episode2, category, scanDir)
 {
     this.Status = status;
     this.Progress = 0;
 }