Beispiel #1
0
        public void Save(string rank_filename, HoseiKind hosei_kind, int mylist_rate, IFilterManager filter)
        {
            StringBuilder buff_notfiltered = new StringBuilder();
            StringBuilder buff_filtered    = new StringBuilder();
            int           rank_notfiltered = 1;
            int           rank_filtered    = 1;

            for (int i = 0; i < video_list_.Count; ++i)
            {
                filter.DoEffect(video_list_[i]);
                if (filter.IsThrough(video_list_[i]))
                {
                    if (custom_format_.IsUsingCustomFormat())
                    {
                        buff_notfiltered.Append(custom_format_.VideoToString(video_list_[i], rank_notfiltered));
                    }
                    else
                    {
                        buff_notfiltered.Append(video_list_[i].ToStringWithRank(rank_notfiltered, hosei_kind, mylist_rate));
                    }
                    ++rank_notfiltered;
                    buff_notfiltered.Append("\r\n");
                }
                else
                {
                    if (custom_format_.IsUsingCustomFormat())
                    {
                        buff_filtered.Append(custom_format_.VideoToString(video_list_[i], rank_filtered));
                    }
                    else
                    {
                        buff_filtered.Append(video_list_[i].ToStringWithRank(rank_filtered, hosei_kind, mylist_rate));
                    }
                    ++rank_filtered;
                    buff_filtered.Append("\r\n");
                }
            }
            IJFile.Write(rank_filename, buff_notfiltered.ToString());

            if (filter.IsOutputFilteredVideo())
            {
                string rank_str = buff_filtered.ToString();
                if (rank_str != "")
                {
                    IJFile.Write(Path.GetDirectoryName(rank_filename) + "\\" + Path.GetFileNameWithoutExtension(rank_filename) +
                                 "_filter" + Path.GetExtension(rank_filename), rank_str);
                }
            }
        }
Beispiel #2
0
        public string ToString(HoseiKind hosei_kind, int mylist_rate, IFilterManager filter)
        {
            StringBuilder buff_notfiltered = new StringBuilder();
            int           rank_notfiltered = 1;

            for (int i = 0; i < video_list_.Count; ++i)
            {
                filter.DoEffect(video_list_[i]);
                if (filter.IsThrough(video_list_[i]))
                {
                    if (custom_format_.IsUsingCustomFormat())
                    {
                        buff_notfiltered.Append(custom_format_.VideoToString(video_list_[i], rank_notfiltered));
                    }
                    else
                    {
                        buff_notfiltered.Append(video_list_[i].ToStringWithRank(rank_notfiltered, hosei_kind, mylist_rate));
                    }
                    ++rank_notfiltered;
                    buff_notfiltered.Append("\r\n");
                }
            }
            return(buff_notfiltered.ToString());
        }