Esempio n. 1
0
 internal MainViewModel()
 {
     try
     {
         CleanUpMemory = Resources.MainViewCleanUpMemory;
         Computer      = new Computer
         {
             MemoryAvailable = ComputerHelper.GetMemoryAvailable().ByteSizeToString(),
             MemorySize      = ComputerHelper.GetMemorySize().ByteSizeToString(),
             MemoryUsage     = ComputerHelper.GetMemoryUsage()
         };
         MemoryCleanCommand = new RelayCommand(MemoryClean);
         Version version = Assembly.GetExecutingAssembly().GetName().Version;
         Title = string.Format("{0} {1}.{2}", Resources.MainViewTitle, version.Major, version.Minor);
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex);
     }
 }