Пример #1
0
        private void ValidateXml(object sender, RoutedEventArgs e)
        {
            var builder = new UiBuilder(this);
            var request = builder.createRequest();

            // validation handler takes care of errors or warnings during validation
            XmlUtil.ValidateXml(request, this);
            ValidationButton.Background = new SolidColorBrush(Colors.Green);
        }
Пример #2
0
        private void SaveXML(object sender, RoutedEventArgs e)
        {
            var builder = new UiBuilder(this);
            var request = builder.createRequest();

            // if something went wrong, null is returned
            if (request == null)
            {
                return;
            }
            // serialize and save xml
            XmlUtil.SaveXML(request);
            ViewButton.IsEnabled = true;
        }