예제 #1
0
 internal void FinishLoadingLibrary()
 {
     libraryTree = new LibraryTreeViewModel(library, this);
     InitializeSearchList();
     base.DataContext = null;
     base.DataContext = libraryTree;
 }
예제 #2
0
        public LibraryView(GraphControl graphControl)
        {
            InitializeComponent();

            this.graphControl = graphControl;

            library = new LibraryItem(NodeType.None, String.Empty);
            library.AddChildItem(new LibraryItem(NodeType.None, Configurations.LoadingMessage));
            libraryTree = new LibraryTreeViewModel(library, this);

            searchList = new List <SearchItem>();

            backgroundSearcher                            = new BackgroundWorker();
            backgroundSearcher.DoWork                    += new DoWorkEventHandler(BackgroundSearcherDoWork);
            backgroundSearcher.ProgressChanged           += new ProgressChangedEventHandler(BackgroundSearcherProgressChanged);
            backgroundSearcher.RunWorkerCompleted        += new RunWorkerCompletedEventHandler(BackgroundSearcherRunWorkerCompleted);
            backgroundSearcher.WorkerReportsProgress      = true;
            backgroundSearcher.WorkerSupportsCancellation = true;

            base.DataContext = libraryTree;
        }