andrew4582

WindowExtentsions

Apr 30th, 2012
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1.     public static class WindowExtentsions {
  2.  
  3.         public static readonly Version AssemblyVersion = Assembly.GetExecutingAssembly().GetName().Version;
  4.  
  5.         public static void SetTitle(this Window w,string s = "") {
  6.  
  7.             string nt = "CPU Performance " + AssemblyVersion.ToString();
  8.  
  9.             if(!string.IsNullOrWhiteSpace(s))
  10.                 w.Title = nt + " - " + s;
  11.             else
  12.                 w.Title = nt;
  13.         }
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment