void pinLoginStatusTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { this.curTimeLoginFlag = ""; WindowFormAPI.MinOrMaxWindowFormByTitle(new string[] { "TeamViewer Panel", "发起会话" }, 2); try { if (this.loginFlag == "1") { return; } else { this.loginFlag = "1"; } Login(); } catch (Exception ex) { this.richTextBox1.Text = this.richTextBox1.Text + string.Format("执行函数pinLoginStatusTimer_Elapsed发生异常:{0}", ex.Message); } finally { this.loginFlag = ""; } }