示例#1
0
        static public bool RequestPersistentLockWithRetry(string assetFullName, string description)
        {
            if (!guiAssetSourceLock.IsLockedWithRetry(assetFullName))
            {
SourceLockGet:
                MOG_Command sourceLock = MOG_ControllerProject.PersistentLock_Request(assetFullName, description);

                lockHolder = sourceLock.GetCommand();
                if (sourceLock.IsCompleted() &&
                    lockHolder != null)
                {
                    if (!sourceLock.IsCompleted() ||
                        lockHolder == null)
                    {
                        switch (LockMessage("Could not aquire this lock!", sourceLock, lockHolder))
                        {
                        case DialogResult.Retry:
                            goto SourceLockGet;
                        }
                    }
                }

                return(sourceLock.IsCompleted());
            }

            return(false);
        }