Actually, found it out, went into debug to see properties:
PortalManager.ViewMode.ToString() gives the mode. Just set it to
if(this.PortalManager.ViewMode.ToString() != "Edit")
The ViewModes are either Edit, Preview, or i assume Live
Hope this helps someone elese