public MainPlugin(ICoolQApi coolQApi) : base(coolQApi) { try { //这里调用的话,会报authCode错误, /* * CacheData.LoginQQ = coolQApi.GetLoginQQ(); * CacheData.LoginNick = coolQApi.GetLoginNick(); * MyLogUtil.ToLogFotTest(CacheData.LoginQQ + "_" + CacheData.LoginNick); */ //先判断当前电脑是否有合适的.net版本 if (!MyDotNetFrameworkUtil.IsSupportedRuntimeVersion()) { IsSupportedRuntimeVersion = false; new RuntimeVerForm().Show(); return; } else { IsSupportedRuntimeVersion = true; CacheData.CoolQApi = coolQApi; //酷q登录成功后,进入软件登录页面 new login().Show(); } } catch (Exception ex) { MyLogUtil.ErrToLog("不可预知的异常,原因:" + ex); MessageBox.Show("不可预知的异常,请查看错误日志"); } }
private void button5_Click(object sender, EventArgs e) { if (!MyDotNetFrameworkUtil.IsSupportedRuntimeVersion()) { MessageBox.Show("当前电脑运行时版本低于4.5.2"); } else { MessageBox.Show("当前电脑运行时版本高于4.5.2"); } }