private void close_ready_screen() { if (InvokeRequired) { func_delegate d = new func_delegate(close_ready_screen); this.Invoke(d, new object[] { }); } else { ready_screen.Close(); } }
void stop_timers() { if (InvokeRequired) { func_delegate d = new func_delegate(stop_timers); this.Invoke(d, new object[] { }); } else { keep_alive.Stop(); server_alive.Stop(); } }
public void im_ready() { if (InvokeRequired) { func_delegate d = new func_delegate(im_ready); this.Invoke(d, new object[] { }); } else { ready_btn.Enabled = false; ready_btn.BackgroundImage = Properties.Resources.ready_btn_inactive; main_hub.my_info.am_i_ready = true; } }
void logout() { if (InvokeRequired) { func_delegate d = new func_delegate(logout); this.Invoke(d, new object[] {}); } else { if (listener_thread.IsAlive) { listener_thread.Abort(); } stop_timers(); login_screen.Show(); this.Close(); } }
public void disable_both_buttons() { if (InvokeRequired) { func_delegate d = new func_delegate(disable_both_buttons); this.Invoke(d, new object[] { }); } else { if (curr_button_mode != 3) { join_btn.Enabled = false; leave_btn.Enabled = false; // graphics join_btn.BackgroundImage = Properties.Resources.join_btn_inactive; leave_btn.BackgroundImage = Properties.Resources.leave_btn_inactive; curr_button_mode = 3; } } }
public void allow_join_button() { if (InvokeRequired) { func_delegate d = new func_delegate(allow_join_button); this.Invoke(d, new object[] { }); } else { if (curr_button_mode != 1) { join_btn.Enabled = true; leave_btn.Enabled = false; // graphics join_btn.BackgroundImage = Properties.Resources.join_btn_active; leave_btn.BackgroundImage = Properties.Resources.leave_btn_inactive; curr_button_mode = 1; } } }
private void open_ready_screen() { if (InvokeRequired) { func_delegate d = new func_delegate(open_ready_screen); this.Invoke(d, new object[] { }); } else { if (ready_screen == null) { ready_screen = new ready_scr(this); } if (ready_screen.IsDisposed) { ready_screen = new ready_scr(this); } ready_screen.Show(); ready_screen.TopMost = true; } }