Example #1
0
 private IEnumerator GetPage2(BookPosition book)
 {
     string url = generateUrl(book);
     WWW www = new WWW(url);
     yield return www;
     string text=TextDownload.ParsePage(www.text);
     OnPage (text);
 }
Example #2
0
 private static string generateUrl(BookPosition book)
 {
     string volume = book.volume.ToString ();
     if (book.volume < 10)
         volume = "0" + volume;
     string fullUrl = url + "?" + book.room + "-w" + book.wall + "-s" + book.shelf + "-v" + volume + ":" + book.page;
     Debug.Log (fullUrl);
     return fullUrl;
 }
Example #3
0
    private IEnumerator GetPage2(BookPosition book)
    {
        string url = generateUrl(book);
        WWW    www = new WWW(url);

        yield return(www);

        string text = TextDownload.ParsePage(www.text);

        OnPage(text);
    }
Example #4
0
    private IEnumerator GetTitle2(BookPosition book)
    {
        book.page = 1;
        string url = TextDownload.generateUrl(book);
        WWW    www = new WWW(url);

        yield return(www);

        string text = TextDownload.ParseTitle(www.text);

        OnTitle(text);
    }
Example #5
0
    private static string generateUrl(BookPosition book)
    {
        string volume = book.volume.ToString();

        if (book.volume < 10)
        {
            volume = "0" + volume;
        }
        string fullUrl = url + "?" + book.room + "-w" + book.wall + "-s" + book.shelf + "-v" + volume + ":" + book.page;

        Debug.Log(fullUrl);
        return(fullUrl);
    }
Example #6
0
        private BookPosition[] ComputeBookPosition(Dictionary <string, InstrumentPosition> instruPosDico)
        {
            var bookPositionDico = new Dictionary <string, BookPosition>();

            foreach (InstrumentPosition instruPos in instruPosDico.Values)
            {
                BookPosition pos;
                if (!bookPositionDico.TryGetValue(instruPos.Book, out pos))
                {
                    var newPos = new BookPosition(instruPos);
                    bookPositionDico.Add(instruPos.Book, newPos);
                    continue;
                }
                Pnl.ComputeBookPosition(pos, instruPos);
            }

            return(bookPositionDico.Values.ToArray());
        }
Example #7
0
 protected void GetTitle(BookPosition book)
 {
     StartCoroutine(GetTitle2(book));
 }
Example #8
0
 private IEnumerator GetTitle2(BookPosition book)
 {
     book.page = 1;
     string url = TextDownload.generateUrl(book);
     WWW www = new WWW(url);
     yield return www;
     string text=TextDownload.ParseTitle(www.text);
     OnTitle (text);
 }
Example #9
0
 protected void GetTitle(BookPosition book)
 {
     StartCoroutine(GetTitle2 (book));
 }