Exemple #1
0
        //public static void Show(string documentText, PSMDiagram diagram)
        public static void Show(DockingManager manager, string documentText, PSMDiagram diagram, TranslationLog log)
        {
            documentText = documentText.Replace("utf-16", "utf-8");

            SampleDocumentWindow w = new SampleDocumentWindow();

            w.Diagram         = diagram;
            w.documentText    = documentText;
            w.tbDocument.Text = documentText;
            w.LogMessages     = log;
            w.MainWindow      = (MainWindow)manager.ParentWindow;


            w.foldingManager  = FoldingManager.Install(w.tbDocument.TextArea);
            w.foldingStrategy = new XmlFoldingStrategy();
            if (!String.IsNullOrEmpty(documentText))
            {
                w.UpdateFolding();
            }

            w.IsFloatingAllowed = true;
            w.IsCloseable       = true;
            w.Title             = string.Format("{0}.xml", diagram.Caption);
            DocumentFloatingWindow fw = new DocumentFloatingWindow(manager, w, manager.MainDocumentPane)
            {
                Topmost = true
            };

            w.MainWindow.DiagramTabManager.CreatedFloatingWindows.Add(fw);
            w.DocumentFloatingWindow = fw;
            fw.Show();
        }
Exemple #2
0
        public static void Show(DockingManager manager, PSMDiagram diagram, Dictionary <string, string> schemas, TranslationLog log)
        {
            XMLSchemaWindow w = new XMLSchemaWindow();

            w.Diagram        = diagram;
            w.XMLSchemaTexts = schemas;
            w.LogMessages    = log;
            w.MainWindow     = (MainWindow)manager.ParentWindow;

            w.IsFloatingAllowed = true;
            w.IsCloseable       = true;
            w.Title             = "XML Schema"; //string.Format("{0}.xsd", diagram.Caption);
            DocumentFloatingWindow fw = new DocumentFloatingWindow(manager, w, manager.MainDocumentPane)
            {
                Topmost = true
            };

            w.MainWindow.DiagramTabManager.CreatedFloatingWindows.Add(fw);
            w.DocumentFloatingWindow = fw;
            fw.Show();
        }