How does AutoCAD know that you want select entire visible area? It certainly does not know it just because your code prompts user to press "Enter".
So, you either let user to pick 2 points as the opposite corners of the desired area, or calculate the current view's 2 corners if user simply pressed "Enter". In the latter case, you need to set up PromptPointOptions to allow keyword and accept null input while calling Editor.GetPoint(). Something like:
Point3d corner1;
Point3d corner2;
var opt=new PromptCornerOptions("\nSelect first corner point of the area, or select entire view area:")
opt.Allownone=true;
opt.Keywords.Add("Entire");
opt.Keywords.Default="Entire";
...
var res=ed.GetCorner(opt);
if (res.Status==PromptStatus.Ok || res.Status==PromptStatus.Keyword)
{
if (res.Status==PromptStatus.Ok)
{
corner1=res.Value;
// Ask user to pick the other corner
}
else
{
// Now, you calculate the 2 corners of the current view
GetCurrentViewCorners(out corner1, out corner2)
}
}
else
{
// return....
}
You can read this articles on how to easily calculate current view's size:
https://drive-cad-with-code.blogspot.com/2013/04/how-to-get-current-view-size.html