private bool LaunchAfterRestart() { LockResult result = lockFile.LockWait(10000, WaitRetryDelay); while (result != LockResult.Success) { if (result is LockResult.Fail fail) { ShowGenericException(fail); return(false); } else if (!FormMessage.Warning("TweetDuck Cannot Restart", "TweetDuck is taking too long to close.", FormMessage.Retry, FormMessage.Exit)) { return(false); } result = lockFile.LockWait(5000, WaitRetryDelay); } return(true); }