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); } } }
private void pathOutputBtn_Click(object sender, RoutedEventArgs e) { RadOpenFolderDialog openFolderDialog1 = new RadOpenFolderDialog(); openFolderDialog1.ShowDialog(); this.storage.PathOutput = openFolderDialog1.FileName; }
private void SelectFolderMockupClick(object sender, RoutedEventArgs e) { RadOpenFolderDialog openFolderMockupDialog = new RadOpenFolderDialog(); openFolderMockupDialog.ShowDialog(); txtPathMockup.Text = openFolderMockupDialog.FileName; }
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); }
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); } }
private void SelectFolderButton_Click(object sender, RoutedEventArgs e) { RadOpenFolderDialog openFolderDialog = new RadOpenFolderDialog(); openFolderDialog.ShowDialog(); SDDPFilesFolderTextBox.Text = openFolderDialog.FileName; filesReadingParametersViewModel.InputFilesPath = openFolderDialog.FileName; }
public Editor1() { InitializeComponent(); MyCommand.InputGestures.Add(new KeyGesture(Key.O, ModifierKeys.Control)); this.openFolderDialog = new RadOpenFolderDialog(); openFolderDialog.Owner = this; openFolderDialog.Header = "Open Directory"; }
private void EventButtonSettingFolderSelect(object sender, EventArgs e) { RadOpenFolderDialog dialog = new RadOpenFolderDialog(); DialogResult result = dialog.ShowDialog(); if (result == DialogResult.OK) { StxFolder.Text = dialog.FileName; } }
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; } }
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); } }
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); } }
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) { } }
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)); } } }
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; }
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|*.*"; }