using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace GcDevicePc
{
    public partial class AboutForm : Form
    {
        private string Hmiversion = "";
        private string Tempversion = "";
        private string Powerversion = "";
        private string FID1version = "";
        private string FID2version = "";
        private string TCD1version = "";

        public AboutForm()
        {
            InitializeComponent();
        }

        public AboutForm(ushort[] buf)
        {
            InitializeComponent();
            this.Hmiversion = buf[1].ToString() + "." + buf[0].ToString();
            this.Tempversion = buf[3].ToString() + "." + buf[2].ToString();
            this.Powerversion = buf[5].ToString() + "." + buf[4].ToString();
            this.FID1version = buf[7].ToString() + "." + buf[6].ToString();
            this.FID2version = buf[9].ToString() + "." + buf[8].ToString();
            this.TCD1version = buf[11].ToString() + "." + buf[10].ToString();
        }

        private void AboutForm_Load(object sender, EventArgs e)
        {
            this.tempver.Text = this.Tempversion;
            this.powerver.Text = this.Powerversion;
            this.fid1ver.Text = this.FID1version;
            this.fid2ver.Text = this.FID2version;
            this.tcdver.Text = this.TCD1version;
            this.PCver.Text = this.Hmiversion + "/1.4.8";
        }
    }
}
