void DefineView() { LV = new MyListViewA(listView1); LV.SetDB(Global.con, "Labels"); LV.ColumnWidths = new int[] { 0, 0, 0, 230, 65 };//列宽(默认80) LV.RowHeight = 30; LV.RowColor = Color.LightGray; LV.SetStyle("Cambria", 16, FontStyle.Bold); LV.QueryFields = "LabelID,GroupID,Path,LabelName as 标签名,LabelOrder as 序号"; LV.Where("GroupID=" + GroupID); LV.OrderBy("LabelOrder"); ShowData(); }
void DefineView() { LB = new MyListBox(listBox1, "select * from NoteGroups order by GroupOrder", "GroupName", "GroupID", Global.con); CBB = new MyComboBox(comboBox1, "select * from NoteGroups order by GroupOrder", "GroupName", "GroupID", Global.con); try { LB.SelectedIndex = 0; } catch { LB.SelectedIndex = -1; } //==== LV = new MyListViewA(listView1); LV.SetDB(Global.con, "Notes"); LV.ColumnWidths = new int[] { 0, 0, 0, 150, 220 };//列宽(默认80) LV.RowHeight = 30; //LV.AlignCenter = true; LV.SetStyle("Cambria", 14, FontStyle.Bold); LV.QueryFields = "NoteID,GroupID,Content,TimeOfRevision as 修改时间,Title as 笔记标题"; LV.OrderBy("TimeOfRevision desc"); ShowData(); }