public DocumentSender() { styleComplete.Alternate = false; styleComplete.BackBrush.Color = Colors.Green.WithAlpha(80 / 255); styleComplete.BackBrush.ColorSelect = Colors.Green.WithAlpha(150 / 255); styleDefault.Alternate = false; styleDefault.BackBrush.Color = Colors.White.WithAlpha(80 / 255); styleDefault.BackBrush.ColorSelect = Colors.White.WithAlpha(150 / 255); styleError.Alternate = false; styleError.BackBrush.Color = Colors.Red.WithAlpha(80 / 255); styleError.BackBrush.ColorSelect = Colors.Red.WithAlpha(150 / 255); listUsers = new FlowTree() { AllowCheck = true, CheckRecursive = false, CheckClearBase = true, ShowUser = true }; toolNext = new ToolMenuItem { Name = "Next", DropDown = new Menubar { Name = "Next" } }; toolNext.ItemClick += ToolNextItemClick; toolForward = new ToolMenuItem { Name = "Forward" }; toolReturn = new ToolMenuItem { Name = "Return" }; toolComplete = new ToolMenuItem { Name = "Complete" }; toolRecovery = new ToolMenuItem() { Name = "Recovery" }; toolType = new ToolDropDown( toolNext, toolForward, toolReturn, toolComplete, toolRecovery) { Name = "Type", DisplayStyle = ToolItemDisplayStyle.Text }; toolType.ItemClick += ToolTypeItemClicked; toolAccept.Name = "Send"; toolPrint = new ToolItem(ToolPrintClick) { Name = "Print", DisplayStyle = ToolItemDisplayStyle.Text }; toolProgress = new ToolProgressBar() { Name = "Progress", Visible = false }; bar.Items[0].InsertAfter(new ToolItem[] { toolType, toolProgress }); listDocuments = new DocumentLayoutList() { EditState = EditListState.ReadOnly, GenerateToString = false, GenerateColumns = false, Name = "Documents", ReadOnly = true, ListInfo = new LayoutListInfo( new LayoutColumn() { Name = "Document", Width = 250 }, new LayoutColumn() { Name = "Work", Width = 150 }, new LayoutColumn() { Name = "Message", FillWidth = true }) { StyleRow = styleDefault }, ListSource = new SelectableListView <DocumentSendItem>(items) }; listDocuments.GetCellStyle += OnListDocumentsGetCellStyle; groupBox = new GroupBox( new GroupBoxItem() { Widget = listDocuments, Name = "Documents", FillHeight = true, FillWidth = true }, new GroupBoxItem() { Widget = listUsers, Name = "Users", FillHeight = true, FillWidth = true, Row = 1 }) { Name = "GroupMap" }; Mode = ToolShowMode.Dialog; Name = "DocumentSender"; Target = groupBox; Size = new Size(640, 640); }
public DocumentListView() { filterClear = new ToolItem(FilterClearClick) { Name = "Clear", Glyph = GlyphType.Eraser }; filterWork = new ToolItem((s, e) => { Filter.IsWork = filterWork.Checked ? CheckedState.Checked : CheckedState.Indeterminate; }) { Name = "Work", DisplayStyle = ToolItemDisplayStyle.Text, CheckOnClick = true }; filterCurrent = new ToolItem((s, e) => { Filter.IsCurrent = filterCurrent.Checked; }) { Name = "TODO", DisplayStyle = ToolItemDisplayStyle.Text, CheckOnClick = true }; filterToolView = new ToolFieldEditor { FillWidth = true, Name = nameof(Filter), DisplayStyle = ToolItemDisplayStyle.Text }; filterCustomer = new ToolFieldEditor { FillWidth = true, Name = nameof(DocumentFilter.Customer), DisplayStyle = ToolItemDisplayStyle.Text }; filterNumber = new ToolFieldEditor { FillWidth = true, Name = nameof(DocumentFilter.Number), DisplayStyle = ToolItemDisplayStyle.Text }; filterTitle = new ToolFieldEditor { FillWidth = true, Name = nameof(DocumentFilter.Title), DisplayStyle = ToolItemDisplayStyle.Text }; filterDate = new ToolFieldEditor { FillWidth = true, Name = nameof(DocumentFilter.Date), DisplayStyle = ToolItemDisplayStyle.Text }; var filterGroup = new ToolItem { Row = 1, Name = "FilterBar" }; filterGroup.AddRange(new ToolItem[] { filterToolView, filterCustomer, filterNumber, filterTitle, filterDate, new ToolSeparator { Width = 20 }, filterWork, filterCurrent, filterClear }); ofDialog = new OpenFileDialog() { Multiselect = true }; loader = new TableLoader { LoadParam = DBLoadParam.Referencing }; toolCreate = new ToolItem(ToolCreateClick) { DisplayStyle = ToolItemDisplayStyle.Text, Name = "Create", GlyphColor = Colors.Green, Glyph = GlyphType.PlusCircle }; toolCopy = new ToolItem(ToolCopyClick) { DisplayStyle = ToolItemDisplayStyle.Text, Name = "Copy", Glyph = GlyphType.CopyAlias }; toolLoad = new ToolItem(ToolLoadClick) { DisplayStyle = ToolItemDisplayStyle.Text, Name = "Load", Glyph = GlyphType.Download }; toolSend = new ToolItem(ToolAcceptClick) { DisplayStyle = ToolItemDisplayStyle.Text, Name = "Send/Accept", Glyph = GlyphType.CheckCircle }; toolCount = new ToolLabel { Text = "0" }; toolPreview = new ToolItem(ToolPreviewClick) { CheckOnClick = true, Checked = true, Name = "Preview", Glyph = GlyphType.List }; toolParam = new ToolDropDown(ToolParamClick) { Name = "Parameters", Glyph = GlyphType.Spinner }; toolProgress = new ToolTableLoader { Loader = loader }; bar = new Toolsbar( toolCreate, toolCopy, toolLoad, new ToolSeparator { FillWidth = true }, toolCount, toolPreview, toolProgress, filterGroup) { Name = "DocumentListBar" }; list = new DocumentLayoutList() { EditMode = EditModes.ByF2, Name = "DocumentList", ReadOnly = true }; list.CellDoubleClick += ListCellMouseDoubleClick; list.PositionChanged += ListOnPositionChanged; list.SelectionChanged += ListOnSelectionChanged; //hSplit.Panel1.Resize = false; //hSplit.Panel2.Resize = true; //hSplit.Panel2.Content = vSplit; PackStart(bar, false, false); PackStart(list, true, true); Name = "DocumentListView"; Documents = new DBTableView <Document>(); Filter = new DocumentFilter(); }