unsafe public void Create() { xc.XInitXCGUI(""); int hWindow = XWnd.Create(0, 0, 500, 300, "xcgui", 0, 15); int hList = XList.Create(0, 0, 300, 200, hWindow); XList.SetItemTemplateXML(hList, "..\\..\\List_Item.xml"); XList.AddColumn(hList, 100); XList.AddColumn(hList, 100); int hHead = XAdapterMap.Create(); XList.BindAdapterHeader(hList, hHead); XAdapterMap.AddItemText(hHead, "name", "第一列"); XAdapterMap.AddItemText(hHead, "name2", "第二列"); int body = XAdapterTable.Create(); XList.BindAdapter(hList, body); XAdapterTable.AddColumn(body, "name"); XAdapterTable.AddColumn(body, "name2"); int nItem = XAdapterTable.AddItemText(body, "1.1"); XAdapterTable.SetItemText(body, nItem, 1, "1.2"); XWnd.ShowWindow(hWindow, 5); xc.XRunXCGUI(); xc.XExitXCGUI(); }
unsafe public void Create() { xc.XInitXCGUI(""); int hWindow = XWnd.Create(0, 0, 500, 400, "xcgui", 0, 15); hListBox = XListBox.Create(0, 0, 300, 300, hWindow); XListBox.SetItemTemplateXML(hListBox, "..\\..\\ListBox_Item.xml"); int hAdapter = XAdapterTable.Create(); XListBox.BindAdapter(hListBox, hAdapter); XAdapterTable.AddColumn(hAdapter, "name"); XAdapterTable.AddColumn(hAdapter, "name1"); int nItem = XAdapterTable.AddItemText(hAdapter, "dasemimi"); XAdapterTable.SetItemText(hAdapter, nItem, 1, "xiaosemimi"); nItem = XAdapterTable.AddItemText(hAdapter, "dasemimi1"); XAdapterTable.SetItemText(hAdapter, nItem, 1, "xiaosemimi1"); XEle.RegEventCPP(hListBox, xcConst.XE_LISTBOX_TEMP_CREATE_END, new XE_LISTBOX_TEMP_CREATE_END_CPP(__OnListBoxTemplateCreateEnd)); XWnd.ShowWindow(hWindow, 5); xc.XRunXCGUI(); xc.XExitXCGUI(); }
unsafe public void Create() { xc.XInitXCGUI(""); int hWindow = XWnd.Create(0, 0, 500, 300, "xcgui", 0, 15); int hListView = XListView.Create(0, 0, 400, 200, hWindow); XListView.SetItemTemplateXML(hListView, "..\\..\\ListView_Item.xml"); int hAdapter = XAdapterListView.Create(); XListView.BindAdapter(hListView, hAdapter); XAdapterListView.Group_AddColumn(hAdapter, "name3"); int nGroup = XAdapterListView.Group_AddItemText(hAdapter, "dasemimi"); XAdapterListView.Item_AddColumn(hAdapter, "name"); XAdapterListView.Item_AddColumn(hAdapter, "name2"); int hImage = XImage.LoadFile("..\\..\\2.png", false); int nItem = XAdapterListView.Item_AddItemImage(hAdapter, nGroup, hImage); XAdapterListView.Item_SetText(hAdapter, nGroup, nItem, 1, "哇咔咔"); XWnd.ShowWindow(hWindow, 5); xc.XRunXCGUI(); xc.XExitXCGUI(); }
unsafe public void Create() { xc.XInitXCGUI(""); int hWindow = XWnd.Create(0, 0, 500, 300, "xcgui", 0, xcConst.xc_window_style_default); int hBtn = XBtn.Create(0, 0, 100, 100, "按钮", hWindow); XEle.RegEventC(hBtn, xcConst.XE_BNCLICK, new XE_BNCLICK_C(__OnBtnClick)); XWnd.ShowWindow(hWindow, 5); xc.XRunXCGUI(); xc.XExitXCGUI(); }
unsafe public void Create() { xc.XInitXCGUI(""); int hWindow = XWnd.Create(0, 0, 500, 300, "xcgui", 0, 15); int hElePanel = xc.LoadLayout("..\\..\\Pane.xml", 0); XWnd.AddEle(hWindow, hElePanel); XWnd.ShowWindow(hWindow, 5); xc.XRunXCGUI(); xc.XExitXCGUI(); }
unsafe public void Create() { xc.XInitXCGUI(""); int hWindow = XWnd.Create(0, 0, 500, 300, "xcgui", 0, 15); int hBtn = XBtn.Create(0, 0, 100, 100, "按钮", hWindow); // Marshal.AllocCoTaskMem(Marshal.SizeOf(pBtnClick)) XWnd.RegEventCPP(hWindow, xcConst.WM_LBUTTONDOWN, new WM_LBUTTONDOWN_CPP(OnWndLButtonDown)); XWnd.ShowWindow(hWindow, 5); xc.XRunXCGUI(); xc.XExitXCGUI(); }
unsafe public void Create() { xc.XInitXCGUI(""); int hWindow = XWnd.Create(0, 0, 500, 300, "xcgui", 0, 15); int hComboBox = XComboBox.Create(0, 0, 300, 20, hWindow); XComboBox.SetItemTemplateXML(hComboBox, "..//..//ComboBox_ListBox_Item.xml"); int hAdapterTable = XAdapterTable.Create(); XComboBox.BindApapter(hComboBox, hAdapterTable); XAdapterTable.AddColumn(hAdapterTable, "name"); int nItem = XAdapterTable.AddItemText(hAdapterTable, "1.1"); XWnd.ShowWindow(hWindow, 5); xc.XRunXCGUI(); xc.XExitXCGUI(); }
unsafe public void Create() { xc.XInitXCGUI(""); int hWindow = XWnd.Create(0, 0, 500, 300, "xcgui", 0, 15); int hTree = XTree.Create(0, 0, 200, 300, hWindow); XTree.SetItemTemplateXML(hTree, "..\\..\\Tree_Item.xml"); int hAdapter = XAdapterTree.Create(); XTree.BindAdapter(hTree, hAdapter); XAdapterTree.AddColumn(hAdapter, "name"); int nID = XAdapterTree.InsertItemText(hAdapter, "1", xcConst.XC_ID_ROOT, xcConst.XC_ID_LAST); XAdapterTree.InsertItemText(hAdapter, "1.1", nID, xcConst.XC_ID_LAST); XWnd.ShowWindow(hWindow, 5); xc.XRunXCGUI(); xc.XExitXCGUI(); }