Пример #1
0
 protected virtual void OnSyncCurrentLevel(SyncLevelEventArgs e)
 {
     if (SyncCurrentLevel != null)
     {
         SyncCurrentLevel(this, e);
     }
 }
Пример #2
0
        /*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);
        }
Пример #3
0
 protected virtual void OnSyncCurrentLevel(SyncLevelEventArgs e)
 {
     if (SyncCurrentLevel != null) {
         SyncCurrentLevel(this, e);
     }
 }
Пример #4
0
        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;
                }
            }
        }
Пример #5
0
        /*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);
        }