// <summary>Deactivates all the views and clears the register.</summary> public void DeactivateAll() { foreach (int active in this.active) { EasyView <View> easyView = this.Get <View>(active); easyView.Hide(true); } active.Clear(); }
// <summary>Toggles a view active by id and shows it.</summary> public void ToggleActive(int id) { // If doesn't exist, return. EasyView <View> view = this.Get <View>(id); if (view == null) { return; } // If is active, hide and remove from active. // If isn't active, show and add the id to active. if (this.IsActive(id)) { view.Hide(true); this.active.Remove(id); } else { view.Show(); this.active.Add(id); } }