using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace MeterVision.Dlg
{
    /// <summary>
    /// AboutWindow.xaml 的交互逻辑
    /// </summary>
    public partial class AboutWindow : Window
    {
        public AboutWindow()
        {
            InitializeComponent();

            // 获取应用程序的程序集
            var assembly = Assembly.GetExecutingAssembly();
            var assemblyName = assembly.GetName();
            var appName = assemblyName.Name;  // 应用程序名称
            var version = assemblyName.Version;  // 版本号
            var copyright = "Copyright © 2024 北京鸿成鑫鼎智能科技有限公司. \r\nAll rights reserved."; // 可以通过资源文件或代码设置
            //var developer = "Developed by Hongcheng Xinding AI Technology Co., Ltd.";

            // 将应用程序信息显示到界面
            AppNameTextBlock.Text = appName;
            VersionTextBlock.Text = $"Version: {version}";
            CopyrightTextBlock.Text = copyright;
            //DeveloperTextBlock.Text = developer;
        }

        // 点击关闭按钮时关闭窗口
        private void CloseButton_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
        //-------------------------------------------------------------
    }
}
