Ejemplo n.º 1
0
        public void CreateProperty(ExportObject exportObject, EventHandler handler)
        {
            ExportPropertyEventArgs eventArgs = new ExportPropertyEventArgs()
            {
                NodeName = exportObject.NodeName
            };

            handler?.Invoke(this, eventArgs);

            if (eventArgs.Object != null)
            {
                exportObject.AddExportProperty(eventArgs.Object);
            }
        }
Ejemplo n.º 2
0
        public void RemoveExportPropertyCall(object sender)
        {
            var property = sender as ExportProperty;
            ExportPropertyEventArgs eventArgs = new ExportPropertyEventArgs()
            {
                NodeName = property.NodeName
            };

            RemovePropertyHandler?.Invoke(this, eventArgs);

            if (SelectedDefinition.ExportProperties.Contains(property))
            {
                SelectedDefinition.ExportProperties.Remove(property);
            }
            else if (SelectedAsset.ExportProperties.Contains(property))
            {
                SelectedAsset.ExportProperties.Remove(property);
            }
        }