Example #1
0
 private void AddSeletctFolderHander(string folderPath)
 {
     if (Directory.Exists(folderPath) && !dirList.Contains(folderPath))
     {
         if (!expander1.IsExpanded)
         {
             expander1.IsExpanded = true;
         }
         dirList.Add(folderPath);
         table = null;
         if (fileListView.DataContext == null)
         {
             table = new DataTable("FileList");
             table.Columns.Add("Name", typeof(string));
             table.Columns.Add("Title", typeof(string));
             table.Columns.Add("Artist", typeof(string));
             table.Columns.Add("Path", typeof(string));
         }
         else
         {
             table = fileListView.DataContext as DataTable;
         }
         backgroundWorker.RunWorkerAsync(folderPath);
         if (waitingWindows == null)
         {
             waitingWindows = new WaitingWindow();
         }
         waitingWindows.Owner = this;
         waitingWindows.ShowDialog();
     }
 }
Example #2
0
 private void ScanFinish()
 {
     fileListView.DataContext = table;
     searchByDir.IsEnabled    = (table.Rows.Count > 1);
     if (null != waitingWindows)
     {
         waitingWindows.canCLose = true;
         waitingWindows.Close();
         waitingWindows = null;
     }
 }
Example #3
0
 private void ScanFinish()
 {
     fileListView.DataContext = table;
     searchByDir.IsEnabled = (table.Rows.Count > 1);
     if (null != waitingWindows)
     {
         waitingWindows.canCLose = true;
         waitingWindows.Close();
         waitingWindows = null;
     }
 }
Example #4
0
 private void AddSeletctFolderHander( string folderPath)
 {
     if (Directory.Exists(folderPath) && !dirList.Contains(folderPath))
     {
         if (!expander1.IsExpanded)
         {
             expander1.IsExpanded = true;
         }
         dirList.Add(folderPath);
         table = null;
         if (fileListView.DataContext == null)
         {
             table = new DataTable("FileList");
             table.Columns.Add("Name", typeof(string));
             table.Columns.Add("Title", typeof(string));
             table.Columns.Add("Artist", typeof(string));
             table.Columns.Add("Path", typeof(string));
         }
         else
         {
             table = fileListView.DataContext as DataTable;
         }
         backgroundWorker.RunWorkerAsync(folderPath);
         if (waitingWindows == null)
         {
             waitingWindows = new WaitingWindow();
         }
         waitingWindows.Owner = this;
         waitingWindows.ShowDialog();
     }
 }