Ejemplo n.º 1
0
    /// <summary>
    /// Shows a Yes/No dialog.
    /// </summary>
    /// <param name="displayOptions">True if the options should be displayed.</param>
    /// <param name="ignoreRecent">True if the recent projects should be ignored.</param>
    /// <returns>True if Yes</returns>
    public static bool Ask(bool displayOptions, out bool ignoreRecent)
    {
        var dialog = new CacheDialog
        {
            DisplayOptions = displayOptions
        };
        var result = dialog.ShowDialog();

        ignoreRecent = dialog.IgnoreRecent;

        return(result.HasValue && result.Value);
    }