Esempio n. 1
0
        public static void AirCopmInvoicesToPDFRus(List <OrderFlight> orders, Func <OrderFlight, bool, Workbook> getWbFunc, bool showDiscount = false)
        {
            var of = new RadOpenFolderDialog();

            of.Owner            = MainClass.MainAppwindow;
            of.InitialDirectory = Properties.Settings.Default.LastDirectory;
            of.ShowDialog();
            of.ExpandToCurrentDirectory = false;
            if (of.DialogResult.GetValueOrDefault())
            {
                Properties.Settings.Default.LastDirectory = of.FileName;
                Properties.Settings.Default.Save();
                foreach (var ord in orders)
                {
                    //string filePath = of.FileName+@"\"+ord.Id.ToString()+"_"+ord.FlightNumber+".pdf";
                    string filePath = of.FileName + @"\" + ord.DeliveryDate.ToString("dd.MM.yyyy") + "_" + ord.FlightNumber + ".pdf";
                    //var wb = AlohaService.ExcelExport.ExportHelper.ExportToExcelWorkbookRussian(ord);
                    int num = 0;
                    while (File.Exists(filePath))
                    {
                        filePath = filePath.Substring(0, filePath.Length - 4) + "_" + (num++).ToString() + ".pdf";
                    }
                    var wb = getWbFunc(ord, showDiscount);
                    InvoiceToPDF(wb, filePath);
                }
            }
        }
Esempio n. 2
0
        private void pathOutputBtn_Click(object sender, RoutedEventArgs e)
        {
            RadOpenFolderDialog openFolderDialog1 = new RadOpenFolderDialog();

            openFolderDialog1.ShowDialog();
            this.storage.PathOutput = openFolderDialog1.FileName;
        }
Esempio n. 3
0
        private void SelectFolderMockupClick(object sender, RoutedEventArgs e)
        {
            RadOpenFolderDialog openFolderMockupDialog = new RadOpenFolderDialog();

            openFolderMockupDialog.ShowDialog();
            txtPathMockup.Text = openFolderMockupDialog.FileName;
        }
Esempio n. 4
0
        public VideoFilesView()
        {
            InitializeComponent();

            Seasons  = new ObservableCollection <string>();
            Episodes = new ObservableCollection <string>();
            RenamedEpisodesPreviewList = new ObservableCollection <string>();

            openFolderDialog = new RadOpenFolderDialog {
                Owner = this, ExpandToCurrentDirectory = false
            };

            SeasonsListBox.ItemsSource  = Seasons;
            EpisodesListBox.ItemsSource = Episodes;
            EpisodeRenamedPreviewListBox.ItemsSource = RenamedEpisodesPreviewList;
            StatusListBox.ItemsSource = StatusMessages;

            renumberWorker = new BackgroundWorker {
                WorkerReportsProgress = true
            };
            renumberWorker.DoWork             += RenumberWorker_DoWork;
            renumberWorker.ProgressChanged    += RenumberWorker_ProgressChanged;
            renumberWorker.RunWorkerCompleted += RenumberWorker_RunWorkerCompleted;

            WriteOutput($"Ready, open a folder to begin.", OutputMessageLevel.Success);
        }
Esempio n. 5
0
        private void SelectFolderDesignsClick(object sender, RoutedEventArgs e)
        {
            RadOpenFolderDialog openFolderDialog = new RadOpenFolderDialog();

            openFolderDialog.ShowDialog();

            txtPathDesign.Text = openFolderDialog.FileName;
            storage.ListFolderDesign.Clear();
            this.dgListDesigns.ItemsSource = null;
            try
            {
                string filters     = " *.JPG|*.PNG";
                var    designsPath = filters.Split('|').SelectMany(filter => Directory.GetFiles(openFolderDialog.FileName, filter)).ToList();
                for (int i = 0; i < designsPath.Count; i++)
                {
                    var designsName = System.IO.Path.GetFileName(designsPath[i]);
                    storage.ListFolderDesign.Add(new FileDesignDTO()
                    {
                        ID = i + 1, Filename = designsName, FilePath = designsPath[i]
                    });
                }
                dgListDesigns.ItemsSource = storage.ListFolderDesign;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 6
0
        private void SelectFolderButton_Click(object sender, RoutedEventArgs e)
        {
            RadOpenFolderDialog openFolderDialog = new RadOpenFolderDialog();

            openFolderDialog.ShowDialog();
            SDDPFilesFolderTextBox.Text = openFolderDialog.FileName;
            filesReadingParametersViewModel.InputFilesPath = openFolderDialog.FileName;
        }
Esempio n. 7
0
 public Editor1()
 {
     InitializeComponent();
     MyCommand.InputGestures.Add(new KeyGesture(Key.O, ModifierKeys.Control));
     this.openFolderDialog   = new RadOpenFolderDialog();
     openFolderDialog.Owner  = this;
     openFolderDialog.Header = "Open Directory";
 }
Esempio n. 8
0
        private void EventButtonSettingFolderSelect(object sender, EventArgs e)
        {
            RadOpenFolderDialog dialog = new RadOpenFolderDialog();
            DialogResult        result = dialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                StxFolder.Text = dialog.FileName;
            }
        }
Esempio n. 9
0
        private void btnImportImage_Click(object sender, RoutedEventArgs e)
        {
            RadOpenFolderDialog fBD = new RadOpenFolderDialog();

            // Show open folder dialog and check if Open button is pressed.\

            if (fBD.ShowDialog() == true)
            {
                txtPathImageFolder.Text = fBD.FileName;
            }
        }
Esempio n. 10
0
 public Editor1(string PathFolder)
 {
     InitializeComponent();
     MyCommand.InputGestures.Add(new KeyGesture(Key.O, ModifierKeys.Control));
     this.openFolderDialog = new RadOpenFolderDialog();
     //RadDocumentPaneStyle1 = this.FindResource("RadDocumentPaneStyle1") as Style;
     HeaderPane              = this.FindResource("HeaderPane") as DataTemplate;
     openFolderDialog.Owner  = this;
     openFolderDialog.Header = "Open Directory";
     if (!string.IsNullOrEmpty(PathFolder))
     {
         this.LoadDirectory(new System.IO.FileInfo(PathFolder).DirectoryName);
     }
 }
Esempio n. 11
0
        private void CreateNewProject_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                RadOpenFolderDialog openFolderDialog = new RadOpenFolderDialog();
                openFolderDialog.ShowDialog();
                var folderName = openFolderDialog.FileName;

                ViewModel.CreateNewProject(tbProjectName.Text, folderName);
            }
            catch (Exception ex)
            {
                _logger.Error(ex);
            }
        }
Esempio n. 12
0
 private void btnAddDesignFolder_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         RadOpenFolderDialog fBD = new RadOpenFolderDialog();
         // Show open folder dialog and check if Open button is pressed.
         if (fBD.ShowDialog() == true)
         {
             txtDesigns_UploadShopify.Text = fBD.FileName;
         }
     }
     catch (Exception ex)
     {
     }
 }
Esempio n. 13
0
        private void RadMenuItem_Click(object sender, RoutedEventArgs e)
        {
            RadOpenFolderDialog openFolderDialog = new RadOpenFolderDialog();

            openFolderDialog.Owner = Window.GetWindow(this);
            openFolderDialog.ShowDialog();
            if (openFolderDialog.DialogResult == true)
            {
                string folderName = openFolderDialog.FileName;
                ID.Directory_name = folderName;
                var fg = Directory.GetFiles(folderName, "*.sps", SearchOption.AllDirectories);
                foreach (var f in fg)
                {
                    RLB_sps.Items.Add(System.IO.Path.GetFileName(f));
                }
            }
        }
Esempio n. 14
0
    public AudiobookFilesView()
    {
        InitializeComponent();

        openFolderDialog = new RadOpenFolderDialog {
            Owner = this, ExpandToCurrentDirectory = false
        };

        StatusListBox.ItemsSource          = statusMessages = new ObservableCollection <OutputMessage>();
        AudiobookTitlesListBox.ItemsSource = audiobookTitles = new ObservableCollection <string>();
        AudiobookFilesGridView.ItemsSource = audiobookFiles = new ObservableCollection <AudiobookFile>();

        backgroundWorker = new BackgroundWorker {
            WorkerReportsProgress = true
        };
        backgroundWorker.DoWork             += BackgroundWorker_DoWork;
        backgroundWorker.ProgressChanged    += BackgroundWorker_ProgressChanged;
        backgroundWorker.RunWorkerCompleted += BackgroundWorker_RunWorkerCompleted;

        WriteOutput("Ready, open an author folder to begin.", OutputMessageLevel.Success);

        Unloaded += AudiobookFilesView_Unloaded;
    }
Esempio n. 15
0
        void exp()
        {
            RadOpenFolderDialog openFolderDialog = new RadOpenFolderDialog();

            openFolderDialog.ShowDialog();
            this.storage.FolderName = openFolderDialog.FileName;
            RadOpenFileDialog radOpenFileDialog = new RadOpenFileDialog()
            {
                Filter = "Word Documents (*.doc)|*.doc|Excel Worksheets (*.xls;*.xlsx)|*.xls;*.xlsx|PowerPoint Presentations (*.ppt)|*.ppt" +
                         "|Office Files (*.doc;*.xls;*.ppt)|*.doc;*.xls;*.ppt" +
                         "|All Files (*.*)|*.*",
                FilterIndex = 5,
            };

            radOpenFileDialog.ShowDialog();
            RadSaveFileDialog saveFileDialog = new RadSaveFileDialog()
            {
                Filter = "Word Documents (*.doc)|*.doc|Excel Worksheets (*.xls;*.xlsx)|*.xls;*.xlsx|PowerPoint Presentations (*.ppt)|*.ppt" +
                         "|Office Files (*.doc;*.xls;*.ppt)|*.doc;*.xls;*.ppt" +
                         "|All Files (*.*)|*.*",
                FilterIndex = 5,
            };

            //saveFileDialog.FileName = storageFile != null ? storageFile.Name : null;
            saveFileDialog.ShowDialog();
            if (saveFileDialog.DialogResult == true)
            {
            }

            //this.explorer.Filter = "Word Documents|*.doc;*.docx|Excel Worksheets|*.xls;*.xlsx|PowerPoint Presentations|*.ppt;*.pptx" +
            //                            "|Office Files|*.doc;*.docx*.xls;*.xlsx;*.ppt*.pptx" +
            //                            "|Image Files|*.jpg;*.png;*.bmp" +
            //                            "|Text Files|*.txt;" +
            //                            "|Archives Files|*.zip;*.rar" +
            //                            "|All Files|*.*";
        }