<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Utility.aspx.cs" Inherits="GigaTech.CMS.Web.Apps.DeviceSystem.Utility" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
    <script language=javascript>
        function SendCmd(option, device_id, msg) {
            Ext.Ajax.request({
                url: 'Handler.ashx',
                params: {
                    action: 'ExecCMD',
                    option: option
                },
                success: function (response) {
                    alert("<%=GetGlobalResourceObject("CMSResource", "CmdSent")%>");
            }
        });
        }

        Ext.onReady(function () {
            Ext.QuickTips.init();

            var w = Ext.create('Ext.window.Window', {
                title: "<%=GetGlobalResourceObject("CMSResource", "SystemTools")%>",
                constrain: true,
                closable: false,
                maximized: true,
                autoScroll: true,
                shadow: true,
                shadowOffset: 50,
                bodyStyle: 'background:white',
                defaultType: 'button',
                defaults: { anchor: '100%' },
                layout: 'anchor',
                //margin: 10,
                //columnWidth: 0.5,
                items: [
                     {
                         text: '<font color=blue><%=GetGlobalResourceObject("CMSResource", "UpdateIPTable")%></font>',
                         margin: 5,
                         scale: 'large',
                         cls: 'x-btn-default-small',
                         border: 1,
                         style: {
                             borderColor: 'gray',
                             borderStyle: 'solid'
                         },
                         flex: 1,
                         iconAlign: 'top',
                         icon: '/Common/DMZ/Images/32x32/table_refresh.png',
                         handler: function () {
                             SendCmd("NotifyDeviceUpdateIPTable");
                         }
                     },
                                            {
                                                text: '<font color=blue><%=GetGlobalResourceObject("CMSResource", "UpdateContact")%></font>',
                                                margin: 5,
                                                scale: 'large',
                                                cls: 'x-btn-default-small',
                                                border: 1,
                                                style: {
                                                    borderColor: 'gray',
                                                    borderStyle: 'solid'
                                                },
                                                flex: 1,
                                                iconAlign: 'top',
                                                icon: '/Common/DMZ/Images/32x32/UserCard.png',
                                                handler: function () {
                                                    SendCmd("UpdateContactList2Device");
                                                }
                                            }
                ]

            }).show();
        });
    </script>
<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
    </form>
</body>
</html>
