<%@ Page language="c#" Inherits="VoServices.Footprint.Web.operation" CodeFile="operation.aspx.cs" ValidateRequest="false" MasterPageFile="~/Wide.master" %>

<asp:Content ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">

						<form id="default" method="post" runat="server" defaultbutton="btnIsect">
						<table align="center" width="95%">
						
						<tr>
						<td width="48%"><p style="text-align: left"><asp:Label ID="lblLeft" runat="server" Text="Region 1:" /></p></td>
						<td></td>
						<td width="48%"><p style="text-align: left"><asp:Label ID="lblRight" runat="server" Text="Region 2:" /></p></td>
						</tr>
						
						<tr>
						<td><asp:TextBox ID="tbLeft" runat="server" Width="450" Wrap="false" TextMode="MultiLine" Rows="7" /></td>
						<td></td>
						<td><asp:TextBox ID="tbRight" runat="server" Width="450" Wrap="false" TextMode="MultiLine" Rows="7" /></td>
						</tr>

                        <tr>
                        <td align="right">
                        <asp:Button ID="btnClear" runat="server" Text="Clear" BorderColor="Red" BorderStyle="Double" OnClick="btnClear_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:Button ID="btnUnion" runat="server" Text="Union" OnClick="btnUnion_Click" />
                        <asp:Button ID="btnIsect" runat="server" Text="Intersection" OnClick="btnIsect_Click" />
                        </td>
                        <td></td>
						<td style="text-align: left">
                        <asp:Button ID="btnTest1" runat="server" Text="Test 1" OnClick="btnTest1_Click" />
                        <asp:Button ID="btnTest2" runat="server" Text="Test 2" OnClick="btnTest2_Click" />
                        <asp:Button ID="btnTest3" runat="server" Text="Test 3" OnClick="btnTest3_Click" />
                        <asp:Button ID="btnTest4" runat="server" Text="Test 4" OnClick="btnTest4_Click" />
						</td>
						</tr>   

           				</table>
           				
           				<table runat="server" id="tblResult" visible="false">
           				<tr width="95%" align="center">
           				<td> </td>
           				<td width="74%" align="center"><asp:Image runat="server" ID="imgPlot" Visible="true" ImageUrl="gifbytes.aspx" /></td>
           				<td> </td>
           				</tr>

           				<tr width="95%" align="center">
           				<td></td>
           				<td width="74%" align="left"><p><asp:Label ID="lblBottom" runat="server" Text="Simplified STC Region:" Visible="true" /></p></td>
           				<td></td>
           				</tr>
           				
           				<tr width="95%" align="center">
           				<td></td>
           				<td width="74%" align="center"><asp:TextBox ID="tbBottom" runat="server" Width="768" TextMode="MultiLine" Visible="true" Rows="13"></asp:TextBox></td>
           				<td></td>
           				</tr>
						</table>

                        <table width="768" align="center">
                        <tr><td> </td></tr>
                        <tr><td>
                        <h2 style="text-align: left">How to use this page?</h2>
                        <p style="text-align: justify">
                        On this page, one can submit two  footprint descriptions
                        for validation and operations. The "Region 1" and "Region 2"
                        textboxes take region descriptions in the STC format
                        (xml) or plain text of internal representation. 
                        The "Union" and "Intersection" buttons do what they promise
                        and also visualize the result. The area of the resulting region
                        is computed and the simplified STC description is returned.
                        </p>                  
                        <p style="text-align: left">
                        Use the test buttons to populate the textboxes with
                        working examples and click "Submit"!
                        </p>
                        </td></tr>
                        </table>
                        </form>
                        
</asp:Content>
