Пример #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            string result = host.runScript(JsInput.Text);

            JsOutput.Text = JsOutput.Text + "\n> " + JsInput.Text + "\n" + result;
            JsOutput.UpdateLayout();
            JsOutputScroll.ChangeView(null, double.MaxValue, null);
        }
Пример #2
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     host.NKevaluateJavaScript(JsInput.Text).ContinueWith(task =>
     {
         JsOutput.Text = JsOutput.Text + "\n> " + JsInput.Text + "\n" + task.Result;
         JsOutput.UpdateLayout();
         JsOutputScroll.ChangeView(null, double.MaxValue, null);
     }, TaskScheduler.FromCurrentSynchronizationContext());
 }