public void ShowOptions(string sectionName) { if (_view == null) { _view = new OptionsWindow(); _view.BuildSections(_items.Values); } var item = GetItem(sectionName); if (item == null) { var firstSection = _items.Keys.GetEnumerator().Current; if (firstSection != null) { if (_items.ContainsKey(firstSection)) { item = _items[firstSection]; } } } if (item != null) { _view.SetHeader(item.Title, item.Description); PopulateView(item); } _view.Show(); _view.Focus(); _view.ShowInTaskbar = false; _currentItem = item; }
public void CleanupView() { _view = null; }