示例#1
0
        public Typing(Mode mode, Cursor cursor)
        {
            switch (mode)
            {
            case Mode.typewriter:
                Type = TypeTypewriter;
                break;

            case Mode.keyboard:
                Type = TypeKeyboard;
                break;
            }
            switch (cursor)
            {
            case Cursor.invisible:
                Out = OutputWithNoCursor;
                break;

            case Cursor.visible:
                Out = OutputWithCursor;
                break;

            case Cursor.hangeul:
                Out = OutputWithCursorOnlyHangeul;
                break;
            }
        }
示例#2
0
文件: Main.cs 项目: Boomtime/glimmer
        void XFuncCheckChanged(object sender, EventArgs e)
        {
            var rb = sender as RadioButton;

            if (rb.Checked)
            {
                mFunc = (OutputFunc)rb.Tag;
                StartCurrentSequence();
            }
        }
示例#3
0
文件: Main.cs 项目: Boomtime/glimmer
        void AddFunctionRadio(string text, OutputFunc func, ISequence sequence = null)
        {
            var r = new RadioButton {
                Text     = text,
                Tag      = func,
                Checked  = (0 == cFuncFlow.Controls.Count),
                AutoSize = true
            };

            r.CheckedChanged += XFuncCheckChanged;
            cFuncFlow.Controls.Add(r);
            mSequenceList.Add(func, sequence);
        }
示例#4
0
        // Get the scanline output function for a particular pixel format.
        private static OutputFunc GetOutputFunc(PixelFormat format)
        {
            OutputFunc func = null;

            switch (format)
            {
            case PixelFormat.Format16bppRgb555:
            {
                func = new OutputFunc(Rgb555);
            }
            break;

            case PixelFormat.Format16bppRgb565:
            {
                func = new OutputFunc(Rgb565);
            }
            break;

            case PixelFormat.Format24bppRgb:
            {
                func = new OutputFunc(Rgb24bpp);
            }
            break;

            case PixelFormat.Format32bppRgb:
            {
                func = new OutputFunc(Rgb32bpp);
            }
            break;

            case PixelFormat.Format1bppIndexed:
            {
                func = new OutputFunc(Indexed1bpp);
            }
            break;

            case PixelFormat.Format4bppIndexed:
            {
                func = new OutputFunc(Indexed4bpp);
            }
            break;

            case PixelFormat.Format8bppIndexed:
            {
                func = new OutputFunc(Indexed8bpp);
            }
            break;

            case PixelFormat.Format16bppArgb1555:
            {
                func = new OutputFunc(RgbAlpha555);
            }
            break;

            case PixelFormat.Format32bppPArgb:
            case PixelFormat.Format32bppArgb:
            {
                func = new OutputFunc(RgbAlpha32bpp);
            }
            break;

            case PixelFormat.Format16bppGrayScale:
            {
                func = new OutputFunc(GrayScale16bpp);
            }
            break;

            case PixelFormat.Format48bppRgb:
            {
                func = new OutputFunc(Rgb48bpp);
            }
            break;

            case PixelFormat.Format64bppPArgb:
            case PixelFormat.Format64bppArgb:
            {
                func = new OutputFunc(RgbAlpha64bpp);
            }
            break;
            }
            return(func);
        }
	// Get the scanline output function for a particular pixel format.
	private static OutputFunc GetOutputFunc(PixelFormat format)
			{
				OutputFunc func = null;
				switch(format)
				{
					case PixelFormat.Format16bppRgb555:
					{
						func = new OutputFunc(Rgb555);
					}
					break;

					case PixelFormat.Format16bppRgb565:
					{
						func = new OutputFunc(Rgb565);
					}
					break;

					case PixelFormat.Format24bppRgb:
					{
						func = new OutputFunc(Rgb24bpp);
					}
					break;

					case PixelFormat.Format32bppRgb:
					{
						func = new OutputFunc(Rgb32bpp);
					}
					break;

					case PixelFormat.Format1bppIndexed:
					{
						func = new OutputFunc(Indexed1bpp);
					}
					break;

					case PixelFormat.Format4bppIndexed:
					{
						func = new OutputFunc(Indexed4bpp);
					}
					break;

					case PixelFormat.Format8bppIndexed:
					{
						func = new OutputFunc(Indexed8bpp);
					}
					break;

					case PixelFormat.Format16bppArgb1555:
					{
						func = new OutputFunc(RgbAlpha555);
					}
					break;

					case PixelFormat.Format32bppPArgb:
					case PixelFormat.Format32bppArgb:
					{
						func = new OutputFunc(RgbAlpha32bpp);
					}
					break;

					case PixelFormat.Format16bppGrayScale:
					{
						func = new OutputFunc(GrayScale16bpp);
					}
					break;

					case PixelFormat.Format48bppRgb:
					{
						func = new OutputFunc(Rgb48bpp);
					}
					break;

					case PixelFormat.Format64bppPArgb:
					case PixelFormat.Format64bppArgb:
					{
						func = new OutputFunc(RgbAlpha64bpp);
					}
					break;
				}
				return func;
			}
示例#6
0
 private static OutputFunc SetInternalOutputFunc(OutputFunc func, LoggingLevels level) => (message, args) => { if (LoggingLevel >= level)
                                                                                                               {
                                                                                                                   func(message, args);
                                                                                                               }
 };
示例#7
0
 public static extern void SetErrOutputFunc(IntPtr ctx, OutputFunc pfn, IntPtr writer);