private FunctionGlobalGroup _CreateGroupData() { FunctionGlobalGroup group = new FunctionGlobalGroup(this); group.Title = "Data k ukládání 2018"; group.Order = "A1"; group.ToolTipTitle = "PRÁCE S DATY (c)2018"; group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Image, Size = FunctionGlobalItemSize.Whole, Image = App.ResourcesApp.GetImage(RES.Images.Actions24.DashboardShowPng), Text = "DJ soft", UserData = "Rtf" }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Small, Image = App.ResourcesApp.GetImage(RES.Images.Actions24.DocumentSave2Png), Text = "Uložit", ToolTip = "Uloží dokument jako by se nechumelilo", LayoutHint = LayoutHint.NextItemOnSameRow }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Small, Image = App.ResourcesApp.GetImage(RES.Images.Actions24.DocumentSaveAs2Png), Text = "Založit jako...", ToolTip = "Založí někam dokument tak, že nebude k nalezení", LayoutHint = LayoutHint.NextItemSkipToNextRow }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Half, Image = App.ResourcesApp.GetImage(RES.Images.Actions24.DocumentExport2Png), Text = "Exportovat dokument", ToolTip = "Exportuje dokument tak, aby jej všichni viděli", LayoutHint = LayoutHint.NextItemSkipToNextRow }); group.ItemClicked += new FunctionItemEventHandler(_ItemInGroupClick); return(group); }
/// <summary> /// Return compare result (a.Order - b.Order), StringComparison.InvariantCulture /// </summary> /// <param name="a"></param> /// <param name="b"></param> /// <returns></returns> internal static int SortByOrder(FunctionGlobalGroup a, FunctionGlobalGroup b) { if (a == null && b == null) { return(0); } if (a == null) { return(-1); } if (b == null) { return(1); } string ax = a.Order; string bx = b.Order; int cmp = String.Compare(ax, bx, StringComparison.InvariantCulture); if (cmp == 0) { cmp = a.Id.CompareTo(b.Id); } return(cmp); }
private FunctionGlobalGroup _CreateGroupEdit() { FunctionGlobalGroup group = new FunctionGlobalGroup(this); group.Title = "Editace položek"; group.Order = "A2"; group.ToolTipTitle = "EDITACE POLOŽEK"; group.LayoutWidth = 16; List <FunctionGlobalItem> items = new List <FunctionGlobalItem>(); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Small, Image = App.ResourcesApp.GetImage(RES.Images.Actions24.EditCopy2Png), Text = "Copy", ToolTip = "", LayoutHint = LayoutHint.NextItemSkipToNextRow }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Small, Image = App.ResourcesApp.GetImage(RES.Images.Actions24.EditCut2Png), Text = "Cut", ToolTip = "", LayoutHint = LayoutHint.NextItemSkipToNextRow }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Small, Image = App.ResourcesApp.GetImage(RES.Images.Actions24.EditPaste2Png), Text = "Paste", ToolTip = "", LayoutHint = LayoutHint.NextItemSkipToNextRow }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Micro, Image = App.ResourcesApp.GetImage(RES.Images.Actions16.EditPaste2Png), ToolTip = "Napastuje dokument" }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Micro, Image = App.ResourcesApp.GetImage(RES.Images.Actions16.EditUndo2Png), ToolTip = "Undoluje obsah" }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Micro, Image = App.ResourcesApp.GetImage(RES.Images.Actions16.EditRedo2Png), ToolTip = "Redohodí to co jste nečekali" }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Micro, Image = App.ResourcesApp.GetImage(RES.Images.Actions16.ViewRefresh2Png), ToolTip = "Přenačte něco málo z databáze" }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Large, Image = App.ResourcesApp.GetImage(RES.Images.Actions24.ArrowLeft2Png), Text = "", ToolTip = "Jděte vlevo" }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Large, Image = App.ResourcesApp.GetImage(RES.Images.Actions24.ArrowRight2Png), Text = "", ToolTip = "Jděte vpravo", LayoutHint = LayoutHint.ThisItemOnSameRow }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Micro, Image = App.ResourcesApp.GetImage(RES.Images.Actions16.EditRedo4Png), ToolTip = "Zase to redo" }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Separator, Size = FunctionGlobalItemSize.Whole }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Half, Image = App.ResourcesApp.GetImage(RES.Images.Actions16.EditUndo6Png), Text = "UNDO", LayoutHint = LayoutHint.ThisItemSkipToNextTable }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Button, Size = FunctionGlobalItemSize.Half, Image = App.ResourcesApp.GetImage(RES.Images.Actions16.EditRedo6Png), Text = "REDO", LayoutHint = LayoutHint.ThisItemSkipToNextTable, IsEnabled = false }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Separator, Size = FunctionGlobalItemSize.Whole }); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Label, Size = FunctionGlobalItemSize.Small, Text = "Databáze:" }); this._DbCombo = new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.ComboBox, Size = FunctionGlobalItemSize.Half }; this._DbCombo.SubItemsEnumerateBefore += new FunctionItemEventHandler(_DbCombo_SubItemsEnumerateBefore); group.Items.Add(this._DbCombo); group.Items.Add(new FunctionGlobalItem(this) { ItemType = FunctionGlobalItemType.Separator, Size = FunctionGlobalItemSize.Whole }); FunctionGlobalItem fItem = group.Items[0]; group.SubItemsEnumerateBefore += _ItemInGroup_SubItemsEnumerateBefore; group.ItemClicked += _ItemInGroupClick; return(group); }