Engines/FlatRedBallXNA/FlatRedBall/Gui/FileWindow.cs
/// <summary>
/// If the user selects an item in the mFileTypesBox 
/// </summary>
/// <param name="callingWindow"></param>
If the user selects an item in the mFileTypesBox
If the user selects an item in the mFileTypesBox
private void OnFileTypeChange(Window callingWindow)
        {
            this.mFileTypes.Clear();
            if (mFileTypeBox.SelectedObject != null)
            {
                string selectedText = mFileTypeBox.SelectedObject as string;
                string extension = FileManager.GetExtension(selectedText);
                if (string.IsNullOrEmpty(extension) && !string.IsNullOrEmpty(selectedText))
                {
                    this.mFileTypes.Add(selectedText);                
                }
                else
                {
                    this.mFileTypes.Add(extension);
                }
                if (FileWindow.sLastDirectoriesViewed.ContainsKey(mFileTypes[0]))
                {
                    SetDirectory( sLastDirectoriesViewed[mFileTypes[0]]);
                }
                else
                {
                    SetDirectory(mDirectory);
                }
            }
        }
private void OnFileTypeChange ( Window callingWindow ) { this . mFileTypes . Clear ( ) ; if ( mFileTypeBox . SelectedObject != null ) { string selectedText = mFileTypeBox . SelectedObject as string ; string extension = FileManager . GetExtension ( selectedText ) ; if ( string . IsNullOrEmpty ( extension ) && ! string . IsNullOrEmpty ( selectedText ) ) { this . mFileTypes . Add ( selectedText ) ; } else { this . mFileTypes . Add ( extension ) ; } if ( FileWindow . sLastDirectoriesViewed . ContainsKey ( mFileTypes [ 0 ] ) ) { SetDirectory ( sLastDirectoriesViewed [ mFileTypes [ 0 ] ] ) ; } else { SetDirectory ( mDirectory ) ; } } }
If the user selects an item in the mFileTypesBox
If the user selects an item in the mFileTypesBox
// programs may not be using the dropdown.  If not, then it will be empty // but this method will be called if the user clicks on the empty list box. // The combo box stores the file types.  mFileTypes is only the current types that are // being shown.
callingWindow
Window
None