src/TF2HUD.Editor/Classes/HudDirectory.cs
/// <summary>
/// Loop until the user provides a valid tf/custom directory, unless they cancel out.
/// </summary>
/// <param name="browser"></param>
/// <returns>The selected directory.</returns>
Loop until the user provides a valid tf/custom directory, unless they cancel out.
Loop until the user provides a valid tf / custom directory unless they cancel out .
private string GetSelectedDirectory(FolderBrowserDialog browser)
        {
            while (!IsValidDirectory(browser.SelectedPath))
            {
                if (browser.ShowDialog() != DialogResult.OK)
                {
                    return null;
                }
                if (!IsValidDirectory(browser.SelectedPath))
                {
                    _notifier.ShowMessageBox(MessageBoxImage.Error, Properties.Resources.info_path_invalid);
                    return null;
                }
                return browser.SelectedPath;
            }
            return null;
        }
private string GetSelectedDirectory ( FolderBrowserDialog browser ) { while ( ! IsValidDirectory ( browser . SelectedPath ) ) { if ( browser . ShowDialog ( ) != DialogResult . OK ) { return null ; } if ( ! IsValidDirectory ( browser . SelectedPath ) ) { _notifier . ShowMessageBox ( MessageBoxImage . Error , Properties . Resources . info_path_invalid ) ; return null ; } return browser . SelectedPath ; } return null ; }
Loop until the user provides a valid tf/custom directory, unless they cancel out.
Loop until the user provides a valid tf / custom directory unless they cancel out .
The selected directory.
The selected directory .
browser
FolderBrowserDialog
None