Search Results for

    Show / Hide Table of Contents

    Interface IIconService

    Responsible for Icon Management

    Namespace: Simplic.Icon
    Assembly: Simplic.Icon.dll
    Syntax
    public interface IIconService

    Methods

    | Improve this Doc View Source

    Delete(Icon)

    Deletes an icon from db, cache and file system

    Declaration
    bool Delete(Icon icon)
    Parameters
    Type Name Description
    Icon icon
    Returns
    Type Description
    System.Boolean

    true if successful

    | Improve this Doc View Source

    Delete(Guid)

    Deletes an icon from db, cache and file system

    Declaration
    bool Delete(Guid id)
    Parameters
    Type Name Description
    System.Guid id

    Icon Id

    Returns
    Type Description
    System.Boolean

    true if successful

    | Improve this Doc View Source

    GenerateChecksum(IList<Byte[]>)

    Generates a checksum looping through all bytes it has given asa parameter

    Declaration
    string GenerateChecksum(IList<byte[]> icons)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<System.Byte[]> icons

    List of bytes

    Returns
    Type Description
    System.String

    Checksum hash

    | Improve this Doc View Source

    GetAll()

    Gets all icons in the database

    Declaration
    IEnumerable<Icon> GetAll()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Icon>

    A list of Icon

    | Improve this Doc View Source

    GetById(Guid)

    Gets a byte array of an icon of a given Guid

    Declaration
    byte[] GetById(Guid id)
    Parameters
    Type Name Description
    System.Guid id

    Icon Id

    Returns
    Type Description
    System.Byte[]

    Icon as Byte[]

    | Improve this Doc View Source

    GetByIdAsIcon(Guid)

    Gets an icon object of a given Guid

    Declaration
    Icon GetByIdAsIcon(Guid id)
    Parameters
    Type Name Description
    System.Guid id

    Icon Id

    Returns
    Type Description
    Icon Icon
    | Improve this Doc View Source

    GetByIdAsImage(Guid)

    Gets a image of an icon of a given Guid

    Declaration
    BitmapImage GetByIdAsImage(Guid id)
    Parameters
    Type Name Description
    System.Guid id

    Icon Id

    Returns
    Type Description
    System.Windows.Media.Imaging.BitmapImage

    Icon as System.Windows.Media.Imaging.BitmapImage

    | Improve this Doc View Source

    GetByName(String)

    Gets a byte array of an icon of a given name

    Declaration
    byte[] GetByName(string name)
    Parameters
    Type Name Description
    System.String name

    Icon name

    Returns
    Type Description
    System.Byte[]

    Icon as Byte[]

    | Improve this Doc View Source

    GetByNameAsImage(String)

    Returns a System.Windows.Media.Imaging.BitmapImage by a given name of an icon

    Declaration
    BitmapImage GetByNameAsImage(string name)
    Parameters
    Type Name Description
    System.String name

    Icon name to be searched

    Returns
    Type Description
    System.Windows.Media.Imaging.BitmapImage

    System.Windows.Media.Imaging.BitmapImage by a given name of an icon

    | Improve this Doc View Source

    GetSystemIcon(String, SystemIconSize, Boolean)

    Get system icon by file extension

    Declaration
    Icon GetSystemIcon(string name, SystemIconSize size = SystemIconSize.Large, bool linkOverlay = false)
    Parameters
    Type Name Description
    System.String name

    File extension

    SystemIconSize size

    Icon size

    System.Boolean linkOverlay

    Using an icon overlay

    Returns
    Type Description
    System.Drawing.Icon

    Icon system (system drawing)

    | Improve this Doc View Source

    GetSystemIconAsImage(String, SystemIconSize, Boolean)

    Get system icon by file extension or system name as image

    Declaration
    Image GetSystemIconAsImage(string name, SystemIconSize size = SystemIconSize.Large, bool linkOverlay = false)
    Parameters
    Type Name Description
    System.String name

    System icon name or file extension

    SystemIconSize size

    Icon size

    System.Boolean linkOverlay

    Using an icon overlay

    Returns
    Type Description
    System.Windows.Controls.Image

    Icon as image (system drawing)

    | Improve this Doc View Source

    Save(Icon)

    Inserts or updates an icon

    Declaration
    bool Save(Icon icon)
    Parameters
    Type Name Description
    Icon icon

    Icon object to save

    Returns
    Type Description
    System.Boolean

    true if successful

    | Improve this Doc View Source

    SaveChecksumToDb(String)

    Saves the checksum value to the database (in the configuration table)

    Declaration
    void SaveChecksumToDb(string checksum)
    Parameters
    Type Name Description
    System.String checksum

    Checksum hash to be saved

    | Improve this Doc View Source

    Search(String)

    Gets a list of icons filtered out by their name

    Declaration
    IEnumerable<Icon> Search(string searchText)
    Parameters
    Type Name Description
    System.String searchText
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Icon>
    | Improve this Doc View Source

    SyncFilesFromDatabase()

    Compares checksums between db and filesystem. If they differ, reads all the icons from the database and writes them down and creates a new checksum

    Declaration
    bool SyncFilesFromDatabase()
    Returns
    Type Description
    System.Boolean

    true if successful

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx