public virtual void Localize() { if (Bar != null) { GuiService.Localize(this, Bar.Name, Name); } }
public static ILayoutCellEditor GetCellEditor(ILayoutCell cell) { var type = cell?.DataType; if (type == null) { return(null); } type = TypeHelper.CheckNullable(type); ILayoutCellEditor editor = null; if (CellEditorFabric.TryGetValue(type, out var generator)) { editor = generator(cell); } if (editor == null) { foreach (var entry in CellEditorFabric) { if (TypeHelper.IsBaseType(type, entry.Key)) { editor = entry.Value(cell); } } } //if (type.IsEnum) //{ // editor = new CellEditorEnum(); //} if (editor == null) { if (TypeHelper.IsList(type)) { editor = new CellEditorFields() { Header = type.Name }; } else if (GuiService.IsCompound(type)) { editor = new CellEditorFields() { Header = type.Name }; } else { editor = new CellEditorText() { Format = cell.Format, MultiLine = false, DropDownWindow = false }; } } editor.DataType = type; return(editor); }
public override void Localize() { GuiService.Localize(toolLoad, "LogExplorer", "Load", GlyphType.FolderOpen); GuiService.Localize(toolSave, "LogExplorer", "Save", GlyphType.SaveAlias); GuiService.Localize(this, "LogExplorer", "Logs", GlyphType.InfoCircle); list.Localize(); }
public override void Localize() { base.Localize(); var name = GetType().Name; GuiService.Localize(this, name, "Localize Editor"); GuiService.Localize(toolLoadImages, name, "Load Images"); GuiService.Localize(toolSave, name, "Save", GlyphType.SaveAlias); }
public override void Localize() { base.Localize(); if (fields != null) { fields.Localize(); } list.Localize(); GuiService.Localize(this, lockName, "Property Editor", GlyphType.Pencil); }
public DockBoxHitTest DockHitTest(double x, double y, double size) { var htest = new DockBoxHitTest(); foreach (DockItem item in items.GetVisibleItems()) { if (item.Bound.Contains(x, y)) { htest.Item = item; htest.Bound = item.Bound; break; } } if (htest.Item != null) { var rect = Rectangle.Zero; htest.Align = GuiService.GetAlignRect(htest.Item.Bound, size, x, y, ref rect); htest.AlignBound = rect; } return(htest); }
public override void Localize() { base.Localize(); GuiService.Localize(this, GetType().Name, "Localize Editor"); }