コード例 #1
0
    void UpdateText()
    {
        /*if (Application.systemLanguage == SystemLanguage.German ) {
         *      if (m_CurSelection == 0) {
         *              m_TextInfo.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Fotos insgesamt:\nQuests insgesamt:\nOrte besucht:";
         *      } else if (m_CurSelection == 1) {
         *              m_TextInfo.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Fotos diese Woche:\nQuests diese Woche:\nOrte besucht:";
         *      } else if (m_CurSelection == 2) {
         *              m_TextInfo.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Fotos letzte Woche:\nQuests letzte Woche:\nOrte besucht:";
         *      }
         *
         *      m_Loading.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Wird geladen...";
         * } else {
         *      if (m_CurSelection == 0) {
         *              m_TextInfo.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Total photos:\nTotal quests:\nLocations visited:";
         *      } else if (m_CurSelection == 1) {
         *              m_TextInfo.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Photos this week:\nQuests this week:\nLocations visited:";
         *      } else if (m_CurSelection == 2) {
         *              m_TextInfo.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Photos last week:\nQuests last week:\nLocations visited:";
         *      }
         *      m_Loading.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Loading...";
         * }*/

        /*m_TextInfo.GetComponentInChildren<UnityEngine.UI.Text> ().text =  LocalizationSupport.GetString("LeaderboardTotalPhotos") +
         *      "\n" + LocalizationSupport.GetString("LeaderboardTotalQuests") + "\n" +  LocalizationSupport.GetString("LeaderboardTotalLocations");
         */m_TextInfo.GetComponentInChildren <UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("LeaderboardTotalQuests") + "\n" + LocalizationSupport.GetString("LeaderboardTotalLocations");

        m_Loading.GetComponentInChildren <UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("Loading");
    }
コード例 #2
0
 void updateButtonText()
 {
     if (m_CurState < 4)
     {
         if (Application.systemLanguage == SystemLanguage.German)
         {
             m_Button.GetComponentInChildren <UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("Next");
         }
         else
         {
             m_Button.GetComponentInChildren <UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("Next");
         }
     }
     else
     {
         if (Application.systemLanguage == SystemLanguage.German)
         {
             m_Button.GetComponentInChildren <UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("Ok");
         }
         else
         {
             m_Button.GetComponentInChildren <UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("Ok");
         }
     }
 }
コード例 #3
0
 public void updateStates()
 {
     m_TextTitle.GetComponentInChildren <UnityEngine.UI.Text>().text   = LocalizationSupport.GetString("ChooseValidation");
     m_ButtonBack.GetComponentInChildren <UnityEngine.UI.Text>().text  = LocalizationSupport.GetString("Back");    //"Back";
     m_ButtonNext.GetComponentInChildren <UnityEngine.UI.Text>().text  = LocalizationSupport.GetString("Next");    //"Back";
     m_LoadingText.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Loading"); //"Loading...";
 }
コード例 #4
0
    private void Start()
    {
        StartCoroutine(changeFramerate());
        ForceLandscapeLeft();

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        HideDownloading();

        control = (OnlineMapsTileSetControl)OnlineMapsControlBase.instance;
        api     = OnlineMaps.instance;

        map = OnlineMaps.instance;

        OnlineMapsControlBase3D control2 = GetComponent <OnlineMapsControlBase3D>();

        if (control2 == null)
        {
            Debug.Log("You must use the 3D control (Texture or Tileset).");
            return;
        }

        m_ButtonReset.SetActive(false);

        //OnlineMapsControlBase.instance.allowUserControl = false;//true;//false;
        //	OnlineMaps.instance.OnChangeZoom += OnChangeZoom;
        OnlineMapsTile.OnTileDownloaded         += OnTileDownloaded;
        OnlineMaps.instance.OnStartDownloadTile += OnStartDownloadTile;

        control2.OnMapPress   += OnMapPress;
        control2.OnMapRelease += OnMapRelease;
        control2.OnMapZoom    += OnMapZoom;

        //----------------
        // Set 2d mode
        Camera c = Camera.main;

        c.orthographic = true;
        //---------------

/*		control2.setUpdateControl (true);
 *              control2.setAlwaysUpdateControl (true);
 *              control2.allowUserControl = true;
 */
        m_ButtonBack.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Back");
        m_ButtonNext.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("BtnDownload");
        m_ExplanationText.GetComponent <UnityEngine.UI.Text>().text      = LocalizationSupport.GetString("ExplanationOfflineAccess");


        m_DownloadBtnStart.GetComponentInChildren <UnityEngine.UI.Text>().text     = LocalizationSupport.GetString("BtnDownloadNow");
        m_DownloadBtnCompleted.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Ok");
        m_ButtonNext.SetActive(false);
        //OnLocationChanged (new Vector2 (0.0f, 0.0f));

        toUserLocation();
    }
コード例 #5
0
    void startClassification()
    {
        m_ScrollView.SetActive(false);
        m_TextTitle.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("SelectClassification");

        m_ScrollViewClassification.SetActive(true);
        createClassificationList();
    }
コード例 #6
0
    public void updateStates(int questid)
    {
        float  money    = PlayerPrefs.GetFloat("CurQuestWeight") / 100.0f;
        string strtotal = money.ToString("F2") + "€";                                                                    //4F9F56FF//20A0DABF

        m_Title.GetComponentInChildren <UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("QuestSuccessful"); // "Quest successful!";
        //	m_Text.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Your support is very important to improve nature protection!\nThank you very much!";

        /*int nrquestsdone = 0;
         * if (PlayerPrefs.HasKey ("NrQuestsDone")) {
         *      nrquestsdone = PlayerPrefs.GetInt ("NrQuestsDone");
         * } else {
         *      nrquestsdone = 0;
         * }
         * if (nrquestsdone > 4) {
         *      nrquestsdone = 4;
         * }
         *
         * if (nrquestsdone < 4) {
         *      m_TextCompetition.GetComponentInChildren<UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("QuestCompetition" + nrquestsdone);//"You have successfully completed your quest. You can upload the results of your quest now or later.";
         *      m_Button.GetComponentInChildren<UnityEngine.UI.Text> ().text = LocalizationSupport.GetString ("BtnContinue");
         * } else {
         *      if (checkLoggedIn ()) {
         *              m_TextCompetition.GetComponentInChildren<UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("QuestCompetition" + nrquestsdone);//"You have successfully completed your quest. You can upload the results of your quest now or later.";
         *              m_Button.GetComponentInChildren<UnityEngine.UI.Text> ().text = LocalizationSupport.GetString ("Upload");
         *      } else {
         *              m_TextCompetition.GetComponentInChildren<UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("QuestCompetition" + nrquestsdone + "Register");//"You have successfully completed your quest. You can upload the results of your quest now or later.";
         *              m_Button.GetComponentInChildren<UnityEngine.UI.Text> ().text = LocalizationSupport.GetString ("BtnRegister");
         *      }
         * }*/

        int trainingpoint = PlayerPrefs.GetInt("Quest_" + questid + "_TrainingPoint");

        if (trainingpoint == 0)
        {
            m_TextCompetition.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("QuestCompleted");//"You have successfully completed your quest. You can upload the results of your quest now or later.";
        }
        else
        {
            m_TextCompetition.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("AddedNewPoint");//"You have successfully completed your quest. You can upload the results of your quest now or later.";
        }
        m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("BtnContinue");
        //m_ButtonShare.GetComponentInChildren<UnityEngine.UI.Text>().text = LocalizationSupport.GetString("BtnShare");

        /*
         * if(PlayerPrefs.HasKey("LastImageTaken") == false) {
         *  m_ButtonShare.SetActive(false);
         * }*/
        m_ButtonShare.SetActive(false);
        m_TextDidYouKnow.GetComponentInChildren <UnityEngine.UI.Text> ().text = "";
        //m_TextDidYouKnow.GetComponentInChildren<UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("QuestDidYouKnow" + nrquestsdone);//"You have successfully completed your quest. You can upload the results of your quest now or later.";
    }
コード例 #7
0
 public void updateStates()
 {
     if (Application.systemLanguage == SystemLanguage.German)
     {
         m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text        = LocalizationSupport.GetString("BtnBack");
         m_TextCopyright.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("About");           //"FRA Quest ist ein Projekt des Internationalen Instituts für Angewandte Systemanalyse (IIASA) in Laxenburg bei Wien.\n\n©2017 IIASA.";
     }
     else
     {
         m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text        = LocalizationSupport.GetString("BtnBack");
         m_TextCopyright.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("About");           //"FRA Quest is developed by the International Institute for Applied Systems Analysis (IIASA) based in Laxenburg, Austria.\n\n©2017 IIASA.";
     }
 }
コード例 #8
0
    public void StartDownloading()
    {
        m_DownloadText.GetComponent <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Calculating");
        m_DownloadBack.SetActive(true);
        m_DownloadText.SetActive(true);
        m_DownloadBtnStart.SetActive(false);
        m_DownloadBtnBack.SetActive(true);
        m_DownloadImageBack.SetActive(true);
        m_DownloadBtnCompleted.SetActive(false);

        m_bCalculatingSize    = true;
        m_CalculatingSizeIter = 0;
    }
コード例 #9
0
 public void updateStates()
 {
     if (Application.systemLanguage == SystemLanguage.German && false)
     {
         m_ButtonLogin.GetComponentInChildren <UnityEngine.UI.Text>().text    = "LOGIN";
         m_ButtonRegister.GetComponentInChildren <UnityEngine.UI.Text>().text = "REGISTRIEREN";
         m_ButtonBack.GetComponentInChildren <UnityEngine.UI.Text>().text     = "Zurück";
     }
     else
     {
         m_ButtonLogin.GetComponentInChildren <UnityEngine.UI.Text> ().text   = LocalizationSupport.GetString("BtnLogin");    //"LOGIN";
         m_ButtonRegister.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("BtnRegister"); //"REGISTER";
         m_ButtonBack.GetComponentInChildren <UnityEngine.UI.Text>().text     = LocalizationSupport.GetString("Back");        //"Back";
     }
 }
コード例 #10
0
    public void updateStates()
    {
        if (Application.systemLanguage == SystemLanguage.German)
        {
            m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("BtnBack");            //"ZURÜCK";

            m_Rank.GetComponentInChildren <UnityEngine.UI.Text>().text  = LocalizationSupport.GetString("LeaderboardRank");     //"Rang";
            m_LName.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("LeaderboardName");     //"Name";
            m_Score.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("LeaderboardNrQuests"); //"Quests gemacht";

            m_Dropdown.GetComponentInChildren <UnityEngine.UI.Text>().text = "Insgesamt";

            UnityEngine.UI.Dropdown.OptionData list  = new UnityEngine.UI.Dropdown.OptionData("Insgesamt");
            UnityEngine.UI.Dropdown.OptionData list2 = new UnityEngine.UI.Dropdown.OptionData("Diese Woche");
            UnityEngine.UI.Dropdown.OptionData list3 = new UnityEngine.UI.Dropdown.OptionData("Letzte Woche");

            UnityEngine.UI.Dropdown dropdown;
            dropdown = m_Dropdown.GetComponent <UnityEngine.UI.Dropdown>();
            dropdown.options.Clear();
            dropdown.options.Add(list);
            dropdown.options.Add(list2);
            dropdown.options.Add(list3);
        }
        else
        {
            //m_Score.GetComponentInChildren<UnityEngine.UI.Text>().text = "Quests done";

            m_Rank.GetComponentInChildren <UnityEngine.UI.Text>().text  = LocalizationSupport.GetString("LeaderboardRank");          //"Rang";
            m_LName.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("LeaderboardName");          //"Name";
            m_Score.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("LeaderboardNrQuests");      //"Quests gemacht";


            m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("BtnBack");           //"CLOSE";

            m_Dropdown.GetComponentInChildren <UnityEngine.UI.Text>().text = "Total";

            UnityEngine.UI.Dropdown.OptionData list  = new UnityEngine.UI.Dropdown.OptionData("Total");
            UnityEngine.UI.Dropdown.OptionData list2 = new UnityEngine.UI.Dropdown.OptionData("This week");
            UnityEngine.UI.Dropdown.OptionData list3 = new UnityEngine.UI.Dropdown.OptionData("Last week");

            UnityEngine.UI.Dropdown dropdown;
            dropdown = m_Dropdown.GetComponent <UnityEngine.UI.Dropdown>();
            dropdown.options.Clear();
            dropdown.options.Add(list);
            dropdown.options.Add(list2);
            dropdown.options.Add(list3);
        }
    }
コード例 #11
0
    public void updateStates()
    {
        if (Application.systemLanguage == SystemLanguage.German && false)
        {
            m_ButtonBack.GetComponentInChildren <UnityEngine.UI.Text>().text = "Schließen";

            m_TermsTitle.GetComponentInChildren <UnityEngine.UI.Text>().text = "Teilnahmebedingungen";
        }
        else
        {
            m_ButtonBack.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Close");           //"Close";

            m_TermsTitle.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("MenuTerms");       //"Terms and Conditions";
        }

        showTerms();
    }
コード例 #12
0
    // Use this for initialization
    void Start()
    {
        //Screen.sleepTimeout = SleepTimeout.NeverSleep ;
        DeviceInput.Init();

        // setup smoothing class
        Smoothed.SetSmoothingStrength(Smooth);

        // sensor fusion needs gyroscope
        m_UseSensorFusion = DeviceInput.HasGyro;

        m_ToggleFlash.isOn        = m_FlashingFocus;
        m_ToggleSnap.isOn         = m_SnapIfAccurate;
        m_ToggleSensorFusion.isOn = m_UseSensorFusion;
        if (!DeviceInput.HasGyro)
        {
            m_ToggleSensorFusion.interactable = false;
        }

        // find parent
        m_PhotoTask = transform.parent.gameObject.GetComponent <PhotoTask> ();
        // setup label objects
        for (int i = 0; i < 4; i++)
        {
            // TaskPanel
            Panels[i]         = transform.Find(PanelTitles[i]).gameObject.GetComponent <TaskPanel> ();
            Panels[i].Heading = 90.0f * i;
            Panels[i].Pitch   = TaskPitch;
            Panels[i].Name    = PanelNames [i];
        }
        // setup frame
        // Panel_Frame
        Transform TrFrame = transform.Find("Panel_Frame");

        KompassFrame = TrFrame.gameObject;

        TrFrame.SetParent(transform.parent, false);

        m_StringTakePhoto = LocalizationSupport.GetString("TakePhotoPoint");
        m_StringHoldStill = LocalizationSupport.GetString("TakePhotoHoldStill");
        m_StringLandscape = LocalizationSupport.GetString("TakePhotoLandscape");
        m_StringFocus     = LocalizationSupport.GetString("TakePhotoFocus");
    }
コード例 #13
0
    public void updateStates()
    {
        if (Application.systemLanguage == SystemLanguage.German)
        {
            m_TextTitle.GetComponentInChildren <UnityEngine.UI.Text>().text = "Login";

            m_ButtonLogin.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("LoginLogin");          //"EINLOGGEN";
            m_TextForgot.GetComponentInChildren <UnityEngine.UI.Text>().text  = LocalizationSupport.GetString("LoginForgotPassword"); //"Passwort vergessen?";
            m_TextEMail.GetComponent <UnityEngine.UI.Text> ().text            = LocalizationSupport.GetString("LoginMail");           //"E-Mail:";
            m_TextPassword.GetComponent <UnityEngine.UI.Text> ().text         = LocalizationSupport.GetString("LoginPassword");       //"Passwort:";

            m_ButtonBack.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Back");                 //"Zurück";

            m_LoadingText.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Loading");             //"Laden...";
        }
        else
        {
            m_TextTitle.GetComponentInChildren <UnityEngine.UI.Text>().text = "Login";

            m_ButtonLogin.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("LoginLogin");          //"LOGIN";
            m_TextForgot.GetComponentInChildren <UnityEngine.UI.Text>().text  = LocalizationSupport.GetString("LoginForgotPassword"); //"Forgot password?";
            m_TextEMail.GetComponent <UnityEngine.UI.Text> ().text            = LocalizationSupport.GetString("LoginMail");           //"E-Mail:";
            m_TextPassword.GetComponent <UnityEngine.UI.Text> ().text         = LocalizationSupport.GetString("LoginPassword");       //"Password:"******"Back");                //"Back";
            m_LoadingText.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Loading");             //"Loading...";
        }

        if (Application.systemLanguage == SystemLanguage.German)
        {
            m_TermsTitle.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("MenuTerms");           //"Teilnahmebedingungen";


            m_TermsBtnAccept.GetComponentInChildren <UnityEngine.UI.Text>().text  = LocalizationSupport.GetString("Accept");          //"Annehmen";
            m_TermsBtnDecline.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Decline");         //"Ablehnen";
        }
        else
        {
            m_TermsTitle.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("MenuTerms");           //"Terms and Conditions";

            m_TermsBtnAccept.GetComponentInChildren <UnityEngine.UI.Text>().text  = LocalizationSupport.GetString("Accept");         //"Accept";
            m_TermsBtnDecline.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Decline");        //"Decline";
        }
    }
コード例 #14
0
    // Use this for initialization
    void Start()
    {
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        SetPortrait(false);
        //UseCompass ( true ) ;
        // setup ui
        //m_ButtonFinish.interactable = false;
        m_ButtonBack.interactable = true; //false;
        m_ButtonNext.interactable = true; //false;
        m_DebugView.SetActive(false);
        //  PanelManual.SetActive(false);
        //   PanelSequential.SetActive(false);
        m_PhotoTask = m_CompassStrip;

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        m_ButtonBack.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("BtnBack");
        m_ButtonNext.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Next");
    }
コード例 #15
0
    // Use this for initialization
    void Start()
    {
        Debug.Log("Intro1");
        StartCoroutine(changeFramerate());
        ForceLandscapeLeft();

        /*
         * Screen.orientation = ScreenOrientation.Portrait;
         * Screen.autorotateToPortrait = true;
         * Screen.autorotateToPortraitUpsideDown = false;
         * Screen.autorotateToLandscapeRight = false;
         * Screen.autorotateToLandscapeLeft = false;*/

        Debug.Log("Intro2");

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }


        Debug.Log("Intro3");
        m_CurState = 0;
        updateStates();


        Debug.Log("Intro4");
        bool bApple = false;



        Debug.Log("Intro5");
        UnityEngine.UI.Text text;
        if (Application.systemLanguage == SystemLanguage.German || true)
        {
            text = m_Text.GetComponent <UnityEngine.UI.Text>();
            //  text.text = "Versuche Zielpunkte zu erreichen und hilf so beim Umweltschutz in Österreich!";
            text.text = LocalizationSupport.GetString("IntroText");//"Join the green side!\nHelp #FAOUN in the monitoring process of the world’s forests.";


            /*text = m_Page2Text.GetComponent<UnityEngine.UI.Text>();
             * text.text = "Jeden Tag werden in Österreich 150000 m² Land in Geschäfts-, Verkehrs-, Freizeit- und Wohnflächen umgewandelt. Dabei müssen fruchtbare Böden, Artenvielfalt und natürliche CO2-Speicher Asphalt und Beton weichen. Dies führt unter anderem dazu, dass das Risiko für Überschwemmungen steigt, landwirtschaftliche Flächen unproduktiv werden, Hitzewellen in Städten steigen und zur Erderwärmung beitragen.\n\n" +
             * "Mit deiner Hilfe kann FotoQuest Go die Folgen der Veränderung unserer Landschaft aufzeichnen und dabei helfen, Österreichs Natur für zukünftige Generationen zu erhalten.\n\n" +
             * "Wir haben 9000 Punkte auf ganz Österreich verteilt. Schaue auf die Karte, finde einen Punkt in deiner Nähe und folge dann den Anweisungen um eine Quest durchzufüren. Dabei musst du Bilder von der Landschaft machen und ein paar kurze Fragen beantworten.";
             */
            /*RectTransform rectTransform2 = m_Page2Text.GetComponent<RectTransform> ();
             * float scalex = rectTransform2.sizeDelta.x;
             * float heightentry = 1000.0f;
             * rectTransform2.sizeDelta = new Vector2 (scalex, heightentry);
             *
             *
             * float posx = rectTransform2.position.x;
             * float posy = rectTransform2.position.y;
             * float posz = rectTransform2.position.z;
             * rectTransform2.position = new Vector3 (posx, -287.0f, posz);*/


            //  text = m_Page2Title.GetComponent<UnityEngine.UI.Text>();
            //      text.text = "Warum?";


            text      = m_PageText3.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("IntroText3");
            text      = m_PageText4.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("IntroText4");
            text      = m_PageText5.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("IntroText5");
            text      = m_PageText6.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("IntroText6");

            m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Next");//"WEITER";
        }
        else
        {
            //text = m_Page2Text.GetComponent<UnityEngine.UI.Text>();
            //  text.text = "In order to track land changes and to better evaluate the effects these changes have, the scientists at IIASA would like to run a careful examination and need your help!";

            /*  text.text = "Every day around 100.000 m² land are soil sealed in Austria. In order to track these land changes and to better evaluate the effects these changes have more data is urgently needed.\n\n" +
             *      "Therefore the scientists at IIASA would like to run a careful examination and need your help to visit around 8000 points in Austria which are located on a regular 2 km grid!\n\n" +
             *      "All data collected (after having gone through an anonymization process by removing all personal information like username or e-mail) will be made completely free and thus can serve as a very valuable source for science!";
             */
            /*  text.text = "Every day around 150,000 m² of soil are being turned into roads, businesses, homes and recreational areas in Austria, which leads to soil degradation and an increasing risk of flooding, water scarcity, unproductive agricultural land and heat waves in cities, contributing to global warming.\n\n" +
             *      "With your help, FotoQuest Go can track the effect of these changes in our landscape and help to conserve Austria’s nature for future generations.\n\n" +
             *      "We have placed around 9,000 points at a range of locations across Austria. Using the map, find a point near you and then follow the instructions to complete each quest. A quest requires you to take photographs of the landscape and answer a few short questions.";
             *
             *  //, the scientists at IIASA would like to run a careful examination and need your help! In order to track land changes and to better evaluate the effects these changes have, the scientists at IIASA would like to run a careful examination and need your help!";
             *
             *
             *  text = m_Page2Title.GetComponent<UnityEngine.UI.Text>();
             *  text.text = "Why help?";
             *
             */
            //Any attempt to cheat or hack will result in a ban and no money will be transferred.

            m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Next");//"NEXT";
        }

        Debug.Log("Intro6");
コード例 #16
0
    public void createValidationsList()
    {
        int nrentries       = m_ValidationSessionNames.Count;
        int nrentriesactive = m_ValidationSessionNames.Count;

        m_Buttons      = new ArrayList();
        m_ButtonsStart = new ArrayList();
        m_ButtonsStop  = new ArrayList();
        m_ButtonsIds   = new ArrayList();


        RectTransform rectTransform2 = m_Content.GetComponent <RectTransform>();
        float         scalex         = rectTransform2.sizeDelta.x;
        float         scaley         = rectTransform2.sizeDelta.y;
        float         heightentry    = 260.0f;//280.0f;//350.0f;

        rectTransform2.sizeDelta = new Vector2(scalex, heightentry * nrentriesactive + 100.0f);


        float posoffset      = 0;
        int   nrentriesadded = 0;
        int   curreport      = 1;

        for (int i = nrentries - 1; i >= 0; i--)
        {
            Debug.Log("Create validation entry: " + i);

            GameObject    copy;
            RectTransform rectTransform;
            float         curpos;
            float         curposx;
            int           currank;
            string        text;

            nrentriesadded++;

            copy = (GameObject)GameObject.Instantiate(m_NameS);
            copy.transform.SetParent(m_Content.transform, false);
            copy.SetActive(true);
            rectTransform = copy.GetComponent <RectTransform>();
            curpos        = rectTransform.localPosition.y;
            curposx       = rectTransform.localPosition.x;
            curpos       -= posoffset;//i * heightentry;
            rectTransform.localPosition = new Vector2(curposx, curpos);
            copy.GetComponentInChildren <UnityEngine.UI.Text>().text = (string)m_ValidationSessionNames[i];


            copy = (GameObject)GameObject.Instantiate(m_UploadQuest);
            copy.transform.SetParent(m_Content.transform, false);
            copy.SetActive(true);
            rectTransform = copy.GetComponent <RectTransform>();
            curpos        = rectTransform.localPosition.y;
            curposx       = rectTransform.localPosition.x;
            curpos       -= posoffset;//i * heightentry;
            rectTransform.localPosition = new Vector2(curposx, curpos);

            m_Buttons.Add(copy);
            m_ButtonsIds.Add(i + "");
            copy.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Select");//"UPLOAD";

            UnityEngine.UI.Button b = copy.GetComponent <UnityEngine.UI.Button>();
            AddListener(b, i + "");



            posoffset += heightentry;
        }

        Debug.Log("Validation list created");
    }
    // Use this for initialization
    void Start()
    {
        Debug.Log("Intro1");
        StartCoroutine(changeFramerate());
        ForceLandscapeLeft();

        /*
         * Screen.orientation = ScreenOrientation.Portrait;
         * Screen.autorotateToPortrait = true;
         * Screen.autorotateToPortraitUpsideDown = false;
         * Screen.autorotateToLandscapeRight = false;
         * Screen.autorotateToLandscapeLeft = false;*/

        Debug.Log("Intro2");

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }


        Debug.Log("Intro3");
        m_CurState = 0;
        updateStates();


        Debug.Log("Intro4");
        bool bApple = false;

        if (!bApple)
        {
            m_AppleDisclaimer.SetActive(false);
            m_ImageDisclaimer.SetActive(false);
            m_ImageNoDisclaimer.SetActive(true);
        }
        else
        {
            m_AppleDisclaimer.SetActive(true);
            m_ImageDisclaimer.SetActive(true);
            m_ImageNoDisclaimer.SetActive(false);
        }


        Debug.Log("Intro5");
        UnityEngine.UI.Text text;
        if (Application.systemLanguage == SystemLanguage.German || true)
        {
            text = m_Page1Text.GetComponent <UnityEngine.UI.Text>();
            //	text.text = "Versuche Zielpunkte zu erreichen und hilf so beim Umweltschutz in Österreich!";
            text.text = LocalizationSupport.GetString("IntroText");//"Join the green side!\nHelp #FAOUN in the monitoring process of the world’s forests.";

            text = m_Text.GetComponent <UnityEngine.UI.Text>();
            //	text.text = "Versuche Zielpunkte zu erreichen und hilf so beim Umweltschutz in Österreich!";
            text.text = LocalizationSupport.GetString("IntroText");//"Join the green side!\nHelp #FAOUN in the monitoring process of the world’s forests.";


            text      = m_PrizeText.GetComponent <UnityEngine.UI.Text>();
            text.text = "Du erhälst für jeden besuchten Punkt 1 Euro!";

            /*text = m_Page2Text.GetComponent<UnityEngine.UI.Text>();
             *          text.text = "Jeden Tag werden in Österreich 150000 m² Land in Geschäfts-, Verkehrs-, Freizeit- und Wohnflächen umgewandelt. Dabei müssen fruchtbare Böden, Artenvielfalt und natürliche CO2-Speicher Asphalt und Beton weichen. Dies führt unter anderem dazu, dass das Risiko für Überschwemmungen steigt, landwirtschaftliche Flächen unproduktiv werden, Hitzewellen in Städten steigen und zur Erderwärmung beitragen.\n\n" +
             *          "Mit deiner Hilfe kann FotoQuest Go die Folgen der Veränderung unserer Landschaft aufzeichnen und dabei helfen, Österreichs Natur für zukünftige Generationen zu erhalten.\n\n" +
             *          "Wir haben 9000 Punkte auf ganz Österreich verteilt. Schaue auf die Karte, finde einen Punkt in deiner Nähe und folge dann den Anweisungen um eine Quest durchzufüren. Dabei musst du Bilder von der Landschaft machen und ein paar kurze Fragen beantworten.";
             */
            /*RectTransform rectTransform2 = m_Page2Text.GetComponent<RectTransform> ();
             *          float scalex = rectTransform2.sizeDelta.x;
             *          float heightentry = 1000.0f;
             *          rectTransform2.sizeDelta = new Vector2 (scalex, heightentry);
             *
             *
             *          float posx = rectTransform2.position.x;
             *          float posy = rectTransform2.position.y;
             *          float posz = rectTransform2.position.z;
             *          rectTransform2.position = new Vector3 (posx, -287.0f, posz);*/


            //	text = m_Page2Title.GetComponent<UnityEngine.UI.Text>();
            //		text.text = "Warum?";

            text      = m_Page3Title.GetComponent <UnityEngine.UI.Text>();
            text.text = "Warum?";

            text = m_Page3Text.GetComponent <UnityEngine.UI.Text>();
            //text.text = "Alle gesammelten Daten werden für alle frei verfügbar sein und einen wichtigen Beitrag zum Naturschutz leisten!";
            //	text.text = "Für jeden besuchten Punkt verdienst du 1€!\n\nDas Geld wird nach dem Ende der Kampagne (28. Dezember 2017) auf dein PayPal Konto überwiesen.";
            //	text.text = "Once you complete your quest, scientists at IIASA will check the quality of your results within 24 hours. If your contribution passes the quality check you will earn 1 EUR.\n\nAt the end of the campaign (December 2017), your total earnings will be transferred to your PayPal account.";
            text.text = LocalizationSupport.GetString("IntroText2");//"FRA Quest is a crowdsourcing tool developed to gather landscape information. The app will guide you to a series of selected locations, collect cardinal pictures and get information about the land cover characteristics. The data collected will be stored in your phone and will be uploaded to a public database once you are connected again.";

            text      = m_AppleDisclaimer.GetComponent <UnityEngine.UI.Text>();
            text.text = "(Hinweis: Apple ist nicht Sponsor von FotoQuest Go)";

            text      = m_PageText3.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("IntroText3");
            text      = m_PageText4.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("IntroText4");
            text      = m_PageText5.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("IntroText5");

            m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Next");//"WEITER";
        }
        else
        {
            text = m_Page1Text.GetComponent <UnityEngine.UI.Text>();
            //			text.text = "Try to reach locations to help landscape conservation in Austria!";
            text.text = LocalizationSupport.GetString("IntroText");//"Join the green side!\nHelp #FAOUN in the monitoring process of the world’s forests.";


            text = m_PrizeText.GetComponent <UnityEngine.UI.Text>();
            //text.text = "And earn for every visited location 1€!";
            text.text = "You can earn 1 EUR for each point you visit!";

            //text = m_Page2Text.GetComponent<UnityEngine.UI.Text>();
            //	text.text = "In order to track land changes and to better evaluate the effects these changes have, the scientists at IIASA would like to run a careful examination and need your help!";

            /*	text.text = "Every day around 100.000 m² land are soil sealed in Austria. In order to track these land changes and to better evaluate the effects these changes have more data is urgently needed.\n\n" +
             *      "Therefore the scientists at IIASA would like to run a careful examination and need your help to visit around 8000 points in Austria which are located on a regular 2 km grid!\n\n" +
             *      "All data collected (after having gone through an anonymization process by removing all personal information like username or e-mail) will be made completely free and thus can serve as a very valuable source for science!";
             */
            /*	text.text = "Every day around 150,000 m² of soil are being turned into roads, businesses, homes and recreational areas in Austria, which leads to soil degradation and an increasing risk of flooding, water scarcity, unproductive agricultural land and heat waves in cities, contributing to global warming.\n\n" +
             *      "With your help, FotoQuest Go can track the effect of these changes in our landscape and help to conserve Austria’s nature for future generations.\n\n" +
             *      "We have placed around 9,000 points at a range of locations across Austria. Using the map, find a point near you and then follow the instructions to complete each quest. A quest requires you to take photographs of the landscape and answer a few short questions.";
             *
             *  //, the scientists at IIASA would like to run a careful examination and need your help! In order to track land changes and to better evaluate the effects these changes have, the scientists at IIASA would like to run a careful examination and need your help!";
             *
             *
             *  text = m_Page2Title.GetComponent<UnityEngine.UI.Text>();
             *  text.text = "Why help?";
             *
             */
            text      = m_Page3Title.GetComponent <UnityEngine.UI.Text>();
            text.text = "Why help?";


            text = m_Page3Text.GetComponent <UnityEngine.UI.Text>();
            //text.text = "All data collected will be made completely free and will be very valuable to improve nature protection!";
            //text.text = "You will earn 1€ for every visited location!\n\nThe money will be transferred to your PayPal account after the campaign has finished (December 2017) and has successfully gone through a quality control.\n\nAny attempt to cheat or hack will result in a ban and no money will be transferred.";
            //text.text = "You will earn 1€ for every visited location!\n\nThe money will be transferred to your PayPal account after the campaign has finished (December 2017).";
            //text.text = "Once you complete your quest, scientists at IIASA will check the quality of your results within 24 hours. If your contribution passes the quality check, the point you visited will be removed from the map, and you will earn 1 EUR. At the end of the campaign (December 2017), your total earnings will be transferred to your PayPal account. PLEASE MAKE SURE TO PROVIDE THE CORRECT PAYPAL ADDRESS.";
            //text.text = "Once you complete your quest, scientists at IIASA will check the quality of your results within 24 hours. If your contribution passes the quality check you will earn 1 EUR.\n\nAt the end of the campaign (December 2017), your total earnings will be transferred to your PayPal account.";
            text.text = LocalizationSupport.GetString("IntroText2"); //"FRA Quest is a crowdsourcing tool developed to gather landscape information. The app will guide you to a series of selected locations, collect cardinal pictures and get information about the land cover characteristics. The data collected will be stored in your phone and will be uploaded to a public database once you are connected again.";
                                                                     //

            //Any attempt to cheat or hack will result in a ban and no money will be transferred.

            m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Next");//"NEXT";
        }

        Debug.Log("Intro6");
コード例 #18
0
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            Application.LoadLevel("DemoMap");
        }

        if (Input.GetMouseButtonDown(0))
        {
            Debug.Log("#### CLICK #####");
            m_MousePosition = Input.mousePosition;
            m_MouseDistance = 0.0f;
        }
        if (Input.GetMouseButton(0))
        {
            float _x = Input.mousePosition.x - m_MousePosition.x;
            float _y = Input.mousePosition.y - m_MousePosition.y;
            m_MouseDistance += Mathf.Sqrt(_x * _x + _y * _y);
            m_MousePosition  = Input.mousePosition;
        }
        if (Input.GetMouseButtonUp(0))
        {
            Debug.Log("#### CLICK #####");
            Vector3 pos = Input.mousePosition;

            PointerEventData pointerData = new PointerEventData(EventSystem.current)
            {
                pointerId = -1,
            };

            pointerData.position = Input.mousePosition;
            List <RaycastResult> results = new List <RaycastResult>();
            EventSystem.current.RaycastAll(pointerData, results);

            if (m_MouseDistance < 30.0f)
            {
                bool bHitPin = false;
                if (results.Count > 0)
                {
                    Debug.Log("Nr results pick gui: " + results.Count);
                    Debug.Log("pick gui element name: " + results [0].gameObject.name);
                }
                else
                {
                    Debug.Log("Mouse down -> check hit");
                    RaycastHit hit;
                    Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
                    if (Physics.Raycast(ray, out hit))
                    {
                        Debug.Log("Mouse Down Hit the following object: " + hit.collider.name);
                        if (hit.collider.name == "Map")
                        {
                            Debug.Log("> Clicked on map");
                        }
                        else
                        {
                            Debug.Log("> Clicked on marker");
                            OnPinClick(hit.collider.gameObject);
                            bHitPin = true;
                        }
                    }
                }

                if (pos.x < Screen.width * 0.2f && pos.y < Screen.width * 0.2f)
                {
                    Debug.Log("touched corner");
                }
                else
                {
                    if (!bHitPin)
                    {
                        touchedPos(pos);
                    }
                }
            }
        }

        if (m_bCalculatingSize)
        {
            m_CalculatingSizeIter++;
            if (m_CalculatingSizeIter > 4)
            {
                m_bCalculatingSize = false;
                StartCoroutine(DownloadTilesTest());
            }
        }

        if (m_bDownloadingImages)
        {
            if (m_bDownloadingImage == false && m_bDownloadedImage == false)
            {
                if (m_DownloadingImageIter < m_DownloadTilesZoom.Count)
                {
                    m_bDownloadingImage = true;
                    StartCoroutine(DownloadTilesTest(m_DownloadingImageIter));
                }
                else
                {
                    m_bDownloadingImages = false;
                }
            }
            else if (m_bDownloadedImage)
            {
                m_DownloadingImageIter++;
                int imageiter = m_DownloadingImageIter + 1;
                if (m_DownloadingImageIter < m_DownloadTilesZoom.Count)
                {
                    m_DownloadText.GetComponent <UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("Downloading1") + imageiter + " / " + m_DownloadTilesZoom.Count +
                                                                                " " +
                                                                                LocalizationSupport.GetString("Downloading2");

                    m_bDownloadingImage = true;
                    m_bDownloadedImage  = false;
                    StartCoroutine(DownloadTilesTest(m_DownloadingImageIter));
                }
                else
                {
                    m_DownloadText.GetComponent <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("DownloadFinished");
                    m_DownloadBtnCompleted.SetActive(true);
                }
            }
        }


        UpdateLine();

        if (!changed)
        {
            return;
        }
        changed = false;

        // If the number of points is less than 3, then return.

        /*
         * if (markers.Count < 3)
         * {
         *      map.Redraw();
         *      return;
         * }
         *
         * // If the polygon is not created, then create.
         * if (polygon == null)
         * {
         *      int borderWidth = 5;
         *      // For points, reference to markerPositions.
         *      // If you change the values ​​in markerPositions, value in the polygon will be adjusted automatically.
         *      polygon = new OnlineMapsDrawingPoly(markerPositions, Color.black, borderWidth, new Color(1, 1, 1, 0.3f));
         *
         *      // Add an element to the map.
         *      map.AddDrawingElement(polygon);
         * }
         * map.Redraw();
         * Debug.Log ("Polygin created");*/
    }
コード例 #19
0
    // Use this for initialization
    void Start()
    {
        StartCoroutine(changeFramerate());

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        Screen.orientation                    = ScreenOrientation.Portrait;
        Screen.autorotateToPortrait           = true;
        Screen.autorotateToPortraitUpsideDown = false;
        Screen.autorotateToLandscapeRight     = false;
        Screen.autorotateToLandscapeLeft      = false;


        m_CurState = 0;
        updateStates();

        UnityEngine.UI.Text text;
        if (Application.systemLanguage == SystemLanguage.German)
        {
            text      = m_Page1Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions1");

            text      = m_Page2Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions2");

            text      = m_Page3Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions3");

            text      = m_Page4Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions4");

            text      = m_Page5Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions5");



            m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Next");
        }
        else
        {
            text      = m_Page1Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions1");

            text      = m_Page2Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions2");

            text      = m_Page3Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions3");

            text      = m_Page4Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions4");

            text      = m_Page5Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions5");


            m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Next");
        }

        //PlayerPrefs.SetInt ("InstructionShown", 1);
        //PlayerPrefs.Save ();

#if UNITY_ANDROID
#if ASDFASDFASDF
        NativeEssentials.Instance.Initialize();
        PermissionsHelper.StatusResponse sr;
        PermissionsHelper.StatusResponse sr2;
        PermissionsHelper.StatusResponse sr3;        // = PermissionsHelper.StatusResponse.;//NativeEssentials.Instance.GetAndroidPermissionStatus(PermissionsHelper.Permissions.CAMERA);
        sr  = NativeEssentials.Instance.GetAndroidPermissionStatus(PermissionsHelper.Permissions.ACCESS_FINE_LOCATION);
        sr2 = NativeEssentials.Instance.GetAndroidPermissionStatus(PermissionsHelper.Permissions.ACCESS_COARSE_LOCATION);
        sr3 = NativeEssentials.Instance.GetAndroidPermissionStatus(PermissionsHelper.Permissions.CAMERA);
        if (sr == PermissionsHelper.StatusResponse.PERMISSION_RESPONSE_GRANTED && sr2 == PermissionsHelper.StatusResponse.PERMISSION_RESPONSE_GRANTED)
        {
        }
        else
        {
            if (sr == PermissionsHelper.StatusResponse.PERMISSION_RESPONSE_GRANTED && sr2 == PermissionsHelper.StatusResponse.PERMISSION_RESPONSE_GRANTED)
            {
            }
            else
            {
                NativeEssentials.Instance.RequestAndroidPermissions(new string[] { PermissionsHelper.Permissions.ACCESS_FINE_LOCATION, PermissionsHelper.Permissions.ACCESS_COARSE_LOCATION, PermissionsHelper.Permissions.CAMERA });
            }
        }
#endif
#endif
    }
コード例 #20
0
    public void acceptedTerms()
    {
        UnityEngine.UI.InputField inputfield = m_InputFieldLogin.GetComponent <UnityEngine.UI.InputField> ();
        string user = inputfield.text;

        Debug.Log("user2: " + user);


        UnityEngine.UI.InputField textinput;
        textinput = m_InputPassword.GetComponent <UnityEngine.UI.InputField>();
        string password = textinput.text;

        string value = user + "," + password;

        string[] options = { "OK" };
        //messageBox.Show ("", value, options);

        if (user.Length <= 0)
        {
            if (Application.systemLanguage == SystemLanguage.German)
            {
                messageBox.Show("", LocalizationSupport.GetString("LoginNoMail"), options);
            }
            else
            {
                messageBox.Show("", LocalizationSupport.GetString("LoginNoMail"), options);
            }
            return;
        }

        if (password.Length <= 0)
        {
            if (Application.systemLanguage == SystemLanguage.German)
            {
                messageBox.Show("", LocalizationSupport.GetString("LoginNoPassword"), options);
            }
            else
            {
                messageBox.Show("", LocalizationSupport.GetString("LoginNoPassword"), options);
            }
            return;
        }


        m_LoadingText.SetActive(true);
        m_LoadingBack.SetActive(true);
        hideTerms();

        string passwordmd5 = ComputeHash(password);

        string url   = "https://geo-wiki.org/Application/api/User/checkCredentials";
        string param = "";

        param += "{\"username\":\"" + user + "\",\"passwordMD5\":\"" + passwordmd5 + "\"";
        param += "}";



        Debug.Log("login param: " + param);


        WWWForm form = new WWWForm();

        form.AddField("parameter", param);

        //Debug.Log ("Url data: " + System.Text.Encoding.UTF8.GetString(form.data));
        WWW www = new WWW(url, form);

        StartCoroutine(WaitForData(www));
    }
コード例 #21
0
    IEnumerator DownloadTilesTest()
    {
        //	float longitude = 100.752858f;//-49.876562f;// OnlineMaps.instance.position.x;
//		float latitude = 0.639726f;//-13.169026f;//OnlineMaps.instance.position.y;

        float lat1 = m_Pin1Position.y;
        float lat2 = m_Pin2Position.y;
        float lng1 = m_Pin1Position.x;
        float lng2 = m_Pin2Position.x;

        if (lat1 > lat2)
        {
            float temp = lat2;
            lat2 = lat1;
            lat1 = temp;
        }
        if (lng1 > lng2)
        {
            float temp = lng2;
            lng2 = lng1;
            lng1 = temp;
        }

        Debug.Log("lat1: " + lat1 + " lat2: " + lat2 + " lng1: " + lng1 + " lng2: " + lng2);
        //float border = 0.03f;


        OnlineMaps api = OnlineMaps.instance;
        double     px, py;
        double     px2, py2;


        m_DownloadTilesZoom = new ArrayList();
        m_DownloadTilesX    = new ArrayList();
        m_DownloadTilesY    = new ArrayList();


        for (int zoom = 4; zoom < 18; zoom++)
        {
            //int _zoom = api.zoom;

            /*api.projection.CoordinatesToTile (longitude - border, latitude + border, zoom, out px, out py);
             * Debug.Log ("tile download test zoom bl: " + zoom + " x: " + px + " y: " + py);
             *
             *
             * api.projection.CoordinatesToTile (longitude + border, latitude - border, zoom, out px2, out py2);
             * Debug.Log ("tile download test zoom tr: " + zoom + " x: " + px2 + " y: " + py2);
             */

            api.projection.CoordinatesToTile(lng1, lat1, zoom, out px, out py);
            Debug.Log("tile download test zoom bl: " + zoom + " x: " + px + " y: " + py);


            api.projection.CoordinatesToTile(lng2, lat2, zoom, out px2, out py2);
            Debug.Log("tile download test zoom tr: " + zoom + " x: " + px2 + " y: " + py2);

            int blx  = (int)px;
            int trx  = (int)px2;
            int bly  = (int)py;
            int tr_y = (int)py2;
            if (blx > trx)
            {
                int temp = blx;
                blx = trx;
                trx = temp;
            }
            if (bly > tr_y)
            {
                int temp = bly;
                bly  = tr_y;
                tr_y = temp;
            }

            //m_bDownloadingImage = false;
            for (int x = blx; x <= trx; x++)
            {
                for (int y = bly; y <= tr_y; y++)
                {
                    m_DownloadTilesZoom.Add(zoom + "");
                    m_DownloadTilesX.Add(x + "");
                    m_DownloadTilesY.Add(y + "");
                }
            }
        }

        m_DownloadText.SetActive(true);


        m_ToggleDownloadMap.SetActive(false);
        m_ToggleDownloadSamples.SetActive(false);
        m_ToggleDownloadSamplesText.GetComponent <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("DownloadPoints");

        int kb = m_DownloadTilesZoom.Count * 10;

        if (kb < 1000)
        {
            m_DownloadText.GetComponent <UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("Download1") + " " +
                                                                        kb + " KB " +
                                                                        LocalizationSupport.GetString("Download2");
            m_ToggleDownloadMapText.GetComponent <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("DownloadMapData") + " (" + kb + " KB).";
        }
        else
        {
            float mb = kb / 1000.0f;
            m_DownloadText.GetComponent <UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("Download1") + " " +
                                                                        mb + " MB " +
                                                                        LocalizationSupport.GetString("Download2");


            m_ToggleDownloadMapText.GetComponent <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("DownloadMapData") + " (" + mb + " MB).";
        }
        // m_DownloadText.GetComponent<UnityEngine.UI.Text>().text = "";

        m_DownloadBtnStart.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("BtnDownloadNow");
        m_DownloadBtnStart.SetActive(true);
        yield return(null);
    }
コード例 #22
0
    public void LoginClicked()
    {
        /*	string[] options = { "OK" };
         * //	messageBox.Show("Title","Message",null,null,options);
         *      messageBox.Show("Title","Message",options);
         */

        //messageBox.Show(

        Debug.Log("LoginClicked");

        //string user = m_InputLogin.GetComponent<UnityEngine.UI.Text> ().text;
        //	string password = m_InputPassword.GetComponent<UnityEngine.UI.InputField> ().text;
        UnityEngine.UI.InputField inputfield = m_InputFieldLogin.GetComponent <UnityEngine.UI.InputField> ();
        string user = inputfield.text;

        Debug.Log("user2: " + user);


        UnityEngine.UI.InputField textinput;
        textinput = m_InputPassword.GetComponent <UnityEngine.UI.InputField>();
        string password = textinput.text;

        string value = user + "," + password;

        string[] options = { "OK" };
        //messageBox.Show ("", value, options);

        if (user.Length <= 0)
        {
            if (Application.systemLanguage == SystemLanguage.German)
            {
                messageBox.Show("", LocalizationSupport.GetString("LoginNoMail"), options);
            }
            else
            {
                messageBox.Show("", LocalizationSupport.GetString("LoginNoMail"), options);
            }
            return;
        }

        if (password.Length <= 0)
        {
            if (Application.systemLanguage == SystemLanguage.German)
            {
                messageBox.Show("", LocalizationSupport.GetString("LoginNoPassword"), options);
            }
            else
            {
                messageBox.Show("", LocalizationSupport.GetString("LoginNoPassword"), options);
            }
            return;
        }

//		showTerms();
        acceptedTerms();


        /*
         *      if (Application.systemLanguage == SystemLanguage.German) {
         *              string[] options = { "OK" };
         *              messageBox.Show ("", "erwende deinen Geo-Wiki (www.geo-wiki.org) Account um dich einzuloggen.", options);
         *      } else {
         *              string[] options = { "OK" };
         *              messageBox.Show ("", "Use your excisting Geo-Wiki Account (www.geo-wiki.org) to login.", options);
         *      }*/
    }
コード例 #23
0
    IEnumerator WaitForData(WWW www)
    {
        yield return(www);

        string[] options = { "OK" };


        // check for errors
        if (www.error == null)
        {
            string data = www.text;
            //string[] parts = data.Split (":", 2);

            string[] parts  = data.Split(new string[] { ":" }, 0);
            string[] parts2 = parts[1].Split(new string[] { "," }, 0);
            string   part3  = parts2 [0];

            Debug.Log("WWW Ok!: " + www.text);
            Debug.Log("part1: " + parts[0]);
            Debug.Log("part2: " + parts[1]);
            Debug.Log("part3: " + part3);

            part3 = part3.Replace("\"", "");
            part3 = part3.Replace("}", "");

            Debug.Log("parts2 len: " + parts2.Length);
            if (parts.Length > 2)
            {
                string part4 = parts [2];
                Debug.Log("Part4: " + part4);


                part4 = part4.Replace("\"", "");
                part4 = part4.Replace("}", "");


                Debug.Log("Part4: " + part4);

                PlayerPrefs.SetString("PlayerName", part4);
            }

            if (part3.Equals("null"))
            {
                m_LoadingText.SetActive(false);
                m_LoadingBack.SetActive(false);

                if (Application.systemLanguage == SystemLanguage.German)
                {
                    messageBox.Show("", LocalizationSupport.GetString("LoginFailed"), options);
                }
                else
                {
                    messageBox.Show("", LocalizationSupport.GetString("LoginFailed"), options);
                }
                yield return(www);
            }
            else
            {
                /*if (Application.systemLanguage == SystemLanguage.German) {
                 *      messageBox.Show ("", "Einloggen erfolgreich.", options);
                 * } else {
                 *      messageBox.Show ("", "Login successful.", options);
                 * }*/

                PlayerPrefs.SetString("PlayerId", part3);


                UnityEngine.UI.InputField textinput;
                textinput = m_InputPassword.GetComponent <UnityEngine.UI.InputField>();
                string password = textinput.text;

                PlayerPrefs.SetString("PlayerPassword", password);

                UnityEngine.UI.InputField inputfield = m_InputFieldLogin.GetComponent <UnityEngine.UI.InputField> ();
                string mail = inputfield.text;
                //string mail = m_InputLogin.GetComponent<UnityEngine.UI.Text> ().text;
                PlayerPrefs.SetString("PlayerMail", mail);


                PlayerPrefs.SetInt("LoggedOut", 0);

                PlayerPrefs.Save();

                Debug.Log("Saved Mail: " + mail + " password: "******"LoginReturnToQuests"))
                {
                    int returntoquests = PlayerPrefs.GetInt("LoginReturnToQuests");
                    if (returntoquests == 1)
                    {
                        Application.LoadLevel("Quests");
                        bDontGoToQuestsPage = true;
                        yield return(www);
                    }
                }

                if (bDontGoToQuestsPage == false)
                {
                    Application.LoadLevel("DemoMap");
                }
            }
        }
        else
        {
            Debug.Log("WWW Error: " + www.error);
            Debug.Log("WWW Error 2: " + www.text);


            m_LoadingText.SetActive(false);
            m_LoadingBack.SetActive(false);

            if (Application.systemLanguage == SystemLanguage.German)
            {
                messageBox.Show("", LocalizationSupport.GetString("LoginFailedNoInternet"), options);
            }
            else
            {
                messageBox.Show("", LocalizationSupport.GetString("LoginFailedNoInternet"), options);
            }
        }
    }
コード例 #24
0
 //****** Here is how you get strings at runtime. ******
 private void Start()
 {
     //Make sure to always load strings before you use them! By default, they are loaded in Awake() method of LocalizationSupport prefab.
     //You can load them manually by calling: LocalizationSupport.LoadStrings();
     text.text = LocalizationSupport.GetString("Procedural");
 }
コード例 #25
0
    //--------------------------
    // Validation sessions

    public void loadValidationSessions()
    {
        int nrquestsdone = 0;

        if (PlayerPrefs.HasKey("NrQuestsDone"))
        {
            nrquestsdone = PlayerPrefs.GetInt("NrQuestsDone");
        }
        else
        {
            nrquestsdone = 0;
        }

        int addnewpoint = PlayerPrefs.GetInt("Quest_" + nrquestsdone + "_TrainingPoint");

        if (addnewpoint == 1)
        {
            m_ValidationSessionIds   = new ArrayList();
            m_ValidationSessionNames = new ArrayList();

            int      nrvalidations   = 0;
            string   curvalidationid = "";
            string   sessions        = PlayerPrefs.GetString("ActiveSessions");
            string[] splitArray      = sessions.Split(char.Parse(" "));
            for (int i = 0; i < splitArray.Length; i++)
            {
                if (splitArray[i] != "" && splitArray[i] != " ")
                {
                    string valid = splitArray[i];

                    int enabled = PlayerPrefs.GetInt("SessionSettingsOpportunisticValidationsEnabled_" + valid);
                    if (enabled == 1)
                    {
                        string name = PlayerPrefs.GetString("SessionName_" + valid);

                        m_ValidationSessionIds.Add(valid);
                        m_ValidationSessionNames.Add(name);

                        curvalidationid = valid;
                        nrvalidations++;
                    }
                }
            }

            if (nrvalidations > 1)
            {
                m_TextTitle.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("SelectValidation");
                createValidationsList();
            }
            else
            {
                m_ValidationId = curvalidationid;
                startClassification();
            }
            //  m_LoadingText.SetActive(false);
        }
        else
        {
            m_ValidationId = PlayerPrefs.GetString("CurQuestValidationId");
            Debug.Log("Start Classification with validationid: " + m_ValidationId);
            startClassification();
        }

        /*
         *
         * string url = "http://dev.laco-wiki.net/api/mobile/validationsessions";
         *
         * string token = PlayerPrefs.GetString("Token");
         * Debug.Log("token: " + token);
         *
         * WWWForm form = new WWWForm();
         * form.AddField("param", "param");
         *
         *
         * Dictionary<string, string> headers = new Dictionary<string, string>();
         * headers.Add("Authorization", "Bearer " + token);
         *
         * WWW www = new WWW(url, form.data, headers);
         *
         * StartCoroutine(WaitForValidationSessions(www));*/
    }
コード例 #26
0
    public void createValidationsList()
    {
        int nrentries       = m_ValidationSessionNames.Count;
        int nrentriesactive = m_ValidationSessionNames.Count;

        m_Buttons      = new ArrayList();
        m_ButtonsStart = new ArrayList();
        m_ButtonsStop  = new ArrayList();
        m_ButtonsIds   = new ArrayList();


        RectTransform rectTransform2 = m_Content.GetComponent <RectTransform>();
        float         scalex         = rectTransform2.sizeDelta.x;
        float         scaley         = rectTransform2.sizeDelta.y;
        float         heightentry    = 260.0f;//280.0f;//350.0f;

        rectTransform2.sizeDelta = new Vector2(scalex, heightentry * nrentriesactive + 100.0f);


        string sessions = PlayerPrefs.GetString("ActiveSessions");

        string[] splitArray = sessions.Split(char.Parse(" "));


        float posoffset      = 0;
        int   nrentriesadded = 0;
        int   curreport      = 1;

        for (int i = nrentries - 1; i >= 0; i--)
        {
            Debug.Log("Create validation entry: " + i);

            GameObject    copy;
            RectTransform rectTransform;
            float         curpos;
            float         curposx;
            int           currank;
            string        text;

            nrentriesadded++;

            copy = (GameObject)GameObject.Instantiate(m_NameS);
            copy.transform.SetParent(m_Content.transform, false);
            copy.SetActive(true);
            rectTransform = copy.GetComponent <RectTransform>();
            curpos        = rectTransform.localPosition.y;
            curposx       = rectTransform.localPosition.x;
            curpos       -= posoffset;//i * heightentry;
            rectTransform.localPosition = new Vector2(curposx, curpos);
            m_AddedTexts.Add(copy);
            copy.GetComponentInChildren <UnityEngine.UI.Text>().text = (string)m_ValidationSessionNames[i];


            copy = (GameObject)GameObject.Instantiate(m_UploadQuest);
            copy.transform.SetParent(m_Content.transform, false);
            copy.SetActive(true);
            rectTransform = copy.GetComponent <RectTransform>();
            curpos        = rectTransform.localPosition.y;
            curposx       = rectTransform.localPosition.x;
            curpos       -= posoffset;//i * heightentry;
            rectTransform.localPosition = new Vector2(curposx, curpos);
            m_AddedTexts.Add(copy);

            m_Buttons.Add(copy);
            m_ButtonsIds.Add(i + "");
            copy.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("ShowDetails");//"UPLOAD";

            UnityEngine.UI.Button b = copy.GetComponent <UnityEngine.UI.Button>();
            AddListener(b, i + "");



            string curvalidationid = (string)m_ValidationSessionIds[i];

            bool bActive = false;
            for (int active = 0; active < splitArray.Length && !bActive; active++)
            {
                if (splitArray[active] == curvalidationid)
                {
                    bActive = true;
                }
            }


            if (bActive == false)
            {
                copy = (GameObject)GameObject.Instantiate(m_DownloadQuest);
                copy.transform.SetParent(m_Content.transform, false);
                copy.SetActive(true);
                rectTransform = copy.GetComponent <RectTransform>();
                curpos        = rectTransform.localPosition.y;
                curposx       = rectTransform.localPosition.x;
                curpos       -= posoffset;//i * heightentry;
                rectTransform.localPosition = new Vector2(curposx, curpos);
                m_AddedTexts.Add(copy);

                m_Buttons.Add(copy);
                m_ButtonsStart.Add(copy);
                m_ButtonsStop.Add(copy);
                copy.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Start");//"UPLOAD";

                b = copy.GetComponent <UnityEngine.UI.Button>();
                AddListenerDownload(b, i + "");
            }
            else
            {
                copy = (GameObject)GameObject.Instantiate(m_DownloadQuest);
                copy.transform.SetParent(m_Content.transform, false);
                copy.SetActive(false);
                rectTransform = copy.GetComponent <RectTransform>();
                curpos        = rectTransform.localPosition.y;
                curposx       = rectTransform.localPosition.x;
                curpos       -= posoffset;//i * heightentry;
                rectTransform.localPosition = new Vector2(curposx, curpos);
                m_AddedTexts.Add(copy);

                m_ButtonsStart.Add(copy);
                copy.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Start");//"UPLOAD";

                b = copy.GetComponent <UnityEngine.UI.Button>();
                AddListenerDownload(b, i + "");



                copy = (GameObject)GameObject.Instantiate(m_StopQuest);
                copy.transform.SetParent(m_Content.transform, false);
                copy.SetActive(true);
                rectTransform = copy.GetComponent <RectTransform>();
                curpos        = rectTransform.localPosition.y;
                curposx       = rectTransform.localPosition.x;
                curpos       -= posoffset;//i * heightentry;
                rectTransform.localPosition = new Vector2(curposx, curpos);
                m_AddedTexts.Add(copy);

                m_ButtonsStop.Add(copy);
                copy.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Stop");//"UPLOAD";

                b = copy.GetComponent <UnityEngine.UI.Button>();
                AddListenerStop(b, i + "");
            }


            posoffset += heightentry;
        }

        Debug.Log("Validation list created");
    }
コード例 #27
0
    IEnumerator WaitForData(WWW www)
    {
        yield return(www);

        string[] options = { "Ok" };


        m_Names  = new ArrayList();
        m_Scores = new ArrayList();

        // check for errors
        if (www.error == null)
        {
            string data = www.text;
            //string[] parts = data.Split (":", 2);

            Debug.Log("Leaderboard result: " + data);

            JSONObject j = new JSONObject(www.text);
            m_ReadingWhich = -1;

            m_bQuestsRead = false;
            m_bPhotosRead = false;
            m_bPercRead   = false;

            accessPinData(j);

            if (m_PercDone.Length > 0)
            {
                float percdone = float.Parse(m_PercDone);
                m_PercDone = percdone.ToString("F1");
            }

            /*if (Application.systemLanguage == SystemLanguage.German ) {
             * if (m_CurSelection == 0) {
             *      m_TextInfo.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Fotos insgesamt: " + m_NrPhotos + "\nQuests insgesamt: " + m_NrQuests + "\nOrte besucht: " + m_PercDone + "%";
             * } else if (m_CurSelection == 1) {
             *      m_TextInfo.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Fotos diese Woche: " + m_NrPhotos + "\nQuests diese Woche: " + m_NrQuests + "\nOrte besucht: " + m_PercDone + "%";
             * } else if (m_CurSelection == 2) {
             *      m_TextInfo.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Fotos letzte Woche: " + m_NrPhotos + "\nQuests letzte Woche: " + m_NrQuests + "\nOrte besucht: " + m_PercDone + "%";
             * }
             * } else {
             *      if (m_CurSelection == 0) {
             *              m_TextInfo.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Total photos: " + m_NrPhotos + "\nTotal quests: " + m_NrQuests + "\nLocations visited: " + m_PercDone + "%";
             *      } else if (m_CurSelection == 1) {
             *              m_TextInfo.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Photos this week: " + m_NrPhotos + "\nQuests this week: " + m_NrQuests + "\nLocations visited: " + m_PercDone + "%";
             *      } else if (m_CurSelection == 2) {
             *              m_TextInfo.GetComponentInChildren<UnityEngine.UI.Text> ().text = "Photos last week: " + m_NrPhotos + "\nQuests last week: " + m_NrQuests + "\nLocations visited: " + m_PercDone + "%";
             *      }
             * }*/
            //	m_TextInfo.GetComponentInChildren<UnityEngine.UI.Text> ().text =  LocalizationSupport.GetString("LeaderboardTotalPhotos") + " " + m_NrPhotos +
            //		"\n" + LocalizationSupport.GetString("LeaderboardTotalQuests") + " " + m_NrQuests +  "\n" +  LocalizationSupport.GetString("LeaderboardTotalLocations") + " " + m_PercDone + "%";
            m_TextInfo.GetComponentInChildren <UnityEngine.UI.Text> ().text = LocalizationSupport.GetString("LeaderboardTotalQuests") + " " + m_NrQuests + "\n" + LocalizationSupport.GetString("LeaderboardTotalLocations") + " " + m_PercDone + "%";


            m_Loading.SetActive(false);
            createLeaderboard();

            /*
             * string[] parts = data.Split(new string[] { ":" }, 0);
             * string[] parts2 = parts[1].Split(new string[] { "," }, 0);
             * string part3 = parts2 [0];
             *
             * Debug.Log("WWW Ok!: " + www.data);
             * Debug.Log("part1: " + parts[0]);
             * Debug.Log("part2: " + parts[1]);
             * Debug.Log("part3: " + part3);
             *
             * part3 = part3.Replace ("\"", "");
             * part3 = part3.Replace ("}", "");
             *
             *
             * if (part3.Equals ("null")) {
             *      if (Application.systemLanguage == SystemLanguage.German) {
             *              messageBox.Show ("", "Registrierung fehlgeschlagen. Versuchen sie es bitte erneut.", options);
             *      } else {
             *              messageBox.Show ("", "Registration failed. Please try again.", options);
             *      }
             *      yield return www;
             * } else {
             *      PlayerPrefs.SetString("PlayerId",part3);
             *      PlayerPrefs.Save ();
             *
             *      Application.LoadLevel ("DemoMap");
             * }*/
        }
        else
        {
            Debug.Log("WWW Error: " + www.error);
            Debug.Log("WWW Error 2: " + www.text);
        }
    }
コード例 #28
0
    // Use this for initialization
    void Start()
    {
        ForceLandscapeLeft();

        // PlayerPrefs.DeleteAll();
        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        updateStates();


        m_LoadingText.SetActive(false);
        m_LoadingBack.SetActive(false);
        messageBox = UIUtility.Find <MessageBox>("MessageBox");


        if (messageBox == null)
        {
            Debug.Log("No message box set");
        }
        else
        {
            Debug.Log("Message set");
        }

        //     loginSuccessful("laco-wiki-app:///#access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IndwWDRxblFtTzVOWG1kbExUUXd6Vk53WWlZMCIsImtpZCI6IndwWDRxblFtTzVOWG1kbExUUXd6Vk53WWlZMCJ9.eyJpc3MiOiJodHRwczovL2Rldi5sYWNvLXdpa2kubmV0L2lkZW50aXR5IiwiYXVkIjoiaHR0cHM6Ly9kZXYubGFjby13aWtpLm5ldC9pZGVudGl0eS9yZXNvdXJjZXMiLCJleHAiOjE1NTU0MTIxMjgsIm5iZiI6MTU1NTQwODUyOCwiY2xpZW50X2lkIjoid2ViYXBpIiwic2NvcGUiOiJ3ZWJhcGkiLCJzdWIiOiI3MSIsImF1dGhfdGltZSI6MTU1NTQwODUyNywiaWRwIjoiR2VvV2lraSIsIm5hbWUiOiJUb2JpYXMgU3R1cm4iLCJlbWFpbCI6InRvYmlhcy5zdHVybkB2b2wuYXQiLCJyb2xlIjoiVXNlciIsImFtciI6WyJleHRlcm5hbCJdfQ.Yhw9SxK_mxEFpGCgHuhL11eI-SmTANAOBx2X-QzMx5D9LHFJmhTwwcMQvvQjIM9KBvhUmJxNTGlh4oeYlfoJM8uJvcBfLozuyy_n2qPh4FwWWYihZcn-iFEqm8PJqSA6Nm3tYe4H1MiDZyuidF6fXPgW0o6eUhEGGWB2EwbaeSvxXj7ow0xG_XWrU6ipKVrPLk79Jt4YZnH6tOa7pNe2MIcMmG2lxA-L4ccAj3OowvNTqJ8ifRYIXGN5octDTa9-Px4x4fL6ivrukeUjhedQoPNpY0jXyNAtrKdvRS-STdU13o-1toSDb4JbiADx0BIu7i5OZpSdByKFl9nzRxPLiw&token_type=Bearer&expires_in=3600&scope=webapi");


        m_AddedTexts = new ArrayList();
        // createValidationsList();

        loadValidationSessions();

        m_SessionBtnBack.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Back");//"Zurück";

        m_SessionBtnStart.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Start");
        m_SessionBtnStop.GetComponentInChildren <UnityEngine.UI.Text>().text  = LocalizationSupport.GetString("Stop");

        showSession(false);

        bool   isSessionActive = false;
        string sessions        = PlayerPrefs.GetString("ActiveSessions");
        string newsessions     = "";

        string[] splitArray = sessions.Split(char.Parse(" "));
        for (int i = 0; i < splitArray.Length; i++)
        {
            string valid = splitArray[i];
            if (valid != "" && valid != " ")
            {
                isSessionActive = true;
            }
        }
        if (!isSessionActive)
        {
            m_ButtonNext.SetActive(false);
        }
        else
        {
            m_ButtonNext.SetActive(true);
        }
    }