public VariableCondition(IEditorEnvironment editorEnvironment, string variableName = null, int variableValue = 0) : base(editorEnvironment) { _variableUndoRedoWrapper = CreateUndoRedoWrapper(nameof(Variable), variableName); _valueUndoRedoWrapper = CreateUndoRedoWrapper(nameof(Value), variableValue); UpdateHeader(); }
public ResGroupEditor(IEditorEnvironment editorEnvironment, ICommandHistory history) { this.editorEnvironment = editorEnvironment; this.history = history; this.AutoSize = true; this.Padding = new Padding(10); this.SuspendLayout(); this.split = new SplitContainer { Dock = DockStyle.Fill }; this.split.Panel2Collapsed = true; this.Controls.Add(this.split); var sp = new StackPanel { Dock = DockStyle.Fill, AutoSize = true }; this.split.Panel1.Controls.Add(sp); var collectionView = new CollectionView<IResourceFile>(a => editorEnvironment.EditorFor(a, history)) { AutoSize = true }; collectionView.ItemsPanel.AutoSize = true; collectionView.ItemsPanel.AutoScroll = false; new PropertyBinding<ResGroup, IList<IResourceFile>>(collectionView, this.dataContext, m => m.ExternalResources, null); sp.Controls.Add(collectionView); var embCollectionView = new CollectionView<Managed>(a => this.CreateButtonForResource(a)) { AutoSize = true }; embCollectionView.ItemsPanel.AutoSize = true; embCollectionView.ItemsPanel.AutoScroll = false; new PropertyBinding<ResGroup, IList<Managed>>(embCollectionView, this.dataContext, m => m.EmbeddedResources, null); sp.Controls.Add(embCollectionView); this.ResumeLayout(); this.PerformLayout(); }
protected NodeProperty(IEditorEnvironment editorEnvironment, PropertyInfo propertyInfo, string propertyName = null) : base(editorEnvironment) { _valueWrapper = CreateUndoRedoWrapper <object>(nameof(Value)); Name = propertyName ?? propertyInfo.Name; PropertyInfo = propertyInfo; }
public ChoiceGroup(IEditorEnvironment editorEnvironment, string text = null) : base(editorEnvironment) { _textUndoRedoWrapper = CreateUndoRedoWrapper(nameof(Text), text); Choices = AddGroup <ChoiceItem>(nameof(Choices)); UpdateHeader(); }
public ShaderEditor(IEditorEnvironment editorEnvironment, ICommandHistory history, IComponentContext context) { this.editorEnvironment = editorEnvironment; this.history = history; this.context = context; this.InitializeComponent(); this.InitializeEditor(); }
public ChoiceItem(IEditorEnvironment editorEnvironment, string text = null) : base(editorEnvironment) { _textUndoRedoWrapper = CreateUndoRedoWrapper(nameof(Text), text); Conditions = AddGroup <DialogCondition>(nameof(Conditions)); Actions = AddGroup <DialogAction>(nameof(Actions)); UpdateHeader(); }
public ResourceFileEditor(IEditorEnvironment editorEnvironment, IResourceManager resourceManager, TextResourceWriter textResourceWriter) { this.history = new CommandHistory(); this.editorEnvironment = editorEnvironment; this.resourceManager = resourceManager; this.textResourceWriter = textResourceWriter; this.history.PropertyChanged += this.NotifyHistoryChanged; this.InitializeComponent(); this.InitializeEditor(); this.Dock = DockStyle.Fill; }
public DataNode(IEditorEnvironment editorEnvironment, Type dataType, IReadOnlyList <NodeProperty> properties) : base(editorEnvironment) { DataType = dataType; Header = DataType.Name; _headerFormat = DataType.GetCustomAttribute <NodeHeaderFormatAttribute>()?.HeaderFormat; if (_headerFormat != null) { _headerValueProviders = new SortedList <int, NodeProperty>(); } AddProperties(properties); }
public EditResourceReferenceView( IEditorEnvironment editorEnvironment, IResourceManager resourceManager, ICommandHistory history, IComponentContext context, bool fileReferencesAllowed) : this() { this.editorEnvironment = editorEnvironment; this.resourceManager = resourceManager; this.history = history; this.context = context; this.fileReferencesAllowed = fileReferencesAllowed; }
public GenericSceneEditor( IEditorEnvironment editorEnvironment, IComponentContext context, ToeGraphicsContext graphicsContext, IEditorOptions<Base3DEditorOptions> options) { this.editorEnvironment = editorEnvironment; this.context = context; this.graphicsContext = graphicsContext; this.options = options; this.history = new CommandHistory(); this.InitializeComponent(); this.InitializeEditor(); }
public AnimEditor( IEditorEnvironment editorEnvironment, IResourceManager resourceManager, IComponentContext context, IEditorOptions<Base3DEditorOptions> options, Base3DEditorContent content) : base(context, options, content) { this.editorEnvironment = editorEnvironment; this.resourceManager = resourceManager; this.InitializeComponent(); this.InitializeEditor(); base.RenderScene += this.RenderAnimScene; }
public TextureEditor( IEditorEnvironment editorEnvironment, IResourceManager resourceManager, IComponentContext context, ToeGraphicsContext graphicsContext, IEditorOptions<Base3DEditorOptions> options, Base3DEditorContent content) : base(context, options, content) { this.editorEnvironment = editorEnvironment; this.resourceManager = resourceManager; this.graphicsContext = graphicsContext; this.InitializeComponent(); this.InitializeEditor(); base.RenderScene += this.RenderTexScene; }
public SkinEditor( IEditorEnvironment editorEnvironment, IResourceManager resourceManager, ICommandHistory history, ToeGraphicsContext graphicsContext, IComponentContext context) { this.editorEnvironment = editorEnvironment; this.resourceManager = resourceManager; this.history = history; this.graphicsContext = graphicsContext; this.context = context; this.InitializeComponent(); this.InitializeEditor(); this.base3DEditor1.RenderScene += this.RenderScene; }
public MaterialEditor( IEditorEnvironment editorEnvironment, IResourceManager resourceManager, ICommandHistory history, ToeGraphicsContext graphicsContext, IComponentContext context) { this.editorEnvironment = editorEnvironment; this.resourceManager = resourceManager; this.history = history; this.graphicsContext = graphicsContext; this.context = context; this.InitializeComponent(); this.InitializeEditor(); }
public ResourcePickerDialog( IResourceManager resourceManager, IEditorEnvironment editorEnvironment, uint type, bool fileReferencesAllowed) { this.resourceManager = resourceManager; this.editorEnvironment = editorEnvironment; this.type = type; this.fileReferencesAllowed = fileReferencesAllowed; this.InitializeComponent(); foreach (var i in resourceManager.GetAllResourcesOfType(type)) { this.list.Items.Add(i); } if (fileReferencesAllowed) { this.btnOpenFile.Visible = true; } }
public ModelEditor( IEditorEnvironment editorEnvironment, IResourceManager resourceManager, IComponentContext context, ToeGraphicsContext graphicsContext, IEditorOptions<Base3DEditorOptions> options, ICommandHistory history) { this.editorEnvironment = editorEnvironment; this.resourceManager = resourceManager; this.context = context; this.graphicsContext = graphicsContext; this.options = options; this.history = history; this.dataContext.DataContextChanged += ResetModel; this.InitializeComponent(); this.InitializeEditor(); }
public TreeEditorViewModel(IEditorEnvironment editorEnvironment) : base(editorEnvironment) { RootNodes = new ReadOnlyObservableCollection <ITreeNode>(_rootNodes); // These commands are used for keyboard shortcuts DeleteNodeCommand = new ActionCommand(DeleteSelectedNode, CanDeletedSelectedNode); CutNodeCommand = new ActionCommand(CutNode, CanCutNode); CopyNodeCommand = new ActionCommand(CopyNode, CanCopyNode); PasteNodeCommand = new ActionCommand(PasteNode, CanPasteNode); DuplicateNodeCommand = new ActionCommand(DuplicateNode, CanDuplicateNode); UndoCommand = new ActionCommand(Undo, CanUndo); RedoCommand = new ActionCommand(Redo, CanRedo); ActiveContextMenuCommands = new ReadOnlyObservableCollection <ContextMenuCommand>(_activeContextMenuCommands); // Group catalog items by category var view = CollectionViewSource.GetDefaultView(CatalogItems); var groupDescription = new PropertyGroupDescription(nameof(NodeCatalogItem.Category)); view.GroupDescriptions.Add(groupDescription); }
public DialogRootNode(IEditorEnvironment editorEnvironment) : base(editorEnvironment, "Dialog") { }
public DataNodeFactory(IEditorEnvironment editorEnvironment) { _editorEnvironment = editorEnvironment; }
public TreeNode(IEditorEnvironment editorEnvironment, string header = null) : base(editorEnvironment) { Header = header ?? TypeUtility.GetTypeDisplayName(GetType()); }
public EditorEnvironment(IEditorEnvironment editorEnvironment) { NodeFactory = editorEnvironment.NodeFactory; UndoRedoStack = editorEnvironment.UndoRedoStack; }
public ReadableGroupContainerNode(IEditorEnvironment editorEnvironment) : base(editorEnvironment) { }
public DefaultNode(IEditorEnvironment editorEnvironment) : base(editorEnvironment) { Header = $"Node_{DateTime.Now}"; }
public ReadableNodeContainer(IEditorEnvironment editorEnvironment, string header = null) : base(editorEnvironment, header) { Nodes = _emptyNodes; }
public EditorObject(IEditorEnvironment editorEnvironment) { EditorEnvironment = editorEnvironment; }
public ShowTextAction(IEditorEnvironment editorEnvironment, string text = null) : base(editorEnvironment) { _textUndoRedoWrapper = CreateUndoRedoWrapper(nameof(Text), text); UpdateHeader(); }
public DefaultContainer(IEditorEnvironment editorEnvironment) : base(editorEnvironment) { Header = $"Container_{DateTime.Now}"; }
// Marker class // Can be used for common dialog logic, for example serialization protected DialogNode(IEditorEnvironment editorEnvironment) : base(editorEnvironment) { }
public TextBoxProperty(IEditorEnvironment editorEnvironment, PropertyInfo propertyInfo, bool multiline = false, string propertyName = null) : base(editorEnvironment, propertyInfo, propertyName) { Multiline = multiline; }
public DefaultEditor(IEditorEnvironment editorEnvironment) { this.editorEnvironment = editorEnvironment; this.InitializeComponent(); this.Controls.Add(new Label { Text = "File format is not supported" }); }
// Marker class // Can be used for common condition logic, for example serialization protected DialogCondition(IEditorEnvironment editorEnvironment) : base(editorEnvironment) { }
public ObjectProperty(IEditorEnvironment editorEnvironment, PropertyInfo propertyInfo, string propertyName = null, bool singleObjectList = false) : base(editorEnvironment, propertyInfo, propertyName) { DataNode = (DataNode)EditorEnvironment.NodeFactory.CreateNode(propertyInfo.PropertyType); SingleObjectList = singleObjectList; }
public TreeNodeContainer(IEditorEnvironment editorEnvironment, string header = null) : base(editorEnvironment, header) { }
public CustomNodeFactory(IEditorEnvironment editorEnvironment) { _editorEnvironment = editorEnvironment; _defaultNodeFactory = new TreeNodeFactory(_editorEnvironment); }
public ComboBoxProperty(IEditorEnvironment editorEnvironment, IComboBoxValueProvider valueProvider, PropertyInfo propertyInfo, string propertyName = null) : base(editorEnvironment, propertyInfo, propertyName) { ValueProvider = valueProvider; }
public CheckBoxProperty(IEditorEnvironment editorEnvironment, PropertyInfo propertyInfo, string propertyName = null) : base(editorEnvironment, propertyInfo, propertyName) { }