예제 #1
0
파일: MainForm.cs 프로젝트: NHxD/NHxD
        private void TreeViewTabControl_Selected(object sender, TabControlEventArgs e)
        {
            if (e.TabPage == tagsTabPage)
            {
                tagsToolStrip.Filter();
            }
            else
            {
                tagsTreeView.TreeView.Nodes.Clear();
            }

            if (e.TabPage == bookmarksTabPage)
            {
                bookmarksToolStrip.Filter();
            }
            else
            {
                bookmarksTreeView.TreeView.Nodes.Clear();
            }

            if (e.TabPage == libraryTabPage)
            {
                libraryModel.Start();
                libraryToolStrip.Filter();
                libraryModel.EnablePolling();
            }
            else
            {
                libraryModel.Stop();
                libraryModel.DisablePolling();
                libraryTreeView.TreeView.Nodes.Clear();
            }

            if (e.TabPage == browsingTabPage)
            {
                browsingToolStrip.Filter();
            }
            else
            {
                browsingTreeView.TreeView.Nodes.Clear();
            }
        }