Remove unused unregisterEvents pattern

This commit is contained in:
John Lewin 2018-05-05 09:51:15 -07:00
parent 5874b0459d
commit f3db5f0aab

View file

@ -76,8 +76,6 @@ namespace MatterHackers.MatterControl.CustomWidgets
{ {
private ThemeConfig theme; private ThemeConfig theme;
private event EventHandler unregisterEvents;
public RowViewItem(ListViewItem listViewItem, int thumbWidth, int thumbHeight, ThemeConfig theme) public RowViewItem(ListViewItem listViewItem, int thumbWidth, int thumbHeight, ThemeConfig theme)
: base(listViewItem, thumbWidth, thumbHeight) : base(listViewItem, thumbWidth, thumbHeight)
{ {
@ -89,7 +87,10 @@ namespace MatterHackers.MatterControl.CustomWidgets
this.Margin = new BorderDouble(6, 0, 6, 6); this.Margin = new BorderDouble(6, 0, 6, 6);
this.theme = theme; this.theme = theme;
var row = new FlowLayoutWidget(FlowDirection.LeftToRight) { HAnchor = HAnchor.Stretch }; var row = new FlowLayoutWidget(FlowDirection.LeftToRight)
{
HAnchor = HAnchor.Stretch
};
row.AddChild(imageWidget = new ImageWidget(thumbWidth, thumbHeight) row.AddChild(imageWidget = new ImageWidget(thumbWidth, thumbHeight)
{ {
@ -127,12 +128,6 @@ namespace MatterHackers.MatterControl.CustomWidgets
} }
} }
public override void OnClosed(ClosedEventArgs e)
{
unregisterEvents?.Invoke(this, null);
base.OnClosed(e);
}
public override Color BackgroundColor public override Color BackgroundColor
{ {
get => this.IsSelected ? theme.AccentMimimalOverlay : theme.ThumbnailBackground; get => this.IsSelected ? theme.AccentMimimalOverlay : theme.ThumbnailBackground;