Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.QueryString["connectionID"] == null || Request.QueryString["connectionID"] == "" || Request.QueryString["cookieValue"] == null || Request.QueryString["cookieValue"] == "")
         {
             List <string> info = VVVID.GetConnectionInfo();
             Response.Redirect($"default.aspx?connectionID={info[0]}&cookieValue={info[1]}");
         }
         string connectionID = Request.Params["connectionID"];
         string cookieValue  = Request.Params["cookieValue"];
         if (!VVVID.TestConnectionInfo(connectionID, cookieValue))
         {
             List <string> info = VVVID.GetConnectionInfo();
             Response.Redirect($"default.aspx?connectionID={info[0]}&cookieValue={info[1]}");
         }
     }
 }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["connectionID"] == null || Request.QueryString["connectionID"] == "" || Request.QueryString["cookieValue"] == null || Request.QueryString["cookieValue"] == "" || Request.QueryString["animeInfo"] == null || Request.QueryString["animeInfo"] == "")
                {
                    List <string> info = VVVID.GetConnectionInfo();
                    Response.Redirect($"default.aspx?connectionID={info[0]}&cookieValue={info[1]}");
                }
                var    animeInfo    = Request.Params["animeInfo"].Split(new[] { '-' }, 2);
                int    animeID      = int.Parse(animeInfo[0]);
                string connectionID = Request.Params["connectionID"];
                string cookieValue  = Request.Params["cookieValue"];
                var    animeData    = VVVID.GetAnimeData(animeID, connectionID, cookieValue);

                lbl_titolo.Text = animeInfo[1];

                foreach (Anime a in animeData)
                {
                    ddl_tipo.Items.Add(a.name);
                }
                AggiornaGridLista(animeData[0]);
            }
        }