Example #1
0
        public SharedValidationWindow()
        {
            InitializeComponent();

            _scriptComponent.Source = ScriptHelper.ReadResource("_0020_SharingValidationBetweenJsAndDotNet.EmployeeValidation.js");
            _scriptComponent.Run();

            _emp        = GetEmployee();
            DataContext = _emp;
        }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     _scriptComponent.Clear(true);
     _scriptComponent.Source = SourceExpression.Text;
     try
     {
         _scriptComponent.Run();
         var res = _scriptComponent.RunResult;
         ResultLabel.Content = res;
     }
     catch (Exception ex)
     {
         ResultLabel.Content = "Error: " + ex.Message;
     }
 }