using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Runtime.Remoting.Messaging;

namespace MyTunes.Admin
{
    public partial class ScanStatus : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Global g = (Global)HttpContext.Current.ApplicationInstance;
            try
            {
                if (g.AsyncResult == null)
                    Response.Write("1 " + g.ScanStatus);
                else if (g.AsyncResult.IsCompleted)
                    Response.Write("1 " + g.ScanStatus);
                else
                    Response.Write("0 " + g.ScanStatus);
            }
            catch (Exception ex)
            {
                Response.Write("0 " + ex.Message);
            }
            Response.Cache.SetNoStore();
            Response.End();
        }
    }
}