Ejemplo n.º 1
0
        public int CompareTo(VariableNode otherNode)
        {
            string thisName  = Text;
            string otherName = otherNode.Text;

            if (thisName == otherName)
            {
                return(0);
            }
            if (thisName.Length > 0 && thisName[0] == '_')
            {
                thisName = thisName.Substring(1);
            }
            if (otherName.Length > 0 && otherName[0] == '_')
            {
                otherName = otherName.Substring(1);
            }
            int result = LogicalComparer.Compare(thisName, otherName);

            if (result != 0)
            {
                return(result);
            }
            return(m_Variable.getName().length() > 0 && m_Variable.getName().startsWith("_") ? 1 : -1);
        }
Ejemplo n.º 2
0
        public int CompareTo(DataNode otherNode)
        {
            String thisName  = m_Value.getName();
            String otherName = otherNode.m_Value.getName();

            if (thisName == otherName)
            {
                return(0);
            }
            if (thisName.Length > 0 && thisName[0] == '_')
            {
                thisName = thisName.Substring(1);
            }
            if (otherName.Length > 0 && otherName[0] == '_')
            {
                otherName = otherName.Substring(1);
            }
            int result = LogicalComparer.Compare(thisName, otherName);

            if (result != 0)
            {
                return(result);
            }
            return(m_Value.getName().Length > 0 && m_Value.getName()[0] == '_' ? 1 : -1);
        }
Ejemplo n.º 3
0
        public int CompareTo(DataNode otherNode)
        {
            String thisName  = Text;
            String otherName = otherNode.Text;

            if (thisName == otherName)
            {
                return(0);
            }
            if (thisName.Length > 0 && thisName[0] == '_')
            {
                thisName = thisName.Substring(1);
            }
            if (otherName.Length > 0 && otherName[0] == '_')
            {
                otherName = otherName.Substring(1);
            }
            int result = LogicalComparer.Compare(thisName, otherName);

            if (result != 0)
            {
                return(result);
            }
            return(m_Value.Name.Length > 0 && m_Value.Name.StartsWith("_") ? 1 : -1);
        }
Ejemplo n.º 4
0
        public ComposerPage()
        {
            InitializeComponent();

            _logicalComparer = new LogicalComparer();
            _classicalMusicContext = new ClassicalMusicContext(new Uri("http://www.harrenstein.com/ClassicalMusic/ClassicalMusic.svc"));
            _classicalMusicContext.MergeOption = MergeOption.OverwriteChanges;
            _sampleDictionary = new Dictionary<IWaveProvider, Sample>();
            _mp3Player = new Mp3Player();

            _mp3Player.CurrentTimeChanged += Mp3Player_CurrentTimeChanged;
            _mp3Player.TotalTimeChanged += Mp3Player_TotalTimeChanged;
            _mp3Player.TrackChanged += Mp3Player_TrackChanged;
            _mp3Player.PlaybackStateChanged += Mp3Player_PlaybackStateChanged;
            _mp3Player.VolumeChanged += Mp3Player_VolumeChanged;
            _mp3Player.IsMutedChanged += Mp3Player_IsMutedChanged;
            _mp3Player.CanPlayChanged += Mp3Player_CanPlayChanged;
            _mp3Player.CanSkipBackChanged += Mp3Player_CanSkipBackChanged;
            _mp3Player.CanSkipForwardChanged += Mp3Player_CanSkipForwardChanged;

            Loaded += ComposerPage_Loaded;
        }