Exemplo n.º 1
0
        public QniHub(QniProgramEntryCallback entry)
        {
            Handle = QniCoreLib.qni_hub_new(entry);

            if (Handle == IntPtr.Zero)
            {
                throw new Exception("create hub failed");
            }
        }
Exemplo n.º 2
0
        public int WaitInt()
        {
            unsafe
            {
                int ret;

                CheckReturnCode(QniCoreLib.qni_wait_int(_handle, &ret));

                return(ret);
            }
        }
Exemplo n.º 3
0
        public void SetFont(string fontFamily, float fontSize, FontStyle fontStyle)
        {
            var bytes = Encoding.UTF8.GetBytes(fontFamily);

            unsafe
            {
                fixed(byte *ptr = &bytes[0])
                {
                    CheckReturnCode(QniCoreLib.qni_set_font(_handle, ptr, (UIntPtr)bytes.Length, fontSize, fontStyle));
                }
            }
        }
Exemplo n.º 4
0
        public void PrintLine(string text)
        {
            var bytes = Encoding.UTF8.GetBytes(text);

            unsafe
            {
                fixed(byte *ptr = &bytes[0])
                {
                    CheckReturnCode(QniCoreLib.qni_print_line(_handle, ptr, (UIntPtr)bytes.Length));
                }
            }
        }
Exemplo n.º 5
0
 public void Exit()
 {
     QniCoreLib.qni_hub_exit(Handle);
 }
Exemplo n.º 6
0
 private void ReleaseUnmanagedResources()
 {
     QniCoreLib.qni_hub_delete(Handle);
 }
Exemplo n.º 7
0
 public void SetHighlightColor(uint color)
 {
     CheckReturnCode(QniCoreLib.qni_set_highlight_color(_handle, color));
 }
Exemplo n.º 8
0
 public void SetBackColor(uint color)
 {
     CheckReturnCode(QniCoreLib.qni_set_back_color(_handle, color));
 }
Exemplo n.º 9
0
 public void SetTextColor(uint color)
 {
     CheckReturnCode(QniCoreLib.qni_set_text_color(_handle, color));
 }
Exemplo n.º 10
0
 public void DeleteLine(uint count)
 {
     CheckReturnCode(QniCoreLib.qni_delete_line(_handle, count));
 }
Exemplo n.º 11
0
 public void NewLine()
 {
     CheckReturnCode(QniCoreLib.qni_new_line(_handle));
 }