<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ASExtensionView.ascx.cs" Inherits="Zap.BI.Portal.Controls.UserControls.ResourceControls.ASExtensionView" %>

<zapWeb:Upload ID="ImportUpload" runat="server" OnUploadComplete="OnImportUploadComplete" />

<div id="ViewContent" runat="server">
    <dxwgv:ASPxGridView runat="server" ID="AssembliesGridView" EnableCallBacks="false" KeyFieldName="Name" Width="800"
                        CssClass="has-resizable-columns"
                        Styles-Header-CssClass="grid-header-cell"
                        Styles-Row-CssClass="grid-row"
                        Styles-EmptyDataRow-CssClass="grid-empty"
                        Styles-Disabled-CssClass="is-disabled"
                        Styles-SelectedRow-CssClass="is-selected"
                        Styles-FocusedRow-CssClass="has-focus" 
                        Styles-PagerBottomPanel-CssClass="grid-pager" >
        <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="200" />           
        <SettingsBehavior AllowMultiSelection="false" AllowFocusedRow="true" ColumnResizeMode="Control" />
        <SettingsPager PageSize="2000" />
        <Columns>
            <dxwgv:GridViewDataImageColumn FieldName="ImageUrl" Width="28" Caption="&nbsp;" VisibleIndex="0" CellStyle-CssClass="icon-column"/>
            <dxwgv:GridViewDataColumn FieldName="Name" Caption="<%$ Resources: Controls.UserControls.ResourceControls.ASExtensions.ASExtensionText, ColumnName_Name %>"
                VisibleIndex="1" SortOrder="Ascending" />
            <dxwgv:GridViewDataColumn FieldName="Version" Caption="<%$ Resources: Controls.UserControls.ResourceControls.ASExtensions.ASExtensionText, ColumnName_AssemblyVersion %>"
                VisibleIndex="2" />
            <dxwgv:GridViewCommandColumn VisibleIndex="3" Width="80">
                <CustomButtons>
                    <dxwgv:GridViewCommandColumnCustomButton Text="<%$ Resources: Controls.Settings.SettingsText, Label_Delete %>" />
                </CustomButtons>
            </dxwgv:GridViewCommandColumn>
            <dxwgv:GridViewDataColumn Name="Main" Width="100">
                <HeaderCaptionTemplate>
                    <asp:Label runat="server" Text="<%$ Resources: Controls.UserControls.ResourceControls.ASExtensions.ASExtensionText, ColumnName_MainAssembly%>" />
                </HeaderCaptionTemplate>
                <DataItemTemplate>
                    <asp:CheckBox ID="SelectAsMain" OnDataBinding="SelectAsMain_DataBinding" runat="server" OnCheckedChanged="MainAssembly_Checked" AutoPostBack="true"/>
                </DataItemTemplate>
            </dxwgv:GridViewDataColumn>
        </Columns>
        <Styles CssPostfix="DE">
            <AlternatingRow Enabled="True" />
        </Styles>
    </dxwgv:ASPxGridView>
    
    <table>    
        <tr>
            <td>
                <asp:Label ID="UniqueNameLabel" runat="server" CssClass="Label ui-form-label-inline" Text="<%$ Resources: Controls.UserControls.ResourceControls.ASExtensions.ASExtensionText, Label_UniqueName %>" 
                    ToolTip="<%$ Resources: Controls.UserControls.ResourceControls.ASExtensions.ASExtensionText, ToolTip_UniqueName %>"/>&nbsp;
                <asp:TextBox ID="UniqueName" runat="server" Width="150px" AutoPostBack="true" OnTextChanged="UniqueName_TextChanged" CssClass="ui-input-box" />
            </td>
        </tr>          
    </table>    
</div>

<asp:Button runat="server" ID="DeployButton" CssClass="ui-button" OnClick="DeployButton_Click" Text="<%$ Resources: Controls.UserControls.ResourceControls.ASExtensions.ASExtensionText, Button_Deploy%>"></asp:Button>
<asp:Button runat="server" ID="RemoveButton" CssClass="ui-button" OnClick="RemoveButton_Click" Text="<%$ Resources: Controls.UserControls.ResourceControls.ASExtensions.ASExtensionText, Button_Remove%>"></asp:Button>
