Exemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            UpdateClass.UpdateFrom("FCT-LED-Client");
            this.Text = this.Text + "-" + Application.ProductVersion;
            label8.Text = "REV." + Application.ProductVersion;
            Station();
            InitSocket();
            modellist();
            string Strsql = $"exec sp_Busy '{StationLab.Text}'";
            string statusID = AdoInterface.Readstr(Strsql);
            if (statusID == "0")
            {
                pageset();
            }
            else if (statusID == "1")
            {
                loadtempmodel();
                button2_Click(sender, e);
                loadtime();
            }
            cl = true;


            MouseMove += Form_MouseMove;
            MouseDown += Form_MouseDown;
        }
Exemplo n.º 2
0
        public static void UpdateFrom(String Name)
        {
            AppName = Name;
            string str = UpdateClass.Update();

            if (str != null)
            {
                if (DialogResult.Yes == MessageBox.Show($"更新内容:\n\n{str}", "发现新版本", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1))
                {
                    if (loadUpdate())
                    {
                        Application.Exit();
                    }
                }
            }
        }