public UserEditor() { //var info = new LayoutFieldInfo(); //info.Columns.Indent = 6; //info.Nodes.Add(new LayoutField("UserType")); //info.Nodes.Add(new LayoutField("Parent")); //info.Nodes.Add(new LayoutField("Position")); //info.Nodes.Add(new LayoutField("Login")); //info.Nodes.Add(new LayoutField("Password")); //info.Nodes.Add(new LayoutField("Name")); //info.Nodes.Add(new LayoutField("EMail")); var f = new LayoutList { AllowCellSize = true, CheckView = false, EditMode = EditModes.ByClick, EditState = EditListState.Edit, Mode = LayoutListMode.Fields, Name = "fields", Text = "Attributes" }; fields = new ListEditor(f); fields.Saving += OnFieldsSaving; groups = new AccessEditor() { Name = "Groups" }; groupAttributes = new GroupBoxItem { Widget = fields, FillWidth = true, FillHeight = true, Name = "Parameters" }; groupGroups = new GroupBoxItem() { Column = 2, Widget = groups, Width = 252, Name = "Groups" }; groupMap = new GroupBox(groupAttributes, groupGroups); Name = "UserEditor"; Text = "User Editor"; ((Box)fields.Bar.Parent).Remove(fields.Bar); PackStart(fields.Bar, false, false); PackStart(groupMap, true, true); Localize(); User.DBTable.RowUpdated += OnRowUpdated; }
public DiffTest() { textALabel = new Label() { Text = "Param1:", TextAlignment = Alignment.Center }; textBLabel = new Label() { Text = "Param2:", TextAlignment = Alignment.Center }; textA = new TextEntry() { Text = "Sequential Read: Up to 550 MB/s " }; textB = new TextEntry() { Text = "Sequential Write: Up to 510 MB/s " }; testChar = new Button() { Label = "Test Char" }; testChar.Clicked += TestCharOnClick; testWord = new Button() { Label = "Test Word" }; testWord.Clicked += TestWordOnClick; result = new LayoutList() { GenerateToString = false }; result.SelectionChanged += result_SelectionChanged; panel = new Table(); panel.Add(textALabel, 0, 0); panel.Add(textA, 1, 0, colspan: 2, hexpand: true); panel.Add(textBLabel, 0, 1); panel.Add(textB, 1, 1, colspan: 2, hexpand: true); panel.Add(testChar, 0, 2); panel.Add(testWord, 1, 2, hexpand: false); //test.RowSpan = itemParam = new GroupBoxItem() { Widget = panel, FillWidth = true, Name = "Params" }; itemResult = new GroupBoxItem() { Widget = result, Row = 1, FillHeight = true, Name = "Result" }; map = new GroupBox(itemParam, itemResult); PackStart(map, true, true); Text = "Diff Test"; }
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); }