예제 #1
0
        /// <summary>
        /// Reads <see cref="TagType.OGG"/> tags from a <paramref name="Channel"/>.
        /// </summary>
        public bool ReadOgg(int Channel)
        {
            var ptr = Bass.ChannelGetTags(Channel, TagType.OGG);

            if (ptr == IntPtr.Zero)
            {
                return(false);
            }

            foreach (var otherTag in ReadUsingLookupTable(Extensions.ExtractMultiStringUtf8(ptr), LookupTables.Ogg, '='))
            {
                Other.Add(otherTag.Key, otherTag.Value);
            }

            if (string.IsNullOrWhiteSpace(Encoder))
            {
                var encoderPtr = Bass.ChannelGetTags(Channel, TagType.OggEncoder);
                if (encoderPtr != IntPtr.Zero)
                {
                    Encoder = Extensions.PtrToStringUtf8(encoderPtr);
                }
            }

            return(true);
        }
예제 #2
0
        /// <summary>
        /// Reads <see cref="TagType.MP4"/> tags from a <paramref name="Channel"/>.
        /// </summary>
        public bool ReadMp4(int Channel)
        {
            var ptr = Bass.ChannelGetTags(Channel, TagType.MP4);

            if (ptr == IntPtr.Zero)
                return false;

            foreach (var otherTag in ReadUsingLookupTable(Extensions.ExtractMultiStringUtf8(ptr), LookupTables.Mp4, '='))
                Other.Add(otherTag.Key, otherTag.Value);
            
            return true;
        }
예제 #3
0
        /// <summary>
        /// Reads <see cref="TagType.RiffInfo"/> tags from a <paramref name="Channel"/>.
        /// </summary>
        public bool ReadRiffInfo(int Channel)
        {
            var ptr = Bass.ChannelGetTags(Channel, TagType.RiffInfo);

            if (ptr == IntPtr.Zero)
            {
                return(false);
            }

            foreach (var otherTag in ReadUsingLookupTable(Extensions.ExtractMultiStringAnsi(ptr), LookupTables.RiffInfo, '='))
            {
                Other.Add(otherTag.Key, otherTag.Value);
            }

            return(true);
        }
예제 #4
0
        /// <summary>
        /// Reads <see cref="TagType.ID3v2"/> tags from a <paramref name="Channel"/>.
        /// </summary>
        public bool ReadID3v2(int Channel)
        {
            var ptr = Bass.ChannelGetTags(Channel, TagType.ID3v2);

            if (ptr == IntPtr.Zero)
                return false;

            var id3V2 = new ID3v2Tag(ptr);

            foreach (var frame in id3V2.TextFrames)
                if (!SetTagUsingLookupTable(frame.Key, frame.Value, LookupTables.Id3v2))
                    Other.Add(frame.Key, frame.Value);

            Pictures.AddRange(id3V2.PictureFrames);

            return true;
        }
예제 #5
0
        public void Set(TrelloCard card, CardStatus status, bool propagateToNext = false)
        {
            if (!BoardAnalysis.Cards.Contains(card))
            {
                BoardAnalysis.Cards.Add(card);
            }
            switch (status)
            {
            case CardStatus.Other:
                if (Other.Contains(card))
                {
                    break;
                }

                Other.Add(card);
                removeFrom(card, Doing, Done);
                break;

            case CardStatus.Doing:
                if (Doing.Contains(card))
                {
                    break;
                }

                Doing.Add(card);
                removeFrom(card, Done, Other);
                break;

            case CardStatus.Done:
                if (Done.Contains(card))
                {
                    break;
                }

                Done.Add(card);
                removeFrom(card, Other, Doing);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(status), status, null);
            }
            if (propagateToNext)
            {
                ((PeriodCardsStatus)Next(false))?.Set(card, status);
            }
        }
예제 #6
0
    void AjustChildren()
    {
        targetList.Clear();
        var meshRenderers = gameObject.FindComponentsInChildren <MeshRenderer>();

        foreach (var item in meshRenderers)
        {
            targetList.Add(new GameObjectPosition(item.gameObject));
        }
        foreach (var target in targetList)
        {
            bool r = AjustModel(target);
            if (r == false)
            {
                Other.Add(target.target);
            }
        }
        targetList.Sort();
    }
        public OBO_Header(List <KeyValuePair <string, string> > data = null)
        {
            if (data != null)
            {
                foreach (var datum in data)
                {
                    switch (datum.Key.ToLower())
                    {
                    case "format-version":
                        FormatVersion = datum.Value;
                        break;

                    case "data-version":
                        DataVersion = datum.Value;
                        break;

                    case "version":
                        Version = datum.Value;
                        break;

                    case "date":
                        Date = datum.Value;
                        break;

                    case "saved-by":
                        SavedBy = datum.Value;
                        break;

                    case "auto-generated-by":
                        AutoGeneratedBy = datum.Value;
                        break;

                    case "import":
                        Import.Add(datum.Value);
                        break;

                    case "subsetdef":
                        SubsetDef.Add(datum.Value);
                        break;

                    case "synonymtypedef":
                        SynonymTypeDef.Add(datum.Value);
                        break;

                    case "default-namespace":
                        DefaultNamespace = datum.Value;
                        break;

                    case "idspace":
                        IdSpace.Add(datum.Value);
                        break;

                    case "default-relationship-id-prefix":
                        DefaultRelationshipIdPrefix.Add(datum.Value);
                        break;

                    case "id-mapping":
                        IdMapping.Add(datum.Value);
                        break;

                    case "remark":
                        Remark.Add(datum.Value);
                        break;

                    default:
                        Other.Add(datum);
                        break;
                    }
                }
            }
        }
예제 #8
0
        public override Task DivideLine(string line)
        {
            if (line.Contains(" CITC "))
            {
                CitC.Add(line);
            }

            else if (line.Contains(" LOGIN: "******" LOGIN MISC: "))
            {
                LoginMisc.Add(line);
            }
            else if (line.Contains(" QUIT MISC: "))
            {
                QuitMisc.Add(line);
            }

            else if (line.Contains(" (AA)(BAN) "))
            {
                Bans.Add(line);
            }
            else if (line.Contains(" (AA)(MUTE) "))
            {
                Mutes.Add(line);
            }
            else if (line.Contains(" (AA)(JAIL) "))
            {
                Jails.Add(line);
            }
            else if (line.Contains(" (AA)(CONTACTADMIN) "))
            {
                Cad.Add(line);
            }
            else if (line.Contains(" (AA)(SUPPORT) "))
            {
                Support.Add(line);
            }

            else if (line.Contains(" opened '") && line.Contains(" ms"))
            {
                LogsFetched.Add(line);
            }
            else if (line.Contains(" [CM] ") && line.Contains(" set "))
            {
                Reports.Add(line);
            }
            else if (line.Contains("[Complaint ID") && line.Contains(" replied with "))
            {
                Reports.Add(line);
            }
            else if (line.Contains(" warped to ") || line.Contains(" WL: "))
            {
                if (line.Contains("WL: 0") || line.Contains("with 0 stars Dim: 0"))
                {
                    PossibleAbuse.Add(line);
                }
                else
                {
                    RegisteredAbuse.Add(line);
                }
            }

            /*else if (line.Contains(" warped to ") && !line.Contains(" WL: 0") && !line.Contains(" (EM) "))
             *  RegisteredAbuse.Add(line);
             * else if (line.Contains(" warped to ") && line.Contains(" WL: 0") && !line.Contains(" (EM) "))
             *  PossibleAbuse.Add(line);
             * else if (line.Contains(" ST ") && (!line.Contains("from 0") && line.Contains("wanted points.")))
             *  RegisteredAbuse.Add(line);*/
            else if (line.Contains(" ST ") && line.Contains("from 0 wanted points."))
            {
                PossibleAbuse.Add(line);
            }
            else if (line.Contains("abuse") ||
                     line.Contains("recommendation") ||
                     line.Contains("leak") ||
                     line.Contains("bias") ||
                     line.Contains("accept") ||
                     line.Contains("jcm") ||
                     line.Contains("rcm") ||
                     line.Contains("scm")
                     )
            {
                PossibleAbuse.Add(line);
            }

            else if (line.Contains("object. ID:"))
            {
                DutyRelated.Add(line);
            }
            else if (line.Contains("changed account:"))
            {
                DutyRelated.Add(line);
            }
            else if (line.Contains("changed the password of account"))
            {
                DutyRelated.Add(line);
            }
            else if (line.Contains("checked the PIN code of account"))
            {
                DutyRelated.Add(line);
            }
            else if (line.Contains("zone 0 p"))
            {
                DutyRelated.Add(line);
            }

            else if (line.Contains(" (PP) "))
            {
                PendingPunishments.Add(line);
            }
            else
            {
                Other.Add(line);
            }
            return(Task.CompletedTask);
        }