
using System;
using System.Globalization;
using System.Threading;

namespace WinRT.BxlComponent.Plugin.BxlMpXamarinSDK.Abstractions
{
    internal class MPosFontAttribute
    {
        internal MPosFontAttribute()
        {
            FontType = MPosFontType.MPOS_FONT_TYPE_A;
            Width = MPosFontSizeWidth.MPOS_FONT_SIZE_WIDTH_0;
            Height = MPosFontSizeHeight.MPOS_FONT_SIZE_HEIGHT_0;
            Underline = MPosFontUnderline.MPOS_FONT_UNDERLINE_NONE;
            Alignment = MPosAlignment.MPOS_ALIGNMENT_DEFAULT;
            Bold = false;
            Color = false;
            Reverse = false;
            CodePage = (int)MPosCodePage.MPOS_CODEPAGE_WPC1252;
        }

        internal MPosFontType FontType { get; set; }
        internal MPosFontSizeWidth Width { get; set; }
        internal MPosFontSizeHeight Height { get; set; }
        internal MPosFontUnderline Underline { get; set; }
        internal MPosAlignment Alignment { get; set; }
        internal bool Bold { get; set; }
        internal bool Color { get; set; }
        internal bool Reverse { get; set; }
        internal int CodePage { get; set; }
        //public MPosICS ICS { get; set; }
    }

    internal enum MPosFontType
    {
        MPOS_FONT_TYPE_A = 0,
        MPOS_FONT_TYPE_B = 1,
        MPOS_FONT_TYPE_C = 2
    }
    internal enum MPosFontSizeWidth
    {
        MPOS_FONT_SIZE_WIDTH_0 = 0x00,
        MPOS_FONT_SIZE_WIDTH_1 = 0x10,
        MPOS_FONT_SIZE_WIDTH_2 = 0x20,
        MPOS_FONT_SIZE_WIDTH_3 = 0x30,
        MPOS_FONT_SIZE_WIDTH_4 = 0x40,
        MPOS_FONT_SIZE_WIDTH_5 = 0x50,
        MPOS_FONT_SIZE_WIDTH_6 = 0x60,
        MPOS_FONT_SIZE_WIDTH_7 = 0x70
    }
    internal enum MPosFontSizeHeight
    {
        MPOS_FONT_SIZE_HEIGHT_0 = 0,
        MPOS_FONT_SIZE_HEIGHT_1 = 1,
        MPOS_FONT_SIZE_HEIGHT_2 = 2,
        MPOS_FONT_SIZE_HEIGHT_3 = 3,
        MPOS_FONT_SIZE_HEIGHT_4 = 4,
        MPOS_FONT_SIZE_HEIGHT_5 = 5,
        MPOS_FONT_SIZE_HEIGHT_6 = 6,
        MPOS_FONT_SIZE_HEIGHT_7 = 7
    }
    internal enum MPosFontUnderline
    {
        MPOS_FONT_UNDERLINE_NONE = 0,
        MPOS_FONT_UNDERLINE_1 = 1,
        MPOS_FONT_UNDERLINE_2 = 2
    }
    internal enum MPosEastAsiaCodePage
    {
        MPOS_CODEPAGE_KSC5601 = 949,
        MPOS_CODEPAGE_SHIFTJIS = 932,
        MPOS_CODEPAGE_BIG5 = 950,
        MPOS_CODEPAGE_GB2312 = 936,
        MPOS_CODEPAGE_GB18030 = 54936,
    }
    internal enum MPosUnicodeCodePage
    {
        MPOS_CODEPAGE_UTF8 = 65001,
        MPOS_CODEPAGE_UTF16_LITTLE = 1200,	    // (little endian byte order)   
        MPOS_CODEPAGE_UTF16_BIG = 1201,	    // (big endian byte order)      
        MPOS_CODEPAGE_UTF32_LITTLE = 12000,	// (little endian byte order)   
        MPOS_CODEPAGE_UTF32_BIG = 12001,	// (big endian byte order)      
    }

    internal enum MPosCodePage
    {
        MPOS_CODEPAGE_CP437 = 437,	//0     // USA, Standard Europe
        MPOS_CODEPAGE_KATAKANA = 932,  //1     // Japanese
        MPOS_CODEPAGE_CP850 = 850,	//2     // OEM Multilingual Latin 1; Western European (DOS)
        MPOS_CODEPAGE_CP860 = 860,	//3     // OEM Portuguese; Portuguese (DOS)
        MPOS_CODEPAGE_CP863 = 863,	//4     // OEM French Canadian; French Canadian (DOS)
        MPOS_CODEPAGE_CP865 = 865,	//5     // OEM Nordic; Nordic (DOS)
        MPOS_CODEPAGE_WPC1252 = 1252,	//16    // ANSI Latin 1; Western European (Windows)
        MPOS_CODEPAGE_CP866 = 866,	//17    // OEM Russian; Cyrillic (DOS)
        MPOS_CODEPAGE_CP852 = 852,	//18    // OEM Latin 2; Central European (DOS)
        MPOS_CODEPAGE_CP858 = 858,	//19    // OEM Multilingual Latin 1 + Euro symbol
        MPOS_CODEPAGE_CP862 = 862,	//21    // OEM Hebrew; Hebrew (DOS)
        MPOS_CODEPAGE_WPC1253 = 1253,	//24    // ANSI Greek; Greek (Windows)
        MPOS_CODEPAGE_WPC1254 = 1254,	//25    // ANSI Turkish; Turkish (Windows)
        MPOS_CODEPAGE_WPC1257 = 1257, //26    // ANSI Baltic; Baltic (Windows)

        MPOS_CODEPAGE_WPC1251 = 1251,	//28    // ANSI Cyrillic; Cyrillic (Windows) 
        MPOS_CODEPAGE_CP737 = 737,	//29    // OEM Greek (formerly 437G); Greek (DOS) 
        MPOS_CODEPAGE_CP775 = 775,  //30    // OEM Baltic; Baltic (DOS) 
        MPOS_CODEPAGE_WPC1255 = 1255,	//33    // ANSI Hebrew; Hebrew (Windows) 

        MPOS_CODEPAGE_THAI11 = 34,   //34
        MPOS_CODEPAGE_THAI14 = 31,   //31
        MPOS_CODEPAGE_THAI16 = 39,	//39
        MPOS_CODEPAGE_THAI18 = 35,   //35
        MPOS_CODEPAGE_THAI42 = 23,   //23

        MPOS_CODEPAGE_CP855 = 855,	//36    // OEM Cyrillic (primarily Russian)
        MPOS_CODEPAGE_CP857 = 857,	//37    // OEM Turkish; Turkish (DOS)
        MPOS_CODEPAGE_CP928 = 928,	//38    // Greek
        MPOS_CODEPAGE_WPC1258 = 1258,	//41    // ANSI/OEM Vietnamese; Vietnamese (Windows)        // MPOS_CODEPAGE_CPC1258 ??
        MPOS_CODEPAGE_WPC1250 = 1250,	//47    // ANSI Central European; Central European (Windows)// MPOS_CODEPAGE_CP1250 ??
        MPOS_CODEPAGE_LATIN9 = 28605,//48    // ISO 8859-15 Latin 9

        MPOS_CODEPAGE_TCVN = 49,	//49    // Vietnam TCVN3
        MPOS_CODEPAGE_TCVN_CAPTIAL = 50,   //50    // Vietnam TCVN3 Capital
        MPOS_CODEPAGE_VISCII = 51,   //51    // Vietnam VISCII

        MPOS_CODEPAGE_CP864 = 864,	//22    // OEM Arabic; Arabic (864)
        MPOS_CODEPAGE_FARSI = 27,   //27    // 표준
        MPOS_CODEPAGE_FARSI_II = 28,   //28    // 비표준 (not defined in native SDK, only valid on Xamarin)
        MPOS_CODEPAGE_WPC1256 = 1256,	//40    // ANSI Arabic; Arabic (Windows)
        MPOS_CODEPAGE_HEBREW_OLD = 32,	//32    // Hebrew Old code
        MPOS_CODEPAGE_KHMER = 42,	//42    // Cambodia
    }

    internal enum MPosICS
    {
        MPOS_ICS_USA = 0,
        MPOS_ICS_FRANCE = 1,
        MPOS_ICS_GERMANY = 2,
        MPOS_ICS_UK = 3,
        MPOS_ICS_DENMARK_I = 4,
        MPOS_ICS_SWEDEN = 5,
        MPOS_ICS_ITALY = 6,
        MPOS_ICS_SPAIN_I = 7,
        MPOS_ICS_JAPAN = 8,
        MPOS_ICS_NORWAY = 9,
        MPOS_ICS_DENMARK_II = 10,
        MPOS_ICS_SPAIN_II = 11,
        MPOS_ICS_LATIN_AMERICA = 12,
        MPOS_ICS_KOREA = 13,
        MPOS_ICS_SLOVENIA_CROATIA = 14,
        MPOS_ICS_CHINA = 15
    }
}