瀏覽代碼

Add file name to window title on open

tznind 2 年之前
父節點
當前提交
751efd4986
共有 1 個文件被更改,包括 2 次插入0 次删除
  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");
 			}