Пример #1
0
 private void SaveViewVariantToXML(SettingsStore store)
 {
     isLayoutProcessed = true;
     View.SaveModel();
     isLayoutProcessed = false;
     store.Xml         = UserDifferencesHelper.GetUserDifferences(View.Model)[""];
     ((IObjectSpaceLink)store).ObjectSpace.CommitChanges();
 }
Пример #2
0
        internal static void VisualizeModelNode(this IModelNode?modelNode)
        {
            _ = modelNode ?? throw new ArgumentNullException(nameof(modelNode));
            var xml       = UserDifferencesHelper.GetUserDifferences(modelNode)[""];
            var prettyXml = new XmlFormatter().Format(xml);
            var encode    = WebUtility.HtmlEncode(prettyXml);
            var html      = @$ "
<html>
    <head>
        <link href='https://unpkg.com/[email protected]/themes/prism-okaidia.css' rel='stylesheet' />
    </head>
    <body style='background-color: #272822; color: #bbb; font-family: sans-serif; margin: 0; padding: 0;'>
        <h1 style='text-align: center; margin-top: .5rem'>XAF Layout Inspector</h1>
        <hr style='border: none; border-top: 1px solid #bbb;' />
        <pre><code class='language-xml'>{encode}</code></pre>
Пример #3
0
 private void UpdateDefaultSettings(IModelView model)
 {
     defaultUserSettings = UserDifferencesHelper.GetUserDifferences(model)[""];
 }