Will resign if convicted: Gilani