private void LockModeToolStripMenuItem_MouseUp(object sender, MouseEventArgs e) { switch (e.Button) { case MouseButtons.Left: if (enterRoomCheck.enterRoomformCheck == true) { enterRoomcheck.Hide(); mainform.Hide(); mainform.Enabled = false; StandByLogin.sbloginformCheck = true; StandByLogin standByLogin = new StandByLogin(mainform, enterRoomcheck); standByLogin.Show(); IconVisiblefalse(); standByLogin.contextMenuStripForm.LockIconVisibletrue(); standByLogin.Focus(); } else if (Chat_Form.ChatFormCheck == true) { chatform.Hide(); StandByLogin.sbloginformCheck = true; StandByLogin standByLogin = new StandByLogin(mainform, chatform); standByLogin.Show(); IconVisiblefalse(); standByLogin.contextMenuStripForm.LockIconVisibletrue(); standByLogin.Focus(); } else if (CreateRoom_Form.createRoomCheck == true) { createroom.Hide(); mainform.Hide(); mainform.Enabled = false; StandByLogin.sbloginformCheck = true; StandByLogin standByLogin = new StandByLogin(mainform, createroom); standByLogin.Show(); IconVisiblefalse(); standByLogin.contextMenuStripForm.LockIconVisibletrue(); standByLogin.Focus(); } else if (UserList_Form.userlistformCheck == true) { createroom.Hide(); userlistform.Hide(); mainform.Hide(); mainform.Enabled = false; createroom.Enabled = false; StandByLogin.sbloginformCheck = true; StandByLogin standByLogin = new StandByLogin(mainform, createroom, userlistform); standByLogin.Show(); IconVisiblefalse(); standByLogin.contextMenuStripForm.LockIconVisibletrue(); standByLogin.Focus(); } else { Mainform.mainformCheck = false; StandByLogin.sbloginformCheck = true; StandByLogin standByLogin = new StandByLogin(mainform); standByLogin.Show(); standByLogin.mainform.Hide(); IconVisiblefalse(); standByLogin.contextMenuStripForm.LockIconVisibletrue(); standByLogin.Focus(); } break; case MouseButtons.Right: // Right click break; } }
static internal void systemSleepMethod(object sender, PowerModeChangedEventArgs e) { switch (e.Mode) { case PowerModes.Resume: if (Mainform.mainformCheck == true) { Mainform.mainformCheck = false; mainform.contextMenuStripForm.IconVisiblefalse(); StandByLogin standbylogin = new StandByLogin(mainform); standbylogin.Show(); standbylogin.Focus(); mainform.Hide(); break; } else if (Mainform.mainformCheck == false && enterRoomCheck.enterRoomformCheck == true) { mainform.Hide(); enterRoomForm.Hide(); enterRoomForm.contextMenuStripForm.IconVisiblefalse(); StandByLogin standbylogin = new StandByLogin(mainform, enterRoomForm); standbylogin.Show(); standbylogin.Focus(); break; } else if (Mainform.mainformCheck == false && Chat_Form.ChatFormCheck == true) { chatform.Hide(); chatform.contextMenuStripForm.IconVisiblefalse(); StandByLogin standbylogin = new StandByLogin(mainform, chatform); standbylogin.Show(); standbylogin.Focus(); break; } else if (Mainform.mainformCheck == false && CreateRoom_Form.createRoomCheck == true) { mainform.Hide(); createroom.Hide(); createroom.contextMenuStripForm.IconVisiblefalse(); StandByLogin standbylogin = new StandByLogin(mainform, createroom); standbylogin.Show(); standbylogin.Focus(); break; } else if (Mainform.mainformCheck == false && CreateRoom_Form.createRoomCheck == false && UserList_Form.userlistformCheck == true) { mainform.Hide(); createroom.Hide(); userlist.Hide(); userlist.contextmenustripform.IconVisiblefalse(); StandByLogin standbylogin = new StandByLogin(mainform, createroom, userlist); standbylogin.Show(); standbylogin.Focus(); break; } else if (Login.loginformCheck == true) { break; } else { break; } case PowerModes.Suspend: break; } }