private void ExecuteCommand(FormFader.Command FadeCommand, bool bWait) { if (FadeCommand == Command.FadeExit) { if (m_bFadeExitCalled) { return; } m_bFadeExitCalled = true; } m_CurrentCommand = FadeCommand; m_EventCommandDone.Reset(); m_AutoEvent.Set(); if (bWait) { m_EventCommandDone.WaitOne(); } }
private void InitClass(System.Windows.Forms.Form form, FormFader.FadeSpeed Speed) { m_form = form; m_AutoEvent = new System.Threading.AutoResetEvent(false); m_EventCommandDone = new System.Threading.ManualResetEvent(false); m_thread = new System.Threading.Thread(new System.Threading.ThreadStart(Fader)); m_thread.Start(); }
public FormFader(System.Windows.Forms.Form form, FormFader.FadeSpeed Speed) { InitClass(form,Speed); }
private void ExecuteCommand(FormFader.Command FadeCommand) { this.ExecuteCommand(FadeCommand,false); }