private void Vpn_EventTimer_Tick(object sender, EventArgs e) { //연결중일때 스타트 if (ConnectionEventCheck == true) { Vpn_EventTimer.Stop(); this.Hide(); } }
private void Vpn_Login_FormClosed(object sender, FormClosedEventArgs e) { //closed = 폼닫고나서 수행 closing 폼닫기전 if (e.CloseReason == CloseReason.None) //hide 명령어 사용하면 여기로 { return; } if (e.CloseReason == CloseReason.UserClosing) //close 명령어 포함 사용자 창닫기까지 여기로 { Vpn_EventTimer.Stop(); VpnClientExitEvent(true); Close(); } }