public LayoutGroupList(ILayoutList list) { this.list = list; items = new SelectableList <LayoutGroup>(); items.Indexes.Add(textValueInvoker); items.ApplySort(new PGroupComparer()); }
protected override ILayoutCellEditor GetCellEditor(object listItem, object itemValue, ILayoutCell cell) { if (cell == valueColumn && listItem != null) { var filter = (LayoutFilter)listItem; var edit = filter.Column.GetEditor(listItem) as CellEditorText; if (edit is CellEditorDate) { ((CellEditorDate)edit).TwoDate = true; } if (edit is CellEditorFields) { edit = new CellEditorList(); var list = new SelectableList <object>(); for (int i = 0; i < List.ListSource.Count; i++) { object value = List.ReadValue(i, filter.Column); if (!list.Contains(value)) { list.Add(value); } } ((CellEditorList)edit).DataSource = list; } return(edit); } return(base.GetCellEditor(listItem, itemValue, cell)); }
public virtual void Initialize(Type type) { if (ItemType != null) { return; } cacheColumns = new SelectableList <ColumnGenerator>(); cacheColumns.Indexes.Add(ColumnGenerator.ColumnNameInvoker.Instance); cacheColumns.Indexes.Add(ColumnGenerator.PropertyNameInvoker.Instance); cacheReferences = new SelectableList <ReferenceGenerator>(); cacheReferences.Indexes.Add(ReferenceGenerator.PropertyNameInvoker.Instance); cacheReferencings = new SelectableList <ReferencingGenerator>(); cacheReferencings.Indexes.Add(ReferencingGenerator.PropertyNameInvoker.Instance); cacheIndexes = new SelectableList <IndexGenerator>(); cacheIndexes.Indexes.Add(IndexGenerator.IndexNameInvoker.Instance); cacheItemTypes = new SelectableList <ItemTypeGenerator>(); ItemType = type; var types = TypeHelper.GetTypeHierarchi(type); foreach (var item in types) { InitializeType(item); } }
/// <summary> /// focus on a node. /// </summary> /// <param name="node"></param> public void FocusOn(Node node) { var parent = node.Parent ?? Root; var oldFocusList = FocusList; FocusList = parent.ChildNodeList; if (oldFocusList == FocusList) { FocusList.SelectItem(node); } else { if (oldFocusList != null) { oldFocusList.SelectionChanged -= FocusList_SelectionChanged; } if (node != null) { FocusList.SelectItem(node); } FocusList.SelectionChanged += FocusList_SelectionChanged; OnFocusNodeChanged?.Invoke(FocusList, new FocusNodeChangedArgs { SelectedNode = FocusList.SelectedItem, DeselectNode = oldFocusList?.SelectedItem }); } }
public static SelectableList <TestClass> Generate(int count) { SelectableList <TestClass> list = new SelectableList <TestClass> { Capacity = count }; Random rand = new Random(); for (int i = 0; i < count; i++) { TestClass tc = new TestClass(i, "TestClass" + i); if (Locale.Instance.Images.Count > 0) { tc.Image = Locale.Instance.Images[i % Locale.Instance.Images.Count].Image as Image; } tc.Enum = (TestEnum)(i % 4); tc.Flag = (TestFlag)(i % 15); if (i > 10) { tc.Group = list[rand.Next(0, i - 1)]; ((TestClass)tc.Group).List.Add(tc); } list.Add(tc); } return(list); }
public void Dispose() { using (Log.Block(FDKUtilities.現在のメソッド名)) { this.ユーザリスト = null; } }
public IListQuestionBuilder AsCheckList() { this._builderFunc = this._builderFunc.Compose(question => { SelectableList q = (question as SelectableList); CheckList q2 = new CheckList(q.Text, q.Options, q.Hint, q.DefaultAnswer, q.VisibleOptions, q.Questionnaire); return(q2); }); return(this); }
public SelectableListTest() { var stubList = new List <SelectableStub>(); for (var i = 0; i < ElementCount; i++) { stubList.Add(new SelectableStub()); } _selectableList = new SelectableList <SelectableStub>(stubList); }
public CellEditorGlyph() { var list = new SelectableList <GlyphView>(); var enumVals = Enum.GetValues(typeof(GlyphType)); foreach (var enumItem in enumVals) { list.Add(new GlyphView((GlyphType)enumItem)); } listSource = list; }
private static IList <ImageCell> CreateCells() { var sopInstanceUid = @"1.2.156.112605.161340985965.20140523064111.4.15276.1"; var cells = new SelectableList <ImageCell>(); for (int i = 0; i < 16; i++) { cells.Add(ImageCellFactory.CreateCell(sopInstanceUid)); } return(cells); }
public void DespawnSelectableList() { if (panel == null) { return; } Debug.Log("Destroying list"); panel.ClearSelection(); // clear our selection first, allows us to trigger things. DestroyImmediate(panel.gameObject); panel = null; }
public ユーザ管理() { using (Log.Block(FDKUtilities.現在のメソッド名)) { this.ユーザリスト = new SelectableList <ユーザ設定>(); // 現在は、AutoPlayer と Guest しかいない。 var user = (ユーザ設定)null; user = new ユーザ設定("AutoPlayer"); if (null == user.ユーザID) // DBにいない { Log.Info("ユーザ AutoPlayer がデータベースに存在していません。"); user = ユーザ設定.作成する(new User() { Id = "AutoPlayer", Name = "AutoPlayer", }); Log.Info("ユーザ AutoPlayer を作成しました。"); } if (null != user) { this.ユーザリスト.Add(user); } user = new ユーザ設定("Guest"); if (null == user.ユーザID) // DBにいない { user = ユーザ設定.作成する(new User() { Id = "Guest", Name = "Guest", AutoPlay_LeftCymbal = 0, AutoPlay_HiHat = 0, AutoPlay_LeftPedal = 0, AutoPlay_Snare = 0, AutoPlay_Bass = 0, AutoPlay_HighTom = 0, AutoPlay_LowTom = 0, AutoPlay_FloorTom = 0, AutoPlay_RightCymbal = 0, // 他は規定値 }); } if (null != user) { this.ユーザリスト.Add(user); } } }
public ユーザ管理() { this.ユーザリスト = new SelectableList <ユーザ設定>(); // 現在は、AutoPlayer と Guest しかいない。 var user = (ユーザ設定)null; user = new ユーザ設定("AutoPlayer"); if (null == user.ユーザID) // DBにいない { user = ユーザ設定.作成する(new User() { Id = "AutoPlayer", Name = "AutoPlayer", }); } if (null != user) { this.ユーザリスト.Add(user); } user = new ユーザ設定("Guest"); if (null == user.ユーザID) // DBにいない { user = ユーザ設定.作成する(new User() { Id = "Guest", Name = "Guest", AutoPlay_LeftCymbal = 0, AutoPlay_HiHat = 0, AutoPlay_LeftPedal = 0, AutoPlay_Snare = 0, AutoPlay_Bass = 0, AutoPlay_HighTom = 0, AutoPlay_LowTom = 0, AutoPlay_FloorTom = 0, AutoPlay_RightCymbal = 0, // 他は規定値 }); } #if DEBUG_ // hack: テストコード: デバッグ用に固定パスを使用する。 user.曲検索フォルダ.Add(new VariablePath(@"$(Exe)..\..\..\曲データ")); #endif if (null != user) { this.ユーザリスト.Add(user); } }
private void CreateARandomSelectableList() { for (var i = 0; i < _elements.Count; i++) { _elements[i].IsSelected = _random.Next() % 2 == 0; } var randomFocusIndex = _random.Next() % (_elements.Count + 1) - 1; // From -1 to _elements.Count-1 if (randomFocusIndex != -1) { _elements[randomFocusIndex].IsFocused = true; } _selectableList = new SelectableList <SelectableStub>(_elements); }
private void ToolDBGenerateClick(object sender, EventArgs e) { var assemblyList = new SelectableList <AsseblyCheck>(); string[] asseblies = Directory.GetFiles(Helper.GetDirectory(), "*.dll"); foreach (string dll in asseblies) { AssemblyDefinition assemblyDefinition = null; try { assemblyDefinition = AssemblyDefinition.ReadAssembly(dll); } catch { continue; } var moduleAttribute = assemblyDefinition.CustomAttributes .Where(item => item.AttributeType.Name == nameof(AssemblyMetadataAttribute)) .Select(item => item.ConstructorArguments.Select(sitem => sitem.Value.ToString()) .ToArray()); if (moduleAttribute.Any(item => item[0] == "module")) { assemblyList.Add(new AsseblyCheck(Assembly.LoadFile(dll))); } } var list = new LayoutList { AllowCheck = true, CheckRecursive = true, AutoToStringFill = true, GenerateToString = true, GenerateColumns = false, ListSource = assemblyList }; var window = new ToolWindow { Title = "Select Assembly", Target = list }; window.Show(this, Point.Zero); window.ButtonAcceptClick += (s, a) => { var schema = new DBSchema("NewSchema"); schema.Generate(assemblyList.Where(p => p.Check).Select(p => p.Assembly)); DBService.Schems.Add(schema); ShowNewItem(schema); }; }
//public void IntDBSchema() //{ // toolTable.DropDownItems.Clear(); // if (state == SearchState.Edit) // foreach (DBSchema sc in DBService.Schems) // toolTable.DropDownItems.Add(InitSchemaTool(sc)); // else if (state == SearchState.Reference && owner != null) // if (owner.Column.IsPrimaryKey) // { // List<DBRelation> relations = owner.Column.Table.GetChildRelations(); // foreach (DBRelation relation in relations) // toolTable.DropDownItems.Add(InitTableTool(relation.Table)); // } // else if (owner.Column.ReferenceTable != null) // { // toolTable.DropDownItems.Add(InitTableTool(owner.Column.ReferenceTable)); // Table = owner.Column.ReferenceTable; // toolTable.Sensitive = false; // } //} protected ToolMenuItem InitSchemaTool(DBSchema schema) { var item = new ToolMenuItem { Tag = schema, Name = schema.Name, Text = schema.ToString(), DropDown = new Menubar { Name = schema.Name } }; var list = new SelectableList <DBTable>(schema.Tables); list.ApplySortInternal("Name", ListSortDirection.Ascending); foreach (DBTable ts in list) { if (ts.Access.GetFlag(AccessType.Admin, GuiEnvironment.User)) { item.DropDown.Items.Add(InitTableTool(ts)); } } return(item); }
/// <summary> /// Spawns our selectable list for selecting the placement objects. /// </summary> /// <param name="tool"></param> protected void SpawnSelectableList(Toggle toggle) { // If we already have a panel spawned and it's parented to the selected toggle, return if (panel != null && panel.transform.parent == toggle.transform) { return; } else if (panel != null) // otherwise, destroy it and we'll spawn our new one. { DespawnSelectableList(); } if (panel == null) { panel = Instantiate(Resources.Load("Prefabs/UI/HorizontalList") as GameObject, toggle.transform).GetComponent <SelectableList>(); switch (selectedTool.name) { case "Prop": SetupPropSelectableList(); break; case "Container": SetupContainerSelectableList(); break; case "Landscaping": SetupLandscapingSelectableList(); break; case "Plant": SetupPlantSelectableList(); break; default: Debug.LogWarning("[ToolsManager] Spawned a selectable list for a tool that doesn't need one."); break; } } }
private void ToolInsertTemplateClick(object sender, EventArgs e) { var list = new SelectableList <TemplateData>(Document.Template.GetReferencing <TemplateData>(nameof(TemplateData.TemplateId), DBLoadParam.None)); var listView = new LayoutList { ListSource = list }; var window = new ToolWindow { Target = listView }; window.ButtonAcceptClick += (s, a) => { if (listView.SelectedItem == null) { return; } var data = Document.GenerateFromTemplate <T>((TemplateData)listView.SelectedItem); data.Attach(); Current = data; ToolTemplateClick(s, a); }; window.Show(Bar, toolAdd.Bound.BottomLeft); }
public void Setup() { list = new SelectableList <TestClass>(); list.Indexes.Add(new ActionInvoker <TestClass, int>(nameof(TestClass.Field), (item) => item.Field, (item, value) => item.Field = value)); list.AddRange(new[] { new TestClass() { Name = "System", Field = 1, X = 0, Y = 1 }, new TestClass() { Name = "System.Collections", Field = 2, X = 1, Y = 2 }, new TestClass() { Name = "System.Diagnostics", Field = 3, X = 1, Y = 3 }, new TestClass() { Name = "System.Linq", Field = 4, X = 2, Y = 4 }, new TestClass() { Name = "System.Text", Field = 5, X = 2, Y = 5 }, new TestClass() { Name = "System.Threading", Field = 6, X = 3, Y = 6 }, new TestClass() { Name = "System.Threading.Task", Field = 7, X = 3, Y = 7 } }); }
public override void SetValue(SelectableList <T> target, bool value) { }
public static IQuestionnaire SingleSelectListQuestion(this IQuestionnaire questionnaire, SelectableList question) { if (question == null) { throw new System.ArgumentNullException(nameof(question)); } return(questionnaire.Add(question)); }
public static SelectableList <TestResult> Test(int c = 100000) { var list = new SelectableList <TestResult>(); var test = new TestClass(); var aTest = test as TestAbstract; var iTest = test as IOrder; var pOrder = test.GetType().GetProperty("Order"); var pItem = test.GetType().GetProperty("Item", new Type[] { typeof(string) }); var cDefault = typeof(TestClass).GetConstructor(Type.EmptyTypes); var cParam = typeof(TestClass).GetConstructor(new Type[] { typeof(int), typeof(string) }); var aOrder = EmitInvoker.Initialize(pOrder); var aItem = EmitInvoker.Initialize(pItem, "fdsfds"); var aDefault = EmitInvoker.Initialize(cDefault); var aParam = EmitInvoker.Initialize(cParam); var param = new object[] { "cfsdf" }; var paramDefault = new object[] { }; var paramParam = new object[] { 12, "1dasdas" }; var actionBinder = new ActionInvoker <TestClass, int>( nameof(TestClass.Order), (item) => item.Order, (item, value) => item.Order = value); int val; string sval; object oval; Stopwatch watch = new Stopwatch(); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { val = actionBinder.GetValue(test); //tc.Order = val; } watch.Stop(); list.Add(new TestResult("Property Get", "Action", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { val = test.Order; //tc.Order = val; } watch.Stop(); list.Add(new TestResult("Property Get", "Direct", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { val = aTest.Order; //tc.Order = val; } watch.Stop(); list.Add(new TestResult("Property Get", "Abstract", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { val = iTest.Order; //tc.Order = val; } watch.Stop(); list.Add(new TestResult("Property Get", "Interface", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { oval = pOrder.GetValue(test, null); } watch.Stop(); list.Add(new TestResult("Property Get", "Reflection", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { val = (int)pOrder.GetValue(test, null); } watch.Stop(); list.Add(new TestResult("Property Get", "Reflection UNBOX", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { oval = aOrder.GetValue(test); } watch.Stop(); list.Add(new TestResult("Property Get", "Emit Invoke", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { val = (int)aOrder.GetValue(test); } watch.Stop(); list.Add(new TestResult("Property Get", "Emit Invoke UNBOX", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { sval = test["fsdfdsf"]; } watch.Stop(); list.Add(new TestResult("Property Index", "Direct", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { oval = pItem.GetValue(test, param); } watch.Stop(); list.Add(new TestResult("Property Index", "Reflection", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { sval = (string)pItem.GetValue(test, param); } watch.Stop(); list.Add(new TestResult("Property Index", "Reflection UNBOX", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { oval = aItem.GetValue(test); } watch.Stop(); list.Add(new TestResult("Property Index", "Emit Invoke", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { sval = (string)aItem.GetValue(test); } watch.Stop(); list.Add(new TestResult("Property Index", "Emit Invoke UNBOX", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { test = new TestClass(); } watch.Stop(); list.Add(new TestResult("Constructor", "Direct", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { test = (TestClass)cDefault.Invoke(paramDefault); } watch.Stop(); list.Add(new TestResult("Constructor", "Reflection UNBOX", watch.Elapsed)); watch.Reset(); watch.Start(); //object[] obj = new object[] { }; for (int i = 0; i <= c; i++) { test = (TestClass)aDefault.Create(paramDefault); } watch.Stop(); list.Add(new TestResult("Constructor", "Emit Invoke UNBOX", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { test = new TestClass(12, "dsadas"); } watch.Stop(); list.Add(new TestResult("Constructor Params", "Direct", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { oval = cParam.Invoke(paramParam); } watch.Stop(); list.Add(new TestResult("Constructor Params", "Reflection", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { test = (TestClass)cParam.Invoke(paramParam); } watch.Stop(); list.Add(new TestResult("Constructor Params", "Reflection UNBOX", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { oval = aParam.Create(paramParam); } watch.Stop(); list.Add(new TestResult("Constructor Params", "Emit Invoke", watch.Elapsed)); watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { test = (TestClass)aParam.Create(paramParam); } watch.Stop(); list.Add(new TestResult("Constructor Params", "Emit Invoke UNBOX", watch.Elapsed)); TestClass p1 = new TestClass(123112365, "test string compa3rision"); TestClass p2 = new TestClass(124312312, "test string comp4arision"); //Compare string watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { p1.Comment.CompareTo(p2.Comment); } watch.Stop(); list.Add(new TestResult("Compare String", "Direct", watch.Elapsed)); //Compare string Invariant watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { CultureInfo.InvariantCulture.CompareInfo.Compare(p1.Comment, p2.Comment, CompareOptions.Ordinal); } watch.Stop(); list.Add(new TestResult("Compare String", "Direct Invariant", watch.Elapsed)); //Compare Accessor string watch.Reset(); watch.Start(); var ce = new InvokerComparer(EmitInvoker.Initialize(typeof(TestClass).GetProperty("Comment")), ListSortDirection.Ascending); for (int i = 0; i <= c; i++) { ce.Compare(p1, p2); } watch.Stop(); list.Add(new TestResult("Compare String", "Emit Invoke Property", watch.Elapsed)); //Compare integer watch.Reset(); watch.Start(); for (int i = 0; i <= c; i++) { p1.Order.CompareTo(p2.Order); } watch.Stop(); list.Add(new TestResult("Compare Int", "Direct", watch.Elapsed)); //Compare Accessor Int watch.Reset(); watch.Start(); ce = new InvokerComparer(EmitInvoker.Initialize(typeof(TestClass).GetProperty("Order")), ListSortDirection.Ascending); for (int i = 0; i <= c; i++) { ce.Compare(p1, p2); } watch.Stop(); list.Add(new TestResult("Compare Int", "Emit Invoke Property", watch.Elapsed)); return(list); }
public override IComparer <T> GetValue(SelectableList <T> target) => target.Comparer;
public override void SetValue(SelectableList <T> target, IComparer <T> value) { }
public ChangeViewer() { toolRefresh = new ToolItem(ToolRefreshClick) { Name = "Refresh", Text = "Refresh", Glyph = GlyphType.Refresh }; toolAccept = new ToolItem(ToolAcceptClick) { Name = "Accept", Text = "Accept", Glyph = GlyphType.Check }; toolReject = new ToolItem(ToolRejectClick) { Name = "Reject", Text = "Reject", Glyph = GlyphType.Undo }; toolDetails = new ToolItem(ToolDetailsClick) { Name = "Details", Text = "Details", Glyph = GlyphType.Tag }; tools = new Toolsbar(toolRefresh, toolAccept, toolReject, toolDetails) { Name = "Bar" }; listObjects = new DataTree() { Name = "listObjects", DataKeys = DataTreeKeys.CheckTableAdmin | DataTreeKeys.Table | DataTreeKeys.Schema }; listObjects.ListInfo.Columns.Add("Count", 35); listObjects.BuildColumn(listObjects.ListInfo, null, "Count"); listObjects.SelectionChanged += ListObjectsSelectionChanged; listRows = new LayoutList() { EditMode = EditModes.None, EditState = EditListState.Edit, GenerateColumns = false, GenerateToString = false, Mode = LayoutListMode.List, Name = "listRows" }; listRows.ListInfo.Columns.Add("Row.Status", 60); listRows.ListInfo.Columns.Add("Row", 200).FillWidth = true; listRows.ListInfo.Columns.Add("User", 100).FillWidth = true; listRows.SelectionChanged += RowsSelectionChanged; listDiff.EditMode = EditModes.None; listDiff.EditState = EditListState.Edit; listDiff.GenerateColumns = false; listDiff.GenerateToString = false; listDiff.Mode = LayoutListMode.List; listDiff.Name = "listDiff"; listDiff.Text = "listdetails"; listDiff.ListInfo.Columns.Add("Column", 120); listDiff.ListInfo.Columns.Add("OldFormat", 150).FillWidth = true; listDiff.ListInfo.Columns.Add("NewFormat", 150).FillWidth = true; listDiff.ListInfo.StyleRowName = "ChangeRow"; listDiff.ListInfo.HeaderVisible = false; this.Name = "ChangeViewer"; this.Text = "Change Viewer"; PackStart(tools, false, false); PackStart(split1, true, true); split1.Name = "splitter"; split1.Panel1.Content = listObjects; split1.Panel2.Content = split2; split2.Name = "groupBoxMap2"; split2.Panel1.Content = listRows; split2.Panel2.Content = listDiff; rows = new SelectableList <LogMap>(); rowsView = new SelectableListView <LogMap>(rows); //rowsView.Filter.Parameters.Add(typeof(RowChanges), LogicType.Undefined, "Row.Status", CompareType.NotEqual, DBStatus.Actual); listRows.ListSource = rowsView; }
public override int GetValue(SelectableList <T> target) => target.Count;
public DataLogView() { toolModeDefault = new ToolMenuItem { Name = "Default", Tag = DataLogMode.Default }; toolModeDocument = new ToolMenuItem { Name = "Document", Tag = DataLogMode.Document }; toolModeTable = new ToolMenuItem { Name = "Table", Tag = DataLogMode.Table }; toolMode = new ToolDropDown( toolModeDefault, toolModeDocument, toolModeTable) { DisplayStyle = ToolItemDisplayStyle.Text, Name = "LogMode", Text = "Mode: Default" }; toolMode.ItemClick += ToolModeClick; toolRollback = new ToolItem(ToolRollbackClick) { Name = "Rollback", DisplayStyle = ToolItemDisplayStyle.Text }; toolAccept = new ToolItem(ToolAcceptClick) { Name = "Accept", DisplayStyle = ToolItemDisplayStyle.Text }; toolCheck = new ToolItem() { Name = "Check", DisplayStyle = ToolItemDisplayStyle.Text }; toolDetails = new ToolItem(ToolDetailsClick) { Name = "Details", DisplayStyle = ToolItemDisplayStyle.Text }; dateField = new ToolFieldEditor() { Editor = new CellEditorDate { TwoDate = true, DataType = typeof(DateInterval) }, Name = "Date", ContentMinWidth = 200 }; dateField.Field.BindData(this, nameof(Date)); dataField = new ToolFieldEditor() { Editor = new CellEditorDataTree { DataType = typeof(DBTable) }, Name = "Table", ContentMinWidth = 200 }; dataField.Field.BindData(this, nameof(Table)); toolProgress = new ToolTableLoader() { }; bar = new Toolsbar( toolRollback, toolMode, toolDetails, new ToolSeparator { FillWidth = true }, dateField, dataField, toolProgress) { Name = "BarLog" }; list = new LayoutList() { AllowEditColumn = false, EditMode = EditModes.None, EditState = EditListState.Edit, GenerateToString = false, Mode = LayoutListMode.List, Name = "list", ListSource = listSource = new SelectableList <DBLogItem>() }; list.GenerateColumns = true; list.CellMouseClick += ListCellMouseClick; list.CellDoubleClick += ListCellDoubleClick; list.SelectionChanged += ListSelectionChanged; //if (logs.Table != null) // logs.ApplySort(new DBRowComparer(logs.Table.DateKey, ListSortDirection.Ascending)); detailList = new TableLayoutList() { GenerateToString = false, GenerateColumns = false, ReadOnly = true, EditMode = EditModes.ByClick }; detailList.ListInfo.Columns.Add("Column", 120).Editable = false; detailList.ListInfo.Columns.Add("OldFormat", 100).FillWidth = true; detailList.ListInfo.Columns.Add("NewFormat", 100).FillWidth = true; detailList.ListInfo.StyleRowName = "ChangeRow"; detailList.ListInfo.HeaderVisible = false; detailRow = new TableLayoutList(); map = new GroupBox( new GroupBoxItem { Name = "Details", Widget = detailList, Column = 0, FillWidth = true, FillHeight = true }, //new GroupBoxItem { Name = "Difference", Widget = detailText, Col = 1, FillWidth = true, FillHeight = true }, new GroupBoxItem { Name = "Record", Widget = detailRow, Column = 2, FillWidth = true, FillHeight = true }); //list.ListInfo.Columns.Add(list.BuildColumn(null, "Text")); split = new VPaned(); split.Panel1.Content = list; //split.Panel2.Content = map; PackStart(bar, false, false); PackStart(split, true, true); Name = "DataLog"; }
public override object GetValue(SelectableList <T> target) => target.SyncRoot;
public override bool GetValue(SelectableList <T> target) => target.Disposed;
public override bool GetValue(SelectableList <T> target) => target.IsFixedSize;