public static bool QueueGuiLockingTask(string taskName, WaitCallback callback, object state) { if (callback == null) { throw new ArgumentNullException("callback"); } if (MainForm == null) { //execute directly callback(state); return(true); } if (LockedGUIForm == null) { LockedGUIForm = new FreeCL.Forms.LockedGuiForm(); LockedGUIForm.Init(); } waitMessage = taskName; return(TaskConveyer.QueueExtTask( taskName, callback, state, new WaitCallback(OnStartGuiLockingTask), new WaitCallback(OnEndGuiLockingTask), new WaitCallback(OnExceptionInGuiLockingTask) )); }
public static void StartGuiLockingTask(string waitMess) { if (LockedGUIForm == null) { LockedGUIForm = new FreeCL.Forms.LockedGuiForm(); LockedGUIForm.Init(); } waitMessage = waitMess; OnStartGuiLockingTask(null); }
static public void SyncStart(string message, LockCallback callback, object state) { if (SyncLockedGUIForm == null) { SyncLockedGUIForm = new FreeCL.Forms.LockedGuiForm(); SyncLockedGUIForm.Init(); } SyncLockedGUIForm.savedCallBack = callback; SyncLockedGUIForm.savedState = state; SyncLockedGUIForm.tCallback.Enabled = true; SyncLockedGUIForm.StartWaiting(message); Application.DoEvents(); }
public static void SyncStart(string message, LockCallback callback, object state) { if(SyncLockedGUIForm == null) { SyncLockedGUIForm = new FreeCL.Forms.LockedGuiForm(); SyncLockedGUIForm.Init(); } SyncLockedGUIForm.savedCallBack = callback; SyncLockedGUIForm.savedState = state; SyncLockedGUIForm.tCallback.Enabled = true; SyncLockedGUIForm.StartWaiting(message); Application.DoEvents(); }
public static void StartGuiLockingTask(string waitMess) { if(LockedGUIForm == null) { LockedGUIForm = new FreeCL.Forms.LockedGuiForm(); LockedGUIForm.Init(); } waitMessage = waitMess; OnStartGuiLockingTask(null); }
public static bool QueueGuiLockingTask(string taskName, WaitCallback callback, object state) { if(callback == null) throw new ArgumentNullException("callback"); if(MainForm == null) { //execute directly callback(state); return true; } if(LockedGUIForm == null) { LockedGUIForm = new FreeCL.Forms.LockedGuiForm(); LockedGUIForm.Init(); } waitMessage = taskName; return TaskConveyer.QueueExtTask( taskName, callback, state, new WaitCallback(OnStartGuiLockingTask), new WaitCallback(OnEndGuiLockingTask), new WaitCallback(OnExceptionInGuiLockingTask) ); }