private void FillCreditsRoller()
    {
        _creditsList = new CreditsList();
        string json = _creditsAsset.text;

        _creditsList = JsonUtility.FromJson <CreditsList>(json);
        SetCreditsText();
    }
Example #2
0
    private void FillCreditsRoller()
    {
        _creditsList = new CreditsList();
        TextAsset creditsList = Resources.Load(_creditsFilename) as TextAsset;
        string    json        = creditsList.text;

        _creditsList = JsonUtility.FromJson <CreditsList>(json);
        SetCreditsText();
    }
Example #3
0
        async void CreditsList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            if (creditsQueue.Count > 0)
            {
                await Task.Delay(500);

                await DispatcherHelper.RunAsync(() =>
                {
                    if (creditsQueue.Count > 0)
                    {
                        var gc = creditsQueue.Dequeue();
                        CreditsList.Add(gc);
                    }
                });
            }
        }
Example #4
0
        private Task UpdateCredits(bool updateText = false)
        {
            var creditsFileFI = new FileInfo(CreditsFileLocalLocation);

            if (!updateText)
            {
                using var reader = creditsFileFI.OpenText();
                _creditsList     = (CreditsList)App.JsonSerializer.Deserialize(reader, typeof(CreditsList));
                if (_creditsList != null)
                {
                    tblCommunityAdmins.Text = string.Join("\r\n\r\n", _creditsList.Admins);
                    tblPatreonDonators.Text = string.Join("\r\n\r\n", _creditsList.Patreon);
                    tblPaypalDonators.Text  = string.Join("\r\n\r\n", _creditsList.Paypal);
                }
            }

            tblLastUpdated.Text = creditsFileFI.LastWriteTime.Date == DateTime.Now.Date
                ? $"{App.Text.LastUpdatedAt}: {creditsFileFI.LastWriteTime.ToShortTimeString()}"
                : $"{App.Text.LastUpdatedOn}: {creditsFileFI.LastWriteTime.ToLongDateString()}";

            return(Task.CompletedTask);
        }
Example #5
0
        async void AddCredits(ResourceLoader loader)
        {
            creditsQueue.Clear();
            CreditsList.Clear();

            var libraryGroup = new GroupCollection <Account>(loader.GetString("AboutLibraryCreators"));

            libraryGroup.Add(new Account()
            {
                Contact      = "https://code.google.com/p/ude/",
                ContactType  = ContactType.Web,
                Name         = "UDE",
                ContactName  = "@source code",
                Contact2     = "https://www.mozilla.org/MPL/",
                ContactType2 = ContactType.Web,
                ContactName2 = "/   license (MPL 1.1)",
            });
            libraryGroup.Add(new Account()
            {
                Contact     = "http://www.mvvmlight.net/",
                ContactType = ContactType.Web,
                Name        = "MVVM Light Toolkit",
                ContactName = "@homepage",
            });
            libraryGroup.Add(new Account()
            {
                Name         = "FFmpegInterop library for Windows",
                Contact      = "https://github.com/Microsoft/FFmpegInterop",
                ContactType  = ContactType.Web,
                ContactName  = "@source code",
                Contact2     = "http://www.apache.org/licenses/LICENSE-2.0",
                ContactType2 = ContactType.Web,
                ContactName2 = "/   license (Apache 2.0 License)",
            });
            libraryGroup.Add(new Account()
            {
                Name         = "FFmpeg",
                Contact      = "http://www.ffmpeg.org/",
                ContactType  = ContactType.Web,
                ContactName  = "@homepage",
                Contact2     = "https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.LGPLv3",
                ContactType2 = ContactType.Web,
                ContactName2 = "/   license (LGPL v2.1 or later)",
            });

            var specialGroup = new GroupCollection <Account>(loader.GetString("AboutSpecialThanks"));

            specialGroup.Add(new Account()
            {
                Name = loader.GetString("AboutSpecialPeople1")
            });
            //specialGroup.Add(new Account()
            //{
            //    Contact = string.Format(FACEBOOK_SUPPORT, "100001136649926"),
            //    ContactType = ContactType.Web,
            //    ContactName = "@facebook",
            //    Name = loader.GetString("AboutSpecialPeople2")
            //});
            specialGroup.Add(new Account()
            {
                Name = loader.GetString("AboutSpecialPeople3")
            });

            var translateGroup = new GroupCollection <Account>(loader.GetString("AboutTranslators"));

            translateGroup.Add(new Account()
            {
                Contact     = "http://about.me/masabalos",
                ContactType = ContactType.Web,
                ContactName = "@homepage",
                Name        = loader.GetString("AboutTranslatePeople1"),
                Attr1       = "Spanish (Español)"
            });
            translateGroup.Add(new Account()
            {
                Contact     = "mailto:[email protected]",
                ContactType = ContactType.Email,
                ContactName = "@email",
                Name        = loader.GetString("AboutTranslatePeople2"),
                Attr1       = "Russian (русский)"
            });
            translateGroup.Add(new Account()
            {
                Contact     = "http://m.facebook.com/degetel2007",
                ContactType = ContactType.Web,
                ContactName = "@facebook",
                Name        = loader.GetString("AboutTranslatePeople3"),
                Attr1       = "Romanian (Român)"
            });
            translateGroup.Add(new Account()
            {
                Contact     = "mailto:[email protected]",
                ContactType = ContactType.Email,
                ContactName = "@email",
                Name        = loader.GetString("AboutTranslatePeople4"),
                Attr1       = "Hungarian (Magyar)"
            });
            translateGroup.Add(new Account()
            {
                Contact     = "http://preludebg.com/",
                ContactType = ContactType.Web,
                ContactName = "@homepage",
                Name        = loader.GetString("AboutTranslatePeople5"),
                Attr1       = "Bulgarian (български)"
            });
            translateGroup.Add(new Account()
            {
                Contact     = "mailto:[email protected]",
                ContactType = ContactType.Email,
                ContactName = "@email",
                Name        = loader.GetString("AboutTranslatePeople6"),
                Attr1       = "Chinese (中文)"
            });
            translateGroup.Add(new Account()
            {
                Contact     = "mailto:[email protected]",
                ContactType = ContactType.Email,
                ContactName = "@email",
                Name        = loader.GetString("AboutTranslatePeople7"),
                Attr1       = "Ukrainian (Український)"
            });
            translateGroup.Add(new Account()
            {
                Contact     = "mailto:[email protected]",
                ContactType = ContactType.Email,
                ContactName = "@email",
                Name        = loader.GetString("AboutTranslatePeople8"),
                Attr1       = "Persian (فارسی)"
            });
            translateGroup.Add(new Account()
            {
                Contact     = "mailto:[email protected]",
                ContactType = ContactType.Email,
                ContactName = "@email",
                Name        = loader.GetString("AboutTranslatePeople9"),
                Attr1       = "Hindi (भारतीय)"
            });
            translateGroup.Add(new Account()
            {
                Contact     = "mailto:[email protected]",
                ContactType = ContactType.Email,
                ContactName = "@email",
                Name        = loader.GetString("AboutTranslatePeople10"),
                Attr1       = "Turkish (Türk)"
            });
            translateGroup.Add(new Account()
            {
                Contact     = "http://about.me/eduardorodrigues",
                ContactType = ContactType.Web,
                ContactName = "@homepage",
                Name        = loader.GetString("AboutTranslatePeople11"),
                Attr1       = "Portuguese (Português)"
            });
            translateGroup.Add(new Account()
            {
                Contact     = "mailto:[email protected]",
                ContactType = ContactType.Email,
                ContactName = "@email",
                Name        = loader.GetString("AboutTranslatePeople12"),
                Attr1       = "French (français)"
            });

            creditsQueue.Enqueue(specialGroup);
            creditsQueue.Enqueue(translateGroup);
            creditsQueue.Enqueue(libraryGroup);

            await DispatcherHelper.RunAsync(() =>
            {
                CreditsList.Add(creditsQueue.Dequeue());
            });
        }