/// <summary> /// Once the pluggable window is disposed, we hide the training time difference again. /// </summary> /// <param name="o"></param> /// <param name="e"></param> private void pluggable_Disposed(object o, EventArgs e) { m_pluggable.Disposed -= pluggable_Disposed; m_pluggable = null; UpdateListColumns(); }
/// <summary> /// Connects a window implementing <see cref="IPlanOrderPluggable"/> to this window to enable displaying the training time differences. /// </summary> /// <param name="pluggable"></param> internal void ShowWithPluggable(IPlanOrderPluggable pluggable) { lvSkills.BeginUpdate(); try { // Update columns when a new pluggable is inserted if (m_pluggable == null) { m_pluggable = pluggable; pluggable.Disposed += pluggable_Disposed; UpdateListColumns(); return; } // Updates the list view UpdateListViewItems(); } finally { lvSkills.EndUpdate(); } }