static public string SaveFile(string filter) { DXSaveFileDialog dialog = new DXSaveFileDialog(); dialog.Filter = filter; if (dialog.ShowDialog() == false) { throw new Exception("File is not selected"); } return(dialog.FileName); }
private void OnSaveBarItemClick(object sender, ItemClickEventArgs e) { DXSaveFileDialog dialog = new DXSaveFileDialog { DefaultExt = DefaultFileExtension }; bool?result = dialog.ShowDialog(); if (result.HasValue && result.Value) { chartControl.SaveToFile(dialog.FileName); statusMessageItem.Content = String.Format(LayoutSavedFormatString, dialog.FileName); } }
public void Export() { using (var dialog = new DXSaveFileDialog()) { dialog.Filter = "KML files|*.kml"; dialog.CreatePrompt = true; dialog.OverwritePrompt = true; if (dialog.ShowDialog().Value) { Editor.ActiveLayer.ExportToKml(dialog.FileName); DXMessageBox.Show(this, string.Format("Items successfully exported to {0} file", dialog.FileName), "Info", MessageBoxButton.OK, MessageBoxImage.Information); } } }