Please connect the phone to the computer and download Android SDK tools. After you install the tools, start SDK Manager and check to install Android Platform tools.
Open a Command Prompt and browse to %SystemDrive%\Program Files\Android\android-sdk\platform-tools. Type adb shell followed by the command: rm /data/system/gesture.key. Restart the phone and enter any pattern you like because the phone will unlock then you can change it.