Exemple #1
0
        public void ExportToPdf()
        {
            var filename = FileSystemScanService.GetTempFileName("pdf");

            pivotGridControl.ExportToPdf(filename);
            Helpers.ShellHelper.Open(filename);
        }
Exemple #2
0
        public void ExportToXls()
        {
            var filename = FileSystemScanService.GetTempFileName("xlsx");

            gridControlFiles.ExportToXlsx(filename);
            Helpers.ShellHelper.Open(filename);
        }
Exemple #3
0
        public void ExportToPdf()
        {
            var filename = FileSystemScanService.GetTempFileName("pdf");

            gridViewErrors.ExportToPdf(filename);
            Helpers.ShellHelper.Open(filename);
        }
Exemple #4
0
        public void ExportToPdf()
        {
            var filename = FileSystemScanService.GetTempFileName("pdf");

            resultsTreeList.ExportToPdf(filename);
            Helpers.ShellHelper.Open(filename);
        }
Exemple #5
0
        public async Task <ScanResult> DoScan()
        {
            if (newScanPathButtonEdit.Text.LastOrDefault() == System.IO.Path.DirectorySeparatorChar &&
                newScanPathButtonEdit.Text.Split(System.IO.Path.DirectorySeparatorChar).Length > 2)
            {
                newScanPathButtonEdit.Text = newScanPathButtonEdit.Text.Remove(newScanPathButtonEdit.Text.Length - 1, 1);
            }
            if (!System.IO.Directory.Exists(newScanPathButtonEdit.Text))
            {
                MessageBox.Show($"Folder: '{newScanPathButtonEdit.Text}' doesn't exists.",
                                Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(null);
            }
            FileSystemScanService.Clear();
            FileSystemScanService.DetailType = (API.Enums.ScanDetailTypeEnum)imageComboBoxEditType.EditValue;
            FileSystemScanService.ScanOptions.BaseFolderPath              = newScanPathButtonEdit.Text;
            FileSystemScanService.ScanOptions.IncludeSubFolders           = includeSubfoldersCheckEdit.Checked;
            FileSystemScanService.ScanOptions.SearchPattern               = searchPatternButtonEdit.Text;
            FileSystemScanService.ScanOptions.ShowMinimumFolderLevelInLog =
                Properties.Settings.Default.ShowMinimumFolderLevelInLog;
            FileSystemScanService.UserName      = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
            FileSystemScanService.ComputerName  = Environment.MachineName;
            FileSystemScanService.OSVersionName = Environment.OSVersion.ToString();
            FileSystemScanService.ScanDate      = DateTime.Now;
            try
            {
                StartScan();
                await FileSystemScanService.DoScan();

                SaveScanOptions();
                SetFocus();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, Application.ProductName,
                                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            finally
            {
                EndScan();
            }
            return(FileSystemScanService.ScanResult);
        }
Exemple #6
0
        public MainRibbonForm()
        {
            //holi
            InitializeComponent();
            LoadSkin();
            tabControl.ShowTabHeader = DevExpress.Utils.DefaultBoolean.False;
            Text = Application.ProductName;
            var scanService = new FileSystemScanService()
            {
                UserName      = System.Security.Principal.WindowsIdentity.GetCurrent().Name,
                ComputerName  = Environment.MachineName,
                OSVersionName = Environment.OSVersion.ToString(),
                ScanDate      = DateTime.Now,
                DetailType    = API.Enums.ScanDetailTypeEnum.Fast
            };
            var storageService = new FileSystemStorageService();

            ViewModel = new ViewModels.MainFormViewModel(scanService, storageService);
            SetEventHandlers();
        }
Exemple #7
0
 public void CancelScan()
 {
     FileSystemScanService?.Cancel();
 }