private void CloseStatisticsView(int feedId, StatisticsView statisticsView) { statisticsView.CloseClicked -= StatisticsView_CloseClicked; statisticsView.Close(); statisticsView.Dispose(); _StatisticsViews.Remove(feedId); }
private void StatisticsView_CloseClicked(object sender, EventArgs e) { if (_StatisticsView != null) { _StatisticsView.CloseClicked -= StatisticsView_CloseClicked; _StatisticsView.Close(); _StatisticsView.Dispose(); _StatisticsView = null; } }