Exemplo n.º 1
0
        private void DocumentLoaded(object sender, DocumentLoadedEventArgs e)
        {
            var proxy = new DocumentEditorServiceSoapClient();

            Document doc = e.Document;

            this._activeDocument = new DocumentView(proxy.GetDocumentPattern(doc.DocumentPatternId));

            this.LoadRegions(_activeDocument);

            foreach (DocumentRegion region in _activeDocument.DocumentBoard.Children)
            {
                region.RegionContent = proxy.GetDocumentData(doc, region.ContentPattern.Id);
            }

            this.documentContainer.Content = this._activeDocument;

            this._currentlyEditedDocument = doc;
        }
Exemplo n.º 2
0
        private void LoadRegions(DocumentView activeDocument)
        {
            foreach (ContentPattern contentPattern in activeDocument.DocumentPattern.Contents)
            {
                var region = new DocumentRegion
                                 {
                                     RegionContent = contentPattern.Id
                                 };

                region.ContentPattern = contentPattern;

                activeDocument.documentBoard.Children.Add(region);
            }
        }
Exemplo n.º 3
0
        private void NewDocumentPattern_Click(object sender, RoutedEventArgs e)
        {
            this.CanAddRegionsToDocument = true;

            var proxy = new DocumentEditorServiceSoapClient();

            var dv = new DocumentView(proxy.CreateDocumentPattern());

            this._activeDocument = dv;

            this.documentContainer.Content = dv;
        }
Exemplo n.º 4
0
        private void DocumentPatternLoaded(object sender, DocumentPatternLoadedEventArgs e)
        {
            this.CanAddRegionsToDocument = true;

            this._activeDocument = new DocumentView(e.DocumentPattern);

            this.documentContainer.Content = this._activeDocument;

            this.LoadRegions(this._activeDocument);
        }