其他分享
首页 > 其他分享> > 更新提示

更新提示

作者:互联网

private void timer1_Tick(object sender, EventArgs e)
{
x++;
if (x == 10)
{
string sql = "SELECT New_Version FROM VersionNumber";
string str = Convert.ToString(SqlHelper.SqlHelper.GetOneResult(sql));
if (str != ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString())
{
label1.Text = "发现新的版本,请重启程序进行更新";
label1.ForeColor = Color.Red;
}
else
{
label1.Text = "没有新的版本";
label1.ForeColor = Color.Black;
}
x = 0;
}

    }

标签:SqlHelper,提示,label1,更新,ForeColor,ToString,sql,string
来源: https://www.cnblogs.com/zhujie-com/p/13721505.html