Example #1
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var shown = (bool)value;

            if (System.Convert.ToString(parameter) == "string")
            {
                return(shown ? I18nUtil.GetString("ui-closeDesktopLyric") : I18nUtil.GetString("ui-openDesktopLyric"));
            }
            else if (System.Convert.ToString(parameter) == "bool")
            {
                return(shown);
            }
            else
            {
                return(null);
            }
        }
Example #2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var locked = (bool)value;

            return(locked ? I18nUtil.GetString("ui-unlockLyric") : I18nUtil.GetString("ui-lockLyric"));
        }