C# Класс WF.Compiler.EngineGarmin

Наследование: IEngine
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ConvertCartridge ( Cartridge cartridge ) : Cartridge

Converts the Cartridge object in a format valid for the given engine.

- Convert Lua code - Convert strings in special format and insert any special code - Convert medias

ConvertString ( string text ) : string

Converts a string into GWC header file format.

EngineGarmin ( ) : System

Приватные методы

Метод Описание
ConvertCode ( string luaCode, string variable ) : string

Converts the Lua code into the correct Garmin dependent code.

Insert any special code to correct bugs for Garmins.

ConvertMedia ( Media media ) : MediaResource

Converts the media in a valid format for this player and returns a valid resource, if there are any.

Checks, which resource belongs to this player, change the size or format, if needed, and creates a MediaResource.

GetEncoderInfo ( string mimeType ) : System.Drawing.Imaging.ImageCodecInfo
ReplaceEscape ( Match match ) : string
ReplaceLongStrings ( string luaCode ) : string
ReplaceShortStrings ( string luaCode ) : string
ReplaceSpaces ( Match m ) : string
ReplaceSpecialCharacters ( string luaCode ) : string

Replaces escape sequences with UTF-8 (like \195) with Win-1252 codes.

We replace here normal UTF-8 encoded special characters by converting the string from Unicode to UTF-8 and than from UTF-8 to Win-1252. Characters, that are encoded by escape sequences like \195\164 are converted from escape sequences to normal byte format. In this function, we assume, that the characters beyond ASCII 127 are not obfuscated.

ReplaceString ( string text ) : string
ResizeImage ( Image imgToResize, int width ) : Image

Описание методов

ConvertCartridge() публичный Метод

Converts the Cartridge object in a format valid for the given engine.
- Convert Lua code - Convert strings in special format and insert any special code - Convert medias
public ConvertCartridge ( Cartridge cartridge ) : Cartridge
cartridge Cartridge Cartridge object to convert.
Результат Cartridge

ConvertString() публичный Метод

Converts a string into GWC header file format.
public ConvertString ( string text ) : string
text string Original string.
Результат string

EngineGarmin() публичный Метод

public EngineGarmin ( ) : System
Результат System