//Global Error Processing happens in the APP view
        //but here I want to catch it as well to save any possible generated xml to the log
        private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs exception)
        {
            string xmltoWrite = XmlXpathGenerator.GenerateXmlForObjectView(NewObjectFormsPanel);

            if (!String.IsNullOrEmpty(xmltoWrite))
            {
                XmlFileManager.WriteStringToLog(xmltoWrite, true);
            }
        }
示例#2
0
        public void ResetNewObjectView()
        {
            string xmltoWrite = XmlXpathGenerator.GenerateXmlForObjectView(NewObjectFormViewPanel);

            if (!String.IsNullOrEmpty(xmltoWrite))
            {
                XmlFileManager.WriteStringToLog(xmltoWrite, true);
            }
            NewObjectFormViewPanel.Children.Clear();
            NewObjectFormViewPanel.StackPanelLoadedListWrappers.Clear();
            XmlOutputBox.Text = XmlXpathGenerator.GenerateXmlViewOutput(NewObjectFormViewPanel);
        }
        private void MainWindow_Closing(object sender, CancelEventArgs e)
        {
            string xmltoWrite = XmlXpathGenerator.GenerateXmlForObjectView(NewObjectFormsPanel);

            if (!String.IsNullOrEmpty(xmltoWrite))
            {
                XmlFileManager.WriteStringToLog(xmltoWrite, true);
            }
            Properties.Settings.Default.IncludeChildrenSearchTreeTooltip   = IncludeChildrenInOnHoverCheckBox.IsChecked.Value;
            Properties.Settings.Default.IncludeCommentsSearchTreeTooltip   = IncludeCommentsCheckBox.IsChecked.Value;
            Properties.Settings.Default.IncludeAllModsObjectTreeAttributes = IncludeAllModsInBoxesCheckBox.IsChecked.Value;
            Properties.Settings.Default.IgnoreAllAttributesCheckbox        = IgnoreAllAttributesCheckBox.IsChecked.Value;
            Properties.Settings.Default.Save();
            //SaveExternalXaml();
        }