Search Results for

    Show / Hide Table of Contents

    Class FileBrowser

    Utility for opening file dialogs used to save and load files of several types. Uses the StandaloneFileBrowser plugin.

    This class saves the last used directory separately for each file type.

    Inheritance
    object
    FileBrowser
    Namespace: AS2
    Assembly: .dll
    Syntax
    public static class FileBrowser

    Fields

    | Edit this page View Source

    initHandler

    Declaration
    private static FileBrowser.FileTypeHandler initHandler
    Field Value
    Type Description
    FileBrowser.FileTypeHandler
    | Edit this page View Source

    pngHandler

    Declaration
    private static FileBrowser.FileTypeHandler pngHandler
    Field Value
    Type Description
    FileBrowser.FileTypeHandler
    | Edit this page View Source

    simHandler

    Declaration
    private static FileBrowser.FileTypeHandler simHandler
    Field Value
    Type Description
    FileBrowser.FileTypeHandler
    | Edit this page View Source

    textHandler

    Declaration
    private static FileBrowser.FileTypeHandler textHandler
    Field Value
    Type Description
    FileBrowser.FileTypeHandler

    Methods

    | Edit this page View Source

    LoadInitFile(string, string)

    Opens a save file dialog for initialization state files.

    Declaration
    public static string LoadInitFile(string title = "Load Initialization State", string directory = "")
    Parameters
    Type Name Description
    string title

    The title of the dialog window.

    string directory

    The initial directory.

    Returns
    Type Description
    string

    The path to the selected file. Will be empty if no file was selected.

    | Edit this page View Source

    LoadSimFile(string, string)

    Opens a load file dialog for simulation state files.

    Declaration
    public static string LoadSimFile(string title = "Load Simulation State", string directory = "")
    Parameters
    Type Name Description
    string title

    The title of the dialog window.

    string directory

    The initial directory.

    Returns
    Type Description
    string

    The path to the selected file. Will be empty if no file was selected.

    | Edit this page View Source

    SaveInitFile(string, string, string)

    Opens a save file dialog for initialization state files.

    Declaration
    public static string SaveInitFile(string title = "Save Initialization State", string defaultName = "initState", string directory = "")
    Parameters
    Type Name Description
    string title

    The title of the dialog window.

    string defaultName

    The initial name of the save file.

    string directory

    The initial directory.

    Returns
    Type Description
    string

    The path to the selected file. Will be empty if no file was selected.

    | Edit this page View Source

    SavePNGFile(string, string, string)

    Opens a save file dialog for PNG files.

    Declaration
    public static string SavePNGFile(string title = "", string defaultName = "", string directory = "")
    Parameters
    Type Name Description
    string title

    The title of the dialog window.

    string defaultName

    The initial name of the save file.

    string directory

    The initial directory.

    Returns
    Type Description
    string

    The path to the selected file. Will be empty if no file was selected.

    | Edit this page View Source

    SaveSimFile(string, string, string)

    Opens a save file dialog for simulation state files.

    Declaration
    public static string SaveSimFile(string title = "Save Simulation State", string defaultName = "algorithm", string directory = "")
    Parameters
    Type Name Description
    string title

    The title of the dialog window.

    string defaultName

    The initial name of the save file.

    string directory

    The initial directory.

    Returns
    Type Description
    string

    The path to the selected file. Will be empty if no file was selected.

    | Edit this page View Source

    SaveTextFile(string, string, string)

    Opens a save file dialog for text files.

    Declaration
    public static string SaveTextFile(string title = "", string defaultName = "", string directory = "")
    Parameters
    Type Name Description
    string title

    The title of the dialog window.

    string defaultName

    The initial name of the save file.

    string directory

    The initial directory.

    Returns
    Type Description
    string

    The path to the selected file. Will be empty if no file was selected.

    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX