!提交代码
This commit is contained in:
34
货架标准上位机/ViewModels/AboutViewModel.cs
Normal file
34
货架标准上位机/ViewModels/AboutViewModel.cs
Normal file
@ -0,0 +1,34 @@
|
||||
using Ping9719.WpfEx.Mvvm;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace 货架标准上位机.ViewModel
|
||||
{
|
||||
public class AboutViewModel : BindableBase
|
||||
{
|
||||
public AboutViewModel()
|
||||
{
|
||||
var versionInfo = FileVersionInfo.GetVersionInfo(LocalFile.AppPath);
|
||||
Name = versionInfo.ProductName;
|
||||
Company = $"{versionInfo.CompanyName} {versionInfo.LegalCopyright}";
|
||||
Ver = $"v {new string(versionInfo.FileVersion.Take(5).ToArray())}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 程序名
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// 公司名
|
||||
/// </summary>
|
||||
public string Company { get; set; }
|
||||
/// <summary>
|
||||
/// 版本
|
||||
/// </summary>
|
||||
public string Ver { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user