public static GKListView CreateRecordsView(Panel parent, IBaseContext baseContext, GDMRecordType recType) { if (parent == null) { throw new ArgumentNullException("parent"); } if (baseContext == null) { throw new ArgumentNullException("baseContext"); } GKListView recView = new GKListView(); recView.ListMan = ListManager.Create(baseContext, recType); parent.Content = recView; return(recView); }
public int CompareTo(object obj) { GKListSubItem otherItem = obj as GKListSubItem; if (otherItem == null) { return(-1); } if (fValue is string && otherItem.fValue is string) { return(GKListView.StrCompareEx((string)fValue, (string)otherItem.fValue)); } IComparable cv1 = fValue as IComparable; IComparable cv2 = otherItem.fValue as IComparable; int compRes; if (cv1 != null && cv2 != null) { compRes = cv1.CompareTo(cv2); } else if (cv1 != null) { compRes = -1; } else if (cv2 != null) { compRes = 1; } else { compRes = 0; } return(compRes); }
public GKSheetList(Panel owner) { if (owner == null) { throw new ArgumentNullException("owner"); } fBtnMoveDown = new Button(); fBtnMoveDown.Image = UIHelper.LoadResourceImage("Resources.btn_down.gif"); fBtnMoveDown.Size = UIHelper.ShortButtonSize; fBtnMoveDown.ToolTip = LangMan.LS(LSID.LSID_RecordMoveDown); fBtnMoveDown.Click += ItemMoveDown; fBtnMoveUp = new Button(); fBtnMoveUp.Image = UIHelper.LoadResourceImage("Resources.btn_up.gif"); fBtnMoveUp.Size = UIHelper.ShortButtonSize; fBtnMoveUp.ToolTip = LangMan.LS(LSID.LSID_RecordMoveUp); fBtnMoveUp.Click += ItemMoveUp; fBtnLinkJump = new Button(); fBtnLinkJump.Image = UIHelper.LoadResourceImage("Resources.btn_jump.gif"); fBtnLinkJump.Size = UIHelper.ShortButtonSize; fBtnLinkJump.ToolTip = LangMan.LS(LSID.LSID_RecordGoto); fBtnLinkJump.Click += ItemJump; fBtnDelete = new Button(); fBtnDelete.Image = UIHelper.LoadResourceImage("Resources.btn_rec_delete.gif"); fBtnDelete.Size = UIHelper.ShortButtonSize; fBtnDelete.ToolTip = LangMan.LS(LSID.LSID_MIRecordDelete); fBtnDelete.Click += ItemDelete; fBtnEdit = new Button(); fBtnEdit.Image = UIHelper.LoadResourceImage("Resources.btn_rec_edit.gif"); fBtnEdit.Size = UIHelper.ShortButtonSize; fBtnEdit.ToolTip = LangMan.LS(LSID.LSID_MIRecordEdit); fBtnEdit.Click += ItemEdit; fBtnAdd = new Button(); fBtnAdd.Image = UIHelper.LoadResourceImage("Resources.btn_rec_new.gif"); fBtnAdd.Size = UIHelper.ShortButtonSize; fBtnAdd.ToolTip = LangMan.LS(LSID.LSID_MIRecordAdd); fBtnAdd.Click += ItemAdd; fList = new GKListView(); fList.MouseDoubleClick += List_DoubleClick; fList.KeyDown += List_KeyDown; SuspendLayout(); var toolbar = new DefStackLayout(Orientation.Vertical, 4, fBtnAdd, fBtnEdit, fBtnDelete, fBtnLinkJump, fBtnMoveUp, fBtnMoveDown); var tab = new TableLayout(2, 1); tab.Spacing = new Size(4, 4); tab.SetColumnScale(0, true); tab.SetColumnScale(1, false); tab.Add(fList, 0, 0); tab.Add(toolbar, 1, 0); Content = tab; ResumeLayout(); owner.SuspendLayout(); owner.Content = this; owner.ResumeLayout(); fButtons = EnumSet <SheetButton> .Create(SheetButton.lbAdd, SheetButton.lbEdit, SheetButton.lbDelete); fListModel = null; }
public GKSheetList(Control owner) { if (owner == null) { throw new ArgumentNullException("owner"); } fBtnMoveDown = new ToolStripButton(); fBtnMoveDown.Image = GKResources.iDown; fBtnMoveDown.ToolTipText = LangMan.LS(LSID.LSID_RecordMoveDown); fBtnMoveDown.Click += ItemMoveDown; fBtnMoveUp = new ToolStripButton(); fBtnMoveUp.Image = GKResources.iUp; fBtnMoveUp.ToolTipText = LangMan.LS(LSID.LSID_RecordMoveUp); fBtnMoveUp.Click += ItemMoveUp; fBtnLinkJump = new ToolStripButton(); fBtnLinkJump.Image = GKResources.iToMan; fBtnLinkJump.ToolTipText = LangMan.LS(LSID.LSID_RecordGoto); fBtnLinkJump.Click += ItemJump; fBtnDelete = new ToolStripButton(); fBtnDelete.Name = "btnDelete"; fBtnDelete.Image = GKResources.iRecDelete; fBtnDelete.ToolTipText = LangMan.LS(LSID.LSID_MIRecordDelete); fBtnDelete.Click += ItemDelete; fBtnEdit = new ToolStripButton(); fBtnEdit.Name = "btnEdit"; fBtnEdit.Image = GKResources.iRecEdit; fBtnEdit.ToolTipText = LangMan.LS(LSID.LSID_MIRecordEdit); fBtnEdit.Click += ItemEdit; fBtnAdd = new ToolStripButton(); fBtnAdd.Name = "btnAdd"; fBtnAdd.Image = GKResources.iRecNew; fBtnAdd.ToolTipText = LangMan.LS(LSID.LSID_MIRecordAdd); fBtnAdd.Click += ItemAdd; fToolBar = new ToolStrip(); fToolBar.Name = "ToolBar"; fToolBar.Dock = DockStyle.Right; fToolBar.Items.AddRange(new ToolStripItem[] { fBtnAdd, fBtnEdit, fBtnDelete, fBtnLinkJump, fBtnMoveUp, fBtnMoveDown }); fToolBar.GripStyle = ToolStripGripStyle.Hidden; fToolBar.ImageScalingSize = new Size(24, 20); fToolBar.AutoSize = true; fToolBar.ShowItemToolTips = true; fList = new GKListView(); fList.Dock = DockStyle.Fill; fList.Location = new Point(0, 0); fList.Size = new Size(500, 290); fList.HideSelection = false; fList.LabelEdit = false; fList.FullRowSelect = true; fList.View = View.Details; fList.DoubleClick += List_DoubleClick; fList.KeyDown += List_KeyDown; SuspendLayout(); Controls.Add(fList); Controls.Add(fToolBar); ResumeLayout(false); Dock = DockStyle.Fill; owner.SuspendLayout(); owner.Controls.Add(this); owner.ResumeLayout(false); fButtons = EnumSet <SheetButton> .Create(SheetButton.lbAdd, SheetButton.lbEdit, SheetButton.lbDelete); fListModel = null; }
public LVColumnSorter(GKListView owner) { fOwner = owner; }
public GKListViewItems(GKListView listView) { fListView = listView; }