Changeset 11012
- Timestamp:
- 06/12/14 14:15:20 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs
r9901 r11012 25 25 using System.Windows.Forms; 26 26 using HeuristicLab.Common; 27 using HeuristicLab.Core; 27 28 using HeuristicLab.MainForm; 28 29 using HeuristicLab.PluginInfrastructure; … … 120 121 saveFileDialog.FilterIndex = 2; 121 122 } 122 saveFileDialog.FileName = string.IsNullOrEmpty(content.Filename) ? "Item" : content.Filename; 123 124 INamedItem namedItem = content as INamedItem; 125 string suggestedFileName = string.Empty; 126 if (!string.IsNullOrEmpty(content.Filename)) suggestedFileName = content.Filename; 127 else if (namedItem != null) suggestedFileName = namedItem.Name; 128 else suggestedFileName = "Item"; 129 130 saveFileDialog.FileName = suggestedFileName; 123 131 124 132 if (saveFileDialog.ShowDialog() == DialogResult.OK) {
Note: See TracChangeset
for help on using the changeset viewer.