public static string GetCurrentDemoPageTitle() { StringBuilder builder = new StringBuilder(); if (CurrentDemo.IsErrorPage) { builder.Append("Error Page - "); builder.Append(DemosModel.Current.GetSeoTitle()); if (!DemosModel.Current.IsRootDemo) { builder.Append(" Demo"); } } else if (CurrentDemo is IntroPageModel) { builder.Append(CurrentDemo.SeoTitle); } else if (CurrentDemo is DemoPageModel) { string product = DemosModel.Current.GetSeoTitle(); DemoGroupModel demoGroup = ((DemoPageModel)CurrentDemo).Group; string group = demoGroup != null ? demoGroup.SeoTitle : null; builder.Append(CurrentDemo.GetSeoTitle()); builder.Append(" - "); builder.Append(string.IsNullOrEmpty(group) ? product : group); builder.Append(" Demo"); } builder.Append(" | DevExpress"); return(builder.ToString()); }
public static string GetCurrentDemoPageTitle() { var builder = new StringBuilder(); if (CurrentDemo is IntroPageModel) { builder.Append(CurrentDemo.SeoTitle); } else { if (CurrentDemo is DemoPageModel) { var product = DemosModel.Current.GetSeoTitle(); var demoGroup = ((DemoPageModel)CurrentDemo).Group; var group = demoGroup != null ? demoGroup.SeoTitle : null; builder.Append(CurrentDemo.GetSeoTitle()); builder.Append(" - "); builder.Append(string.IsNullOrEmpty(group) ? product : group); builder.Append(" Demo"); } } builder.Append(" | DevExpress"); return(builder.ToString()); }
public void StopTrain() { CurrentDemo.TrainingStepEnded -= StepEnded; RunButtonText = _overtraining ? "Run overtrain" : "Run train"; CurrentDemo.StopTrain(); }
internal async Task InitTrain() { await Reset(); CurrentDemo.TrainingEnded -= TrainingEnded; CurrentDemo.TrainingEnded += TrainingEnded; if (string.IsNullOrWhiteSpace(HiddenLayers) == false) { CurrentDemo.HiddenLayers = HiddenLayers.Split(',').Select(l => int.Parse(l)).ToArray(); } else { CurrentDemo.HiddenLayers = new int[] { }; } CurrentDemo.Speed = SpeedValue; CurrentDemo.LearningRate = LearningRate; CurrentDemo.TargetError = TargetError; CurrentDemo.CreateNeuralNetwork(); TotalSteps = CurrentDemo.TotalSteps; TotalError = CurrentDemo.TotalError; Input = string.Join(",", CurrentDemo.TrainingSet[0]); Output = string.Join(",", CurrentDemo.NeuralNetwork.Update(CurrentDemo.TrainingSet[0])); TargetOutput = string.Join(",", CurrentDemo.Targets[0]); var scene = new NeuralNetworkScene(CurrentDemo.NeuralNetwork); await _game.Start(scene); }
public void StartTrain() { CurrentDemo.TrainingStepEnded -= StepEnded; CurrentDemo.TrainingStepEnded += StepEnded; RunButtonText = "Pause"; CurrentDemo.StartTrain(int.MaxValue, _overtraining); }
public static string GetCurrentDemoPageTitle() { StringBuilder builder = new StringBuilder(); builder.Append(CurrentDemo.GetSeoTitle()); string group = CurrentDemo.Group.SeoTitle; if (!string.IsNullOrEmpty(group)) { builder.Append(" - "); builder.Append(group); } builder.Append(" - "); builder.Append(DemosModel.Current.GetSeoTitle()); return(builder.ToString()); }
public static string GetCurrentDemoTitle() { return(CurrentDemo.GetSeoTitle() + " | DevExpress Bootstrap Controls for ASP.NET"); }