Exemplo n.º 1
0
        public RowDeleting()
        {
            toolProgress = new ToolProgressBar {
                Name = "toolProgress", DisplayStyle = ToolItemDisplayStyle.Text
            };

            list = new LayoutList()
            {
                GenerateToString = false,
                GenerateColumns  = false,
                Name             = "list",
                Text             = "Reference List",
                ListInfo         = new LayoutListInfo(
                    new[] {
                    new LayoutColumn {
                        Name = nameof(ToString), FillWidth = true
                    },
                    new LayoutColumn {
                        Name = nameof(DBItem.Table), Width = 100, Visible = false
                    },
                    new LayoutColumn {
                        Name = nameof(DBItem.Status), Width = 100
                    },
                    new LayoutColumn {
                        Name = nameof(DBItem.UpdateState), Width = 100
                    },
                    new LayoutColumn {
                        Name = nameof(DBItem.Attached), Width = 30
                    }
                },
                    new[] { new LayoutSort("Table", ListSortDirection.Ascending, true) })
                {
                    ColumnsVisible = false,
                },
                ListSource = rows
            };

            bar.Add(toolProgress);

            Label.Text = "Row Deleting";

            Name   = "RowDeleting";
            Target = list;
            Mode   = ToolShowMode.Modal;
            Size   = new Size(800, 600);
            Localizing();
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public DataExport()
        {
            toolInit = new ToolItem(ToolInitClick)
            {
                Name = "Init", DisplayStyle = ToolItemDisplayStyle.Text
            };
            toolScript = new ToolItem(ToolScriptClick)
            {
                Name = "Script", DisplayStyle = ToolItemDisplayStyle.Text
            };
            toolCode = new ToolItem(ToolCodeClick)
            {
                Name = "Code", DisplayStyle = ToolItemDisplayStyle.Text
            };
            toolSchema = new ToolItem(ToolSchemaClick)
            {
                Name = "Schema", DisplayStyle = ToolItemDisplayStyle.Text
            };
            toolStart = new ToolItem(ToolStartClick)
            {
                Name = "Start", DisplayStyle = ToolItemDisplayStyle.Text
            };
            toolCancel = new ToolItem(ToolCancelClick)
            {
                Name = "Cancel", Sensitive = false, DisplayStyle = ToolItemDisplayStyle.Text
            };
            toolProgress = new ToolProgressBar {
                Name = "Progress"
            };

            tools = new Toolsbar(
                toolInit,
                toolScript,
                toolCode,
                toolSchema,
                toolStart,
                toolCancel,
                toolProgress)
            {
                Name = "tools"
            };


            listTables = new ListEditor()
            {
                Name = "listTables", ReadOnly = false
            };
            listTables.List.SelectionChanged += ListTablesOnSelectionChahged;
            listTables.List.AllowCheck        = true;
            listTables.List.AllowSort         = false;
            listTables.List.EditMode          = EditModes.ByF2;

            listColumns = new ListEditor()
            {
                Name = "listColumns", ReadOnly = false
            };
            listColumns.List.AllowCheck = true;
            listColumns.List.AllowSort  = false;
            listColumns.List.EditMode   = EditModes.ByF2;

            setting = new TableLayoutList()
            {
                EditMode  = EditModes.ByClick,
                EditState = EditListState.Edit,
                Mode      = LayoutListMode.List,
                Name      = "setting",
                Text      = "Settings"
            };

            var gSetting = new GroupBoxItem()
            {
                Name          = "Setting",
                Widget        = setting,
                Column        = 0,
                Row           = 0,
                Autosize      = false,
                DefaultHeight = 250,
                Width         = 300
            };

            var gTable = new GroupBoxItem()
            {
                Name          = "Tables",
                Widget        = listTables,
                Column        = 1,
                Row           = 0,
                Autosize      = false,
                FillWidth     = true,
                DefaultHeight = 250
            };

            var gColumn = new GroupBoxItem()
            {
                Name       = "Columns",
                Widget     = listColumns,
                Column     = 0,
                Row        = 1,
                FillWidth  = true,
                FillHeight = true
            };

            map = new GroupBox(gSetting, gTable, gColumn);

            Name = "DataExport";
            Text = "Export";

            PackStart(tools, false, false);
            PackStart(map, true, true);
        }