Пример #1
0
        private void ctlFormat_LostFocus(object sender, RoutedEventArgs e)
        {
            this.ctlFormat.IsUndoEnabled = false;
            this.ctlFormat.IsUndoEnabled = true;

            if (string.IsNullOrWhiteSpace(this.ctlFormat.Text))
            {
                Globals.Instance.PublishFormat = this.ctlFormat.Text = SongInfo.defaultFormat;
                Globals.Instance.SaveSettings();
            }
            else
            {
                if (SongInfo.CheckFormat(this.ctlFormat.Text))
                {
                    this.ctlFormat.Foreground = this.m_formatOK;

                    Globals.Instance.PublishFormat = this.ctlFormat.Text;
                    Globals.Instance.SaveSettings();
                }
                else
                {
                    this.ctlFormat.Foreground = this.m_formatErr;
                }
            }
        }