public Login() { //MessageBox.Show(Application.StartupPath); InitializeComponent(); this.InitForm(); SMethod.InitBackForeColor(this); label_title.Text += string.Format("({0})", ApplicationUpdate.GetCurrentVersion()); Task.Run(() => { ApplicationUpdate.Init(); this.BeginInvoke_CheckHandle(() => { button_login.Enabled = true; label_ServerVersion.Text = ApplicationUpdate.CheckForUpdate_Result ? "当前有可用更新" : "当前无可用更新"; label_ServerVersion.ForeColor = ApplicationUpdate.CheckForUpdate_Result ? SParms.AlarmColor : SParms.NomalColor; label_ServerVersion.Visible = true; }); }); //if ( string.IsNullOrWhiteSpace( ApplicationUpdate.ServerVewsion)) //{ // label_ServerVersion.Text = "服务器上的最新版本为:" + ApplicationUpdate.ServerVewsion; //} //else //{ //} }
public GWSelect() { //MessageBox.Show(Application.StartupPath); InitializeComponent(); this.InitForm(); SMethod.InitBackForeColor(this); dataGridView1.DataSource = SQL.SQLConnect.SelectSQL("select * from ZXJC_ZSTJPCS_CONFIG order by scx,gx,gongwei", out string err); dataGridView1.MultiSelect = false; if (dataGridView1.Rows.Count > 0 && dataGridView1.Columns.Count > 0) { dataGridView1.CurrentCell = dataGridView1[0, 0]; } }