static public string OpenFile(string filter) { DXOpenFileDialog dialog = new DXOpenFileDialog(); dialog.Filter = filter; if (dialog.ShowDialog() == false) { throw new Exception("File is not selected"); } return(dialog.FileName); }
private void BarButtonItem_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e) { DXOpenFileDialog fileDialog = new DXOpenFileDialog(); fileDialog.InitialDirectory = System.Environment.CurrentDirectory + @"\Data"; fileDialog.Filter = "Excel File | *.xlsx"; fileDialog.Title = "Select XLSX File"; if (fileDialog.ShowDialog() == true) { dashboardExcelDataFileName = fileDialog.FileName; dashboardControl.LoadDashboard(dashboardFileName); } }
private void ShowLoadChartLayoutDialog() { DXOpenFileDialog dialog = new DXOpenFileDialog { DefaultExt = DefaultFileExtension }; bool?result = dialog.ShowDialog(); if (result.HasValue && result.Value) { chartControl.LoadFromFile(dialog.FileName); CreateBindings(); statusMessageItem.Content = String.Format(LayoutLoadedFormatString, dialog.FileName); } }
private void Browse_Click(object sender, RoutedEventArgs e) { var dlg = new DXOpenFileDialog { Filter = "Assembly Files (*.dll)|*.dll", Multiselect = true, }; if (dlg.ShowDialog(this) != true) { return; } Toc.Items.Clear(); var navigation = new Navigation { UrlPrefix = "http://stocksharp.com/doc/ref/", EmptyImage = "http://stocksharp.com/images/blank.gif" }; GenerateHtml.CssUrl = @"file:///C:/VisualStudio/Web/trunk/Site/css/style.css"; GenerateHtml.Navigation = navigation; //ToDo: переделать GenerateHtml.IsHtmlAsDiv = false; GenerateHtml.IsRussian = true; var asmFiles = dlg.FileNames; var docFiles = asmFiles .Select(f => Path.Combine(Path.GetDirectoryName(f), Path.GetFileNameWithoutExtension(f) + ".xml")) .Where(File.Exists) .ToArray(); var slnDom = SolutionDom.Build("StockSharp. Описание типов", asmFiles, docFiles, Path.GetFullPath(@"..\..\..\..\..\StockSharp\trunk\Documentation\DocSandCastle\Comments\project.xml"), null, new FindOptions { InternalClasses = false, UndocumentedClasses = true, PrivateMembers = false, UndocumentedMembers = true }); _root = BuildPages.BuildSolution(slnDom); BuildTree(_root, Toc.Items); }