internal bool LoadReferenceFile(Beatmap map)
        {
            if (Compose.ReferenceHitObjectManager != null)
            {
                Compose.ReferenceHitObjectManager.Dispose();
                Compose.ReferenceHitObjectManager = null;
            }

            try
            {
                if (map == null)
                {
                    //Clear the reference sprites
                    Compose.ReferenceChanged();
                    return(false);
                }

                Compose.ReferenceHitObjectManager = new HitObjectManagerEditor();
                Compose.ReferenceHitObjectManager.SetBeatmap(map, Mods.None);
                Compose.ReferenceHitObjectManager.Load(true);
                Compose.ReferenceHitObjectManager.ManiaStage = new StageMania(Compose.ReferenceHitObjectManager);
                Compose.ReferenceChanged();
                return(true);
            }
            catch (Exception e)
            {
                Compose.ReferenceChanged();
                return(false);
            }
        }