示例#1
0
        public void Append(string text)
        {
            IntPtr ptr = MarshalHelper.StringToUTF8(text);

            uiRadioButtonsAppend(handle, ptr);
            Marshal.FreeHGlobal(ptr);
        }
示例#2
0
        public void Append(string text)
        {
            IntPtr ptr = MarshalHelper.StringToUTF8(text);

            uiMultilineEntryAppend(handle, ptr);
            Marshal.FreeHGlobal(ptr);
        }
示例#3
0
        public void Append(string text)
        {
            IntPtr ptr = MarshalHelper.StringToUTF8(text);

            uiComboboxAppend(handle, ptr);
            Marshal.FreeHGlobal(ptr);
        }
示例#4
0
        private static IntPtr CreateWindow(string title, int width, int height, bool hasMenuBar)
        {
            IntPtr ptr    = MarshalHelper.StringToUTF8(title);
            IntPtr handle = uiNewWindow(ptr, width, height, hasMenuBar == true ? 1 : 0);

            Marshal.FreeHGlobal(ptr);
            return(handle);
        }
示例#5
0
文件: UIGroup.cs 项目: masums/sharpui
        private static IntPtr CreateGroup(string title)
        {
            IntPtr ptr    = MarshalHelper.StringToUTF8(title);
            IntPtr handle = uiNewGroup(ptr);

            Marshal.FreeHGlobal(ptr);
            return(handle);
        }
示例#6
0
        private static IntPtr CreateButton(string text)
        {
            IntPtr ptr    = MarshalHelper.StringToUTF8(text);
            IntPtr handle = uiNewButton(ptr);

            Marshal.FreeHGlobal(ptr);
            return(handle);
        }
示例#7
0
文件: UITab.cs 项目: masums/sharpui
        public void InsertAt(string name, UInt64 before, UIControl c)
        {
            IntPtr ptr = MarshalHelper.StringToUTF8(name);

            uiTabInsertAt(handle, ptr, before, c.handle);
            Marshal.FreeHGlobal(ptr);
            children.Insert((int)before, c);
        }
示例#8
0
文件: UITab.cs 项目: masums/sharpui
        public void Append(string name, UIControl c)
        {
            IntPtr ptr = MarshalHelper.StringToUTF8(name);

            uiTabAppend(handle, ptr, c.handle);
            Marshal.FreeHGlobal(ptr);
            children.Add(c);
        }
示例#9
0
文件: UIMenu.cs 项目: masums/sharpui
        public UIMenuItem AppendCheckItem(string name)
        {
            IntPtr namePtr = MarshalHelper.StringToUTF8(name);
            IntPtr ptr     = uiMenuAppendCheckItem(handle, namePtr);

            Marshal.FreeHGlobal(namePtr);
            UIMenuItem item = new UIMenuItem(ptr);

            items.Add(item);
            return(item);
        }
示例#10
0
        public void MessageBox(string title, string description, bool error = false)
        {
            IntPtr titlePtr       = MarshalHelper.StringToUTF8(title);
            IntPtr descriptionPtr = MarshalHelper.StringToUTF8(description);

            if (error)
            {
                uiMsgBoxError(handle, titlePtr, descriptionPtr);
            }
            else
            {
                uiMsgBox(handle, titlePtr, descriptionPtr);
            }
            Marshal.FreeHGlobal(titlePtr);
            Marshal.FreeHGlobal(descriptionPtr);
        }