Engines/FlatRedBallXNA/FlatRedBall/Gui/FileWindow.cs
/// <summary>
/// Sets the filetype that the FileWindow can view. 
/// </summary>
/// <remarks>
/// This method also clears all types.  Setting a filter then calling SetFileType clears the filter.
/// 
/// Setting the filetype as "graphic" sets all of the file types that FRB can load.
/// <seealso cref="FlatRedBall.Gui.FileWindow.Filter"/>
/// </remarks>
/// <param name="FileType">The file types specified by extension.  </param>
Sets the filetype that the FileWindow can view.
Sets the filetype that the FileWindow can view .
public void SetFileType(string FileType)
        {
            mFileTypes.Clear();
            if (FileType == "graphic")
            {
                AddFileType("bmp");
                AddFileType("png");
                AddFileType("jpg");
                AddFileType("tga");
                AddFileType("dds");
                AddFileType("gif");
            }
            else if (FileType == "graphic and animation")
            {
                AddFileType("bmp");
                AddFileType("png");
                AddFileType("jpg");
                AddFileType("tga");
                AddFileType("dds");
                AddFileType("gif");
                AddFileType("ach");
                AddFileType("achx");
            }
            else
                AddFileType(FileType);
            if (sLastDirectoriesViewed.ContainsKey(mFileTypes[0]))
            {
                SetDirectory(sLastDirectoriesViewed[mFileTypes[0]]);
            }
            else if (string.IsNullOrEmpty(sLastUntypedDirectory) == false)
            {
                SetDirectory(sLastUntypedDirectory);
            }
            else if (string.IsNullOrEmpty(mDirectory))
            {
                SetDirectory(FileManager.RelativeDirectory);
            }
            else
            {
                SetDirectory(mDirectory);
            }
            UpdateFileTypeComboBoxToStringList();
            mFileTypeBox.Text = FileType;
        }
public void SetFileType ( string FileType ) { mFileTypes . Clear ( ) ; if ( FileType == " " ) { AddFileType ( " " ) ; AddFileType ( " " ) ; AddFileType ( " " ) ; AddFileType ( " " ) ; AddFileType ( " " ) ; AddFileType ( " " ) ; } else if ( FileType == " " ) { AddFileType ( " " ) ; AddFileType ( " " ) ; AddFileType ( " " ) ; AddFileType ( " " ) ; AddFileType ( " " ) ; AddFileType ( " " ) ; AddFileType ( " " ) ; AddFileType ( " " ) ; } else AddFileType ( FileType ) ; if ( sLastDirectoriesViewed . ContainsKey ( mFileTypes [ 0 ] ) ) { SetDirectory ( sLastDirectoriesViewed [ mFileTypes [ 0 ] ] ) ; } else if ( string . IsNullOrEmpty ( sLastUntypedDirectory ) == false ) { SetDirectory ( sLastUntypedDirectory ) ; } else if ( string . IsNullOrEmpty ( mDirectory ) ) { SetDirectory ( FileManager . RelativeDirectory ) ; } else { SetDirectory ( mDirectory ) ; } UpdateFileTypeComboBoxToStringList ( ) ; mFileTypeBox . Text = FileType ; }
Sets the filetype that the FileWindow can view.
Sets the filetype that the FileWindow can view .
// just to refresh the list
FileType
string
The file types specified by extension.
The file types specified by extension .
remarks
This method also clears all types.  Setting a filter then calling SetFileType clears the filter.

Setting the filetype as "graphic" sets all of the file types that FRB can load.
This method also clears all types . Setting a filter then calling SetFileType clears the filter . Setting the filetype as " graphic " sets all of the file types that FRB can load .