private void timer_update_Tick(object sender, EventArgs e) { if (this.Opacity < 1.0) { this.Opacity += 0.02; if (this.Opacity >= 1.0) { this.Opacity = 1.0; this.timer_update.Stop(); CheckUpdate(); // 일반공지 확인 후 표시 var noticeDoc = m_db.GetDocument("Server", "Notice"); if (noticeDoc == null) { noticeDoc = m_db.CreateDocument("Server", "Notice", new MongoDB.Bson.BsonDocument() { { "Title", "" }, { "Message", "" } }); } else { var title = noticeDoc["Title"].AsString; var msg = noticeDoc["Message"].AsString; // 메세지가 있으면 if (title.Length > 0 || msg.Length > 0) { MessageBox.Show(msg, title, MessageBoxButtons.OK, MessageBoxIcon.Information); } } // 서버선택 화면으로 넘어감 var serverMapForm = new Form_ServerMap(); serverMapForm.Show(); this.Hide(); } } }
private void button_exit_Click(object sender, EventArgs e) { if (this.button_login.Enabled) { this.Hide(); foreach (Form form in Application.OpenForms) { if (form is Form_ServerMap) { form.Show(); return; } } var serverMapForm = new Form_ServerMap(); serverMapForm.Show(); } else { Application.Exit(); } }