Project cleanup

This commit is contained in:
Robert committed 2020-02-13 15:17:58 +01:00
1 parent f5e95e43be
commit 3aa9a632ea
51 files changed
+440 -490

No files matched your search

@@ -30,7 +30,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
_profileEditorService.SelectedProfileElementUpdated += OnSelectedProfileElementUpdated;
_profileEditorService.ProfilePreviewUpdated += ProfileEditorServiceOnProfilePreviewUpdated;
}
public Layer Layer { get; }
public Geometry LayerGeometry { get; set; }
@@ -39,6 +39,14 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
public Rect ViewportRectangle { get; set; }
public bool IsSelected { get; set; }
public void Dispose()
{
Layer.RenderPropertiesUpdated -= LayerOnRenderPropertiesUpdated;
_profileEditorService.SelectedProfileElementChanged -= OnSelectedProfileElementChanged;
_profileEditorService.SelectedProfileElementUpdated -= OnSelectedProfileElementUpdated;
_profileEditorService.ProfilePreviewUpdated -= ProfileEditorServiceOnProfilePreviewUpdated;
}
private void Update()
{
IsSelected = _profileEditorService.SelectedProfileElement == Layer;
@@ -86,7 +94,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
var layerGeometry = group.GetOutlinedPathGeometry();
var opacityGeometry = Geometry.Combine(Geometry.Empty, layerGeometry, GeometryCombineMode.Exclude, new TranslateTransform());
LayerGeometry = layerGeometry;
OpacityGeometry = opacityGeometry;
}
@@ -171,14 +179,6 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
}
}
public void Dispose()
{
Layer.RenderPropertiesUpdated -= LayerOnRenderPropertiesUpdated;
_profileEditorService.SelectedProfileElementChanged -= OnSelectedProfileElementChanged;
_profileEditorService.SelectedProfileElementUpdated -= OnSelectedProfileElementUpdated;
_profileEditorService.ProfilePreviewUpdated -= ProfileEditorServiceOnProfilePreviewUpdated;
}
#region Event handlers
private void LayerOnRenderPropertiesUpdated(object sender, EventArgs e)