Пример #1
0
        /// <summary>
        /// Check AddPlaylistDialog.
        /// </summary>
        /// <param name="helper">Dialog helper to check values.</param>
        /// <returns>true if values valid; otherwise false.</returns>
        protected bool CheckPlaylistDialog(PlaylistDialogHelper helper)
        {
            if (!helper.Validate())
            {
                // return false to keep dialog open
                return(false);
            }

            AddPlaylist(helper.Name.text);

            // return true to close dialog
            return(true);
        }
Пример #2
0
        /// <summary>
        /// Check EditPlaylistDialog and change dialog name if valid.
        /// </summary>
        /// <param name="helper">Dialog helper to check values.</param>
        /// <returns>true if values valid; otherwise false.</returns>
        protected bool CheckPlaylistDialog(PlaylistDialogHelper helper)
        {
            if (!helper.Validate())
            {
                // return false to keep dialog open
                return(false);
            }

            // change name in node
            OrderLine.Item.Name = helper.Name.text;
            // change displayed name
            Name.text = helper.Name.text;

            // return true to close dialog
            return(true);
        }