Beispiel #1
0
        public void onSeparateFilesFinish(DirectoryHandler dh, ProgressEventArgs e)
        {
            progressBarOutputProcess.Value++;
            progressBarOutputProcess.UpdateLayout();

            System.Windows.Forms.MessageBox.Show("Process finished!", "Descartes", MessageBoxButtons.OK, MessageBoxIcon.Information);
            System.Collections.Hashtable stats = dh.getProcessStats();
            labelSummaryTotalFiles.Content = stats["input"];
            labelSummarySelectedFiles.Content = stats["selected"];
            labelSummaryDiscardedFiles.Content = stats["discarded"];
            labelSummaryIgnoredFiles.Content = stats["ignored"];
            tabItemInput.IsEnabled = false;
            tabItemProcess.IsEnabled = false;
            tabItemOutput.IsEnabled = false;
            tabItemEnd.IsEnabled = true;
            tabItemEnd.Focus();
        }
Beispiel #2
0
        public static String getImagePathForItem(DirectoryHandler dh, int item, String type = ".JPG")
        {
            String path = "";
            if (item >= 0 && item < dh.inputList.count())
            {
                List<descartes.File> fl = dh.inputList.getList().ElementAt(item).getFiles();
                Boolean found = false;

                for (int i = 0; (i < fl.Count && !found); i++)
                {
                    if (fl.ElementAt(i).Ext == type)
                    {
                        path = fl.ElementAt(i).Path + @"\" + fl.ElementAt(i).Name;
                        found = true;
                    }
                }

            }
            return path;
        }
Beispiel #3
0
 public void onSeparateFilesProgress(DirectoryHandler dh, ProgressEventArgs e)
 {
     progressBarOutputProcess.Value++;
     progressBarOutputProcess.UpdateLayout();
     System.Windows.Forms.Application.DoEvents();
 }
Beispiel #4
0
        private void buttonReloadFilesFound_Click(object sender, RoutedEventArgs e)
        {
            listViewFilesFound.Items.Clear();
            progressBarLoading.Visibility = System.Windows.Visibility.Visible;
            labelNumFiles.Content = "Loading";
            dh = new DirectoryHandler(textBoxInputFolder.Text);
            labelNumFiles.Content = dh.fillInputList();
            foreach (Image item in dh.inputList.getList())
            {

                String extensions = "";
                foreach (descartes.File file in item.getFiles())
                {
                    extensions += "(" + file.Ext + ")";
                }

                listViewFilesFound.Items.Add(
                        item.getFileTitle() + " " + extensions
                    );
            }

            progressBarLoading.Visibility = System.Windows.Visibility.Hidden;
        }