protected virtual void OnSyncCurrentLevel(SyncLevelEventArgs e) { if (SyncCurrentLevel != null) { SyncCurrentLevel(this, e); } }
/*public void Dispose () * { * Dispose(true); * GC.SuppressFinalize(this); * } * * protected virtual void Dispose (bool disposing) * { * if (_editor != null) { * if (disposing) { * BindLevel(null); * * _editor.SyncCurrentLevel -= SyncCurrentLevel; * } * * _editor = null; * } * }*/ private void SyncCurrentLevel(object sender, SyncLevelEventArgs e) { BindLevel(_editor.CurrentLevel); }
protected virtual void OnSyncCurrentLevel(SyncLevelEventArgs e) { if (SyncCurrentLevel != null) { SyncCurrentLevel(this, e); } }
private void SyncCurrentLevel(object sender, SyncLevelEventArgs e) { if (_editor.CurrentLevel == null) return; if (tabControlEx1.TabCount > 0) { TabPage currentPage = tabControlEx1.SelectedTab; if (currentPage != null && (Guid)currentPage.Tag == _editor.CurrentLevel.Level.Uid) return; } foreach (TabPage page in tabControlEx1.TabPages) { if ((Guid)page.Tag == _editor.CurrentLevel.Level.Uid) { tabControlEx1.SelectedTab = page; break; } } }
/*public void Dispose () { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose (bool disposing) { if (_editor != null) { if (disposing) { BindLevel(null); _editor.SyncCurrentLevel -= SyncCurrentLevel; } _editor = null; } }*/ private void SyncCurrentLevel(object sender, SyncLevelEventArgs e) { BindLevel(_editor.CurrentLevel); }