void OnNewExampleSelected(object sender, FocusedNodeChangedEventArgs e) { CodeExample newExample = (sender as TreeList).GetDataRecordByNode(e.Node) as CodeExample; CodeExample oldExample = (sender as TreeList).GetDataRecordByNode(e.OldNode) as CodeExample; if (newExample == null) { return; } string exampleCode = codeEditor.ShowExample(oldExample, newExample); CodeEvaluationEventArgs args = new CodeEvaluationEventArgs(); InitializeCodeEvaluationEventArgs(args); //evaluator.ForceCompile(args); }
void OnNewExampleSelected(object sender, FocusedNodeChangedEventArgs e) { CodeExample newExample = (sender as TreeList).GetDataRecordByNode(e.Node) as CodeExample; CodeExample oldExample = (sender as TreeList).GetDataRecordByNode(e.OldNode) as CodeExample; if (newExample == null) { return; } string exampleCode = codeEditor.ShowExample(oldExample, newExample); codeExampleNameLbl.Text = CodeExampleDemoUtils.ConvertStringToMoreHumanReadableForm(newExample.RegionName) + " example"; CodeEvaluationEventArgs args = new CodeEvaluationEventArgs(); InitializeCodeEvaluationEventArgs(args); //evaluator.ForceCompile(args); }
private void OnNewExampleSelected(object sender, CurrentItemChangedEventArgs e) { CodeExample newExample = e.NewItem as CodeExample; CodeExample oldExample = e.OldItem as CodeExample; if (newExample == null) { return; } if (codeEditor == null) { return; } string exampleCode = codeEditor.ShowExample(oldExample, newExample); codeExampleNameLbl.Content = CodeExampleDemoUtils.ConvertStringToMoreHumanReadableForm(newExample.RegionName) + " example"; CodeEvaluationEventArgs args = new CodeEvaluationEventArgs(); InitializeCodeEvaluationEventArgs(args); evaluator.ForceCompile(args); }