Ejemplo n.º 1
0
        public async Task <FNBRStats> GetStatsAsync(FNPlatform platform = FNPlatform.PC, FNStatWindow?window = null)
        {
            if (Platforms.Contains(platform))
            {
                var request = new RestRequest("users/public/br_stats", Method.GET);
                request.AddParameter("user_id", UserID.UIDToString());
                request.AddParameter("platform", platform.ToString().ToLower());
                if (window != null)
                {
                    request.AddParameter("window", window.ToString().ToLower());
                }

                IRestResponse response = await FNAPI.SendRestRequestAsync(request).ConfigureAwait(false);

                if (response.ResponseStatus != ResponseStatus.Completed)
                {
                    return(null);
                }

                var tempUser = JsonConvert.DeserializeObject <FNBRTempUser>(response.Content);
                if (tempUser == null)
                {
                    return(null);
                }

                return(new FNBRStats(tempUser));
            }
            return(null);
        }
Ejemplo n.º 2
0
        private void onProviderChange(string provider)
        {
            if (Speaker.isMaryMode)
            {
                if (Platforms.Contains(Common.Model.Enum.Platform.Web) && RTVoice.Util.Helper.isWebPlatform)
                { // special case since Web always needs MaryTTS
                    currentPlatform = Common.Model.Enum.Platform.Web;
                }
                else
                {
                    currentPlatform = Common.Model.Enum.Platform.MaryTTS;
                }

                activateGO();
            }
            else
            {
                selectPlatform();
            }

            //Debug.Log (currentPlatform);
        }
Ejemplo n.º 3
0
        public KordueneWorkspace(SlnFile sln) : this()
        {
            SlnFile = sln;

            var guidSection = sln.Sections.GetSection("ExtensibilityGlobals", SlnSectionType.PostProcess);
            var id          = SolutionId.CreateFromSerialized(new Guid(guidSection.Properties.GetValue("SolutionGuid")));

            var solution = this.CreateSolution(SolutionInfo.Create(id, VersionStamp.Default, sln.FullPath));

            foreach (var item in sln.Projects)
            {
                var proj = ProjectInfo.Create(ProjectId.CreateFromSerialized(new Guid(item.Id)), VersionStamp.Default, item.Name, item.Name, LanguageNames.CSharp, Path.Combine(sln.BaseDirectory, item.FilePath));
                proj     = AddProjectDocuments(proj);
                proj     = AddDefaultReferences(proj);
                solution = solution.AddProject(proj);
            }

            var configs = sln.Sections.GetSection("SolutionConfigurationPlatforms");

            Configurations.Clear();
            foreach (var item in configs.Properties)
            {
                var configPlat = item.Value.Split("|");

                if (!Configurations.Contains(configPlat[0].Replace(" ", string.Empty)))
                {
                    Configurations.Add(configPlat[0]);
                }

                if (!Platforms.Contains(configPlat[1].Replace(" ", string.Empty)))
                {
                    Platforms.Add(configPlat[1].Replace(" ", string.Empty));
                }
            }

            this.SetCurrentSolution(solution);

            LoadProjectSymbols();
        }