Exemplo n.º 1
0
 private static bool FgInfosAreDifferent(FgInfo[] oldInfos, FgInfo[] newInfos)
 {
     if (((oldInfos == null) && (newInfos != null)) || ((oldInfos != null) && (newInfos == null))) return true;
     if (oldInfos.Length != newInfos.Length) return true;
     for (int i = 0; i < oldInfos.Length; i++)
     {
         if (oldInfos[i].Id != newInfos[i].Id) return true;
         if (oldInfos[i].Ignore != newInfos[i].Ignore) return true;
         if (oldInfos[i].IsActive != newInfos[i].IsActive) return true;
         if (oldInfos[i].Muted != newInfos[i].Muted) return true;
         if (oldInfos[i].Vol != newInfos[i].Vol) return true;
     }
     return false;
 }
Exemplo n.º 2
0
        private static FgInfo[] CollectFgInfo()
        {
            List<FgInfo> fgInfos = new List<FgInfo>();
            for (int i = 0; i < FgMusics.Length; i++)
            {
                FgInfo fgInfo = new FgInfo(FgMusics[i].Id);
                FgMusicVol.TryGetValue(FgMusics[i].Id, out fgInfo.Vol);
                FgMusicMuted.TryGetValue(FgMusics[i].Id, out fgInfo.Muted);
                FgMusicIsActive.TryGetValue(FgMusics[i].Id, out fgInfo.IsActive);
                FgMusicIgnore.TryGetValue(FgMusics[i].Id, out fgInfo.Ignore);
                fgInfos.Add(fgInfo);
            }

            return fgInfos.ToArray();
        }