Browse Source

Add file name to window title on open

tznind 2 years ago
parent
commit
751efd4986
1 changed files with 2 additions and 0 deletions
  1. 2 0
      UICatalog/Scenarios/CsvEditor.cs

+ 2 - 0
UICatalog/Scenarios/CsvEditor.cs

@@ -433,6 +433,8 @@ namespace UICatalog.Scenarios {
 
 				// Only set the current filename if we successfully loaded the entire file
 				currentFile = filename;
+				Win.Title = $"{this.GetName ()} - {Path.GetFileName(currentFile)}";
+
 			} catch (Exception ex) {
 				MessageBox.ErrorQuery ("Open Failed", $"Error on line {lineNumber}{Environment.NewLine}{ex.Message}", "Ok");
 			}