Exemplo n.º 1
0
        private void Process(ActionData data)
        {
            lock (m_lock) {
                if (!ActionLock.IsLocked && !MainForm.IsLocked)
                {
                    int flags = Flags;

                    if ((flags & AutoLock) != 0)
                    {
                        ActionLock.Lock();
                    }
                    //new SyncThread(delegate {
                    if (!AppManager.MainForm.IsDisposed)
                    {
                        int result = Execute(data);

                        if (((flags | result) & AutoUnlock) != 0)
                        {
                            ActionLock.Unlock();
                        }
                    }
                    //}).AsyncStart();
                }
            }
        }
Exemplo n.º 2
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     ActionLock.Unlock();
     AppManager.GetAction(DisposeAction.Name).ProcessEvent(sender, e);
 }