예제 #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;
        }
예제 #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);
            }
        }
예제 #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;
        }
예제 #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);
        }