Procházet zdrojové kódy

Add file name to window title on open

tznind před 2 roky
rodič
revize
751efd4986
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  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");
 			}