Пример #1
0
        /// <summary>
        /// 将设置信息反映回来。
        /// </summary>
        void sForm_SettingValueChangedEventHandler(object sender, MySettingValueEventArgs e)
        {
            BorderImage.Opacity       = e.OpacityValue;
            borderOpacity             = BorderImage.Opacity;
            showSpectrum              = (bool)e.ShowSpectrum;
            autoLoadLyricFile         = (bool)e.AutoLoadLyricFile;
            saveConfig                = (bool)e.SaveConfig;
            saveSongList              = (bool)e.SaveSongList;
            rememberExitPosition      = (bool)e.RememberExitPosition;
            dskLrcFontSize            = e.DesktopLyricFontSize;
            dskLrcFontFamily          = e.DesktopLyricFontFamily;
            dskLrcFontStyle           = e.DesktopLyricFontType;
            nowPlayingSong.Foreground = e.SongNameForeColor;
            WindowTitle.Foreground    = e.WindowTitleForeColor;
            //preLyricTextBlock.Foreground = e.UnplayedLyricForeColor;
            //nowLyricTextBlock.Foreground = e.PlayedLyricForeColor;
            unplayedForecolor = GetColorFromBrush(e.UnplayedLyricForeColor);
            playedForecolor   = GetColorFromBrush(e.PlayedLyricForeColor);

            titleTB.Foreground      = e.ListBoxTitleForeColor;
            songListLB.Foreground   = e.UnselectedItemForeColor;
            dskLrcPlayedForecolor   = e.DesktopPlayedLyricForeColor;
            dskLrcUnplayedForecolor = e.DesktopUnplayedLyricForeColor;
            //主动改变桌面歌词
            if (dskLrc != null && dskLrc.IsVisible)
            {
                dskLrc.ChangeFontSize(dskLrcFontSize);
                dskLrc.ChangeFontForeColor(dskLrcPlayedForecolor, dskLrcUnplayedForecolor);
                //dskLrc.ChangeFontFamily(dskLrcFontFamily);
                //dskLrc.ChangeFontStyle(dskLrcFontStyle);
            }
            //改变歌词前景色
            preLyricTextBlock.Foreground = GetBrushFromString(unplayedForecolor.ToString());
            nowLyricTextBlock.Foreground = preLyricTextBlock.Foreground;
            //判断编码方式改变没有,如果改变。则重新加载歌词
            if (encoding != e.FileEncoding)
            {
                encoding = e.FileEncoding;
                lyric    = null;
                InitializeMyLyric(lyricFilePath, "");
            }
            //保存配置。
            SaveApplicationSettings();
        }
Пример #2
0
 void SettingForm_SettingValueChangedEventHandler(object sender, MySettingValueEventArgs e)
 {
 }