示例#1
0
 public void MoveCopy(object parametr, ListFileReport file)
 {
     if (Mouse.LeftButton == MouseButtonState.Pressed)
     {
         var objectiv = (ListView)parametr;
         var files    = new String[1];
         files[0] = file.FullPath;
         var data = new DataObject();
         data.SetData(DataFormats.FileDrop, files);
         DragDrop.DoDragDrop(objectiv, data, DragDropEffects.Copy);
     }
 }
示例#2
0
文件: Logica.cs 项目: mathewsun/My
        public void Go(Detalizacia detal, TrigersUse trigerselect, SelectPanelUl ul, SelectPanelFl fl, YearsDbf years, ListFilesDbf filedbf, Collections.ColectionTab.TabControl tab, ListFileReport report)
        {
            ReaderCommandDbfClient service = new ReaderCommandDbfClient("BasicHttpBinding_IReaderCommandDbf");

            DispatcherHelper.Initialize();
            Triger   = trigerselect;
            Ul       = ul;
            Fl       = fl;
            Yers     = years;
            Detal    = detal;
            ListFile = filedbf;
            Report   = report;
            Tab      = tab;
            if (service.IsActive())
            {
                if (Yers.IsValidation())
                {
                    if (Triger.IsCheked)
                    {
                        if (!Fl.IsValidation())
                        {
                            Triger.IsEnableButtonFl             = false;
                            WorkerFl.WorkerReportsProgress      = true;
                            WorkerFl.WorkerSupportsCancellation = true;
                            WorkerFl.DoWork             += worker_DoworkFL;
                            WorkerFl.ProgressChanged    += worker_progressChangeFL;
                            WorkerFl.RunWorkerCompleted += worker_RunWorkerCompleteFL;
                            WorkerFl.RunWorkerAsync();
                        }
                    }
                    else
                    {
                        if (!Ul.IsValidation())
                        {
                            Triger.IsEnableButtonUl             = false;
                            WorkerUl.WorkerReportsProgress      = true;
                            WorkerUl.WorkerSupportsCancellation = true;
                            WorkerUl.DoWork             += worker_DoworkUL;
                            WorkerUl.ProgressChanged    += worker_progressChangeUL;
                            WorkerUl.RunWorkerCompleted += worker_RunWorkerCompleteUL;
                            WorkerUl.RunWorkerAsync();
                        }
                    }
                }
            }
            else
            {
                System.Windows.Forms.MessageBox.Show(
                    @"Ошибка сервис не может принять запрос в связи с резервным копированием");
            }
        }
示例#3
0
 public void UpdateReport(ListFileReport report)
 {
     report.ShemesFilesReport.Clear();
     lock (report._lock)
     {
         if (Directory.Exists(Arhivator.Pathing.PathName.Path4))
         {
             var dir   = new DirectoryInfo(Arhivator.Pathing.PathName.Path4);
             var files = dir.GetFiles();
             foreach (FileInfo file in files)
             {
                 report.ShemesFilesReport.Add(new ListFileReport {
                     Icon = IconsDetalization.Icons.Extracticonfile(file.FullName), Name = file.Name, FullPath = file.FullName
                 });
             }
         }
     }
 }
示例#4
0
        public ListFileReport Report()
        {
            ListFileReport report = new ListFileReport(); //ListFileReport listfilereport

            report.ShemesFilesReport.Clear();
            if (Directory.Exists(Arhivator.Pathing.PathName.Path4))
            {
                var dir   = new DirectoryInfo(Arhivator.Pathing.PathName.Path4);
                var files = dir.GetFiles();
                foreach (FileInfo file in files)
                {
                    report.ShemesFilesReport.Add(new ListFileReport {
                        Icon = IconsDetalization.Icons.Extracticonfile(file.FullName), Name = file.Name, FullPath = file.FullName
                    });
                }
            }
            return(report);
        }
示例#5
0
        public void OpenReportEvent(ListFileReport reportxsl)
        {
            var openfile = new OpenFile.OpenFile();

            openfile.Openxls(reportxsl.FullPath);
        }
示例#6
0
 public void RemoveReport(ListFileReport reportxsl, ObservableCollection <ListFileReport> reportcolection)
 {
     File.Delete(reportxsl.FullPath);
     reportcolection.Remove(reportxsl);
 }