Пример #1
0
        private void Apply()
        {
            if (_node == null)
            {
                return;
            }

            string s1 = txtEditor.Text;
            string s2 = listBox1.SelectedItem as string;

            if ((s2 == null) || (s1 == s2))
            {
                return;
            }

            int index = listBox1.SelectedIndex;

            if (index < 0)
            {
                return;
            }

            _node._strings[index] = s1;
            _node.SignalPropertyChange();
            listBox1.Items[index] = s1;
        }
Пример #2
0
        public void WriteSong(Song song)
        {
            if (song.InfoPacIndex.HasValue)
            {
                if (mumMsbn != null)
                {
                    mumMsbn._strings[song.InfoPacIndex.Value] = song.DefaultName;
                    mumMsbn.SignalPropertyChange();
                }

                if (infoMsbn != null)
                {
                    infoMsbn._strings[song.InfoPacIndex.Value] = song.DefaultName;
                    infoMsbn.SignalPropertyChange();
                }

                if (trngMsbn != null)
                {
                    trngMsbn._strings[song.InfoPacIndex.Value] = song.DefaultName;
                    trngMsbn.SignalPropertyChange();
                }
            }

            if (gctCsv != null)
            {
                if (song.DefaultVolume.HasValue)
                {
                    gctCsv.Settings[song.ID] = song.DefaultVolume.Value;
                }
                else if (gctCsv.Settings.ContainsKey(song.ID))
                {
                    gctCsv.Settings.Remove(song.ID);
                }
            }
        }