Exemplo n.º 1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 14 "..\..\History.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.MainMenu_Click);

            #line default
            #line hidden
                return;

            case 2:
                this.Playername = ((System.Windows.Controls.TextBox)(target));
                return;

            case 3:
                this.ButtonHistory = ((System.Windows.Controls.Button)(target));

            #line 19 "..\..\History.xaml"
                this.ButtonHistory.Click += new System.Windows.RoutedEventHandler(this.ButtonHistory_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.Table = ((System.Windows.Documents.Table)(target));
                return;

            case 5:
                this.gameshistory = ((System.Windows.Documents.TableRowGroup)(target));
                return;
            }
            this._contentLoaded = true;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Renders DOM text elements recursively, i.e. including their childs.
        /// </summary>
        /// <param name="e">The root DOM text element.</param>
        /// <returns>The corresponding Wpf element.</returns>
        /// <exception cref="System.InvalidOperationException">
        /// </exception>
        /// <exception cref="System.NotImplementedException"></exception>
        public object RenderRecursively(TextElement e)
        {
            object wpf = null;

            switch (e)
            {
            case BlockUIContainer buc:
            {
                wpf = new swd.BlockUIContainer();
            }
            break;

            case FlowDocument flowDocument:
            {
                // make sure the standard colors were set
                flowDocument.Foreground = ExCSS.Color.Black;
                flowDocument.Background = ExCSS.Color.White;

                var flowDocumente = new swd.FlowDocument()
                {
                    Name = NameOfFlowDocument
                };
                if (TemplateBindingViewportWidth is null)
                {
                    TemplateBindingViewportWidth = new Binding("ColumnWidth")
                    {
                        Source = flowDocumente
                    }
                }
                ;
                if (TemplateBindingViewportHeight is null)
                {
                    TemplateBindingViewportHeight = new Binding("ColumnWidth")
                    {
                        Source = flowDocumente
                    }
                }
                ;                                                                                    // Binding to ColumnWidth is not optimal, but better than nothing!

                if (flowDocument.Background.HasValue)
                {
                    flowDocumente.Background = GetBrushFromColor(flowDocument.Background.Value);
                }
                if (flowDocument.Foreground.HasValue)
                {
                    flowDocumente.Foreground = GetBrushFromColor(flowDocument.Foreground.Value);
                }

                wpf = flowDocumente;
            }
            break;

            case Hyperlink hl:
            {
                var hle = new swd.Hyperlink();
                if (!string.IsNullOrEmpty(hl.NavigateUri))
                {
                    if (System.Uri.TryCreate(hl.NavigateUri, UriKind.RelativeOrAbsolute, out var uri))
                    {
                        hle.NavigateUri = uri;
                    }
                }
                if (!string.IsNullOrEmpty(hl.TargetName))
                {
                    hle.TargetName = hl.TargetName;
                }
                wpf = hle;
            }
            break;

            case Image image:
            {
                var imagee = new System.Windows.Controls.Image();
                if (!string.IsNullOrEmpty(image.Source))
                {
                    imagee.SetBinding(System.Windows.Controls.Image.SourceProperty, $"ImageProvider[{image.Source}]");
                }

                if (image.Width == null && image.Height == null)
                {
                    imagee.Stretch = System.Windows.Media.Stretch.Uniform;

                    var binding = new Binding()
                    {
                        RelativeSource = RelativeSource.Self, Path = new System.Windows.PropertyPath("Source")
                    };
                    binding.Converter = ImageToImageWidthConverter.Instance;
                    imagee.SetBinding(System.Windows.Controls.Image.WidthProperty, binding);
                }
                else
                {
                    imagee.Stretch = System.Windows.Media.Stretch.Uniform;
                }

                if (image.Width != null)
                {
                    if (image.Width.IsPurelyAbsolute(out var widthPx))
                    {
                        imagee.Width = widthPx;
                    }
                    else
                    {
                        var multibinding = new MultiBinding();
                        multibinding.Bindings.Add(new Binding()
                            {
                                Source = TemplateBindingViewportWidth.Source, Path = TemplateBindingViewportWidth.Path
                            });
                        multibinding.Bindings.Add(new Binding()
                            {
                                Source = TemplateBindingViewportHeight.Source, Path = TemplateBindingViewportHeight.Path
                            });
                        multibinding.Converter          = CompoundLengthConverter.Instance;
                        multibinding.ConverterParameter = GetCompoundLengthConverterParameters(image.Width);
                        imagee.SetBinding(System.Windows.Controls.Image.WidthProperty, multibinding);
                    }
                }

                if (image.Height != null)
                {
                    if (image.Height.IsPurelyAbsolute(out var heightPx))
                    {
                        imagee.Height = heightPx;
                    }
                    else
                    {
                        var multibinding = new MultiBinding();
                        multibinding.Bindings.Add(new Binding()
                            {
                                Source = TemplateBindingViewportWidth.Source, Path = TemplateBindingViewportWidth.Path
                            });
                        multibinding.Bindings.Add(new Binding()
                            {
                                Source = TemplateBindingViewportHeight.Source, Path = TemplateBindingViewportHeight.Path
                            });
                        multibinding.Converter          = CompoundLengthConverter.Instance;
                        multibinding.ConverterParameter = GetCompoundLengthConverterParameters(image.Height);
                        imagee.SetBinding(System.Windows.Controls.Image.HeightProperty, multibinding);
                    }
                }

                // set max-width and max-height
                if (image.MaxWidth != null && image.MaxWidth.Value.IsAbsolute)
                {
                    imagee.MaxWidth = image.MaxWidth.Value.ToPixel();
                }
                else if (image.MaxWidth == null || image.MaxWidth.Value.Type == ExCSS.Length.Unit.Vw)
                {
                    double vwValue = image.MaxWidth.HasValue ? image.MaxWidth.Value.Value : 100;

                    var binding = new Binding()
                    {
                        Source = TemplateBindingViewportWidth.Source, Path = TemplateBindingViewportWidth.Path
                    };
                    binding.Converter          = RelativeSizeConverter.Instance;
                    binding.ConverterParameter = vwValue;
                    imagee.SetBinding(System.Windows.Controls.Image.MaxWidthProperty, binding);
                }
                else
                {
                    throw new InvalidProgramException();
                }


                if (image.MaxHeight != null && image.MaxHeight.Value.IsAbsolute)
                {
                    imagee.MaxHeight = image.MaxHeight.Value.ToPixel();
                }
                else if (image.MaxHeight == null || image.MaxHeight.Value.Type == ExCSS.Length.Unit.Vh)
                {
                    double vhValue = image.MaxHeight.HasValue ? image.MaxHeight.Value.Value : 100;
                    var    binding = new Binding()
                    {
                        Source = TemplateBindingViewportWidth.Source, Path = TemplateBindingViewportWidth.Path
                    };
                    binding.Converter          = RelativeSizeConverter.Instance;
                    binding.ConverterParameter = vhValue;
                    imagee.SetBinding(System.Windows.Controls.Image.MaxHeightProperty, binding);
                }
                else
                {
                    throw new InvalidProgramException();
                }

                wpf = imagee;
            }
            break;

            case InlineUIContainer iuc:
            {
                var inlineuiContainere = new swd.InlineUIContainer();
                wpf = inlineuiContainere;
            }
            break;

            case LineBreak lb:
            {
                wpf = new swd.LineBreak();
            }
            break;

            case List list:
            {
                var liste = new swd.List();
                if (list.MarkerStyle.HasValue)
                {
                    liste.MarkerStyle = ToMarkerStyle(list.MarkerStyle.Value);
                }
                wpf = liste;
            }
            break;

            case ListItem li:
            {
                wpf = new swd.ListItem();
            }
            break;

            case Paragraph p:
            {
                var pe = new swd.Paragraph();
                if (p.TextDecorations.HasValue)
                {
                    pe.TextDecorations = ToTextDecorations(p.TextDecorations.Value);
                }
                if (p.TextIndent.HasValue)
                {
                    pe.TextIndent = p.TextIndent.Value.IsAbsolute ? p.TextIndent.Value.ToPixel() : 0;
                }
                wpf = pe;
            }
            break;

            case Run run:
            {
                if (SplitIntoWords)
                {
                    wpf = CreateTextElement_SeparateWords(run.Text);
                }
                else if (SplitIntoSentences)
                {
                    wpf = CreateTextElement_SeparateSentences(run.Text);
                }
                else
                {
                    wpf = new swd.Run(run.Text);
                }
            }
            break;

            case Section s:
            {
                wpf = new swd.Section();
            }
            break;

            case Span span:
            {
                wpf = new swd.Span();
            }
            break;

            case Table tb:
            {
                var tbe = new swd.Table();
                foreach (var c in tb.Columns)
                {
                    if (c.Width.HasValue)
                    {
                        tbe.Columns.Add(new swd.TableColumn()
                            {
                                Width = new System.Windows.GridLength(c.Width.Value)
                            });
                    }
                    else
                    {
                        tbe.Columns.Add(new swd.TableColumn());
                    }
                }
                wpf = tbe;
            }
            break;

            case TableCell tc:
            {
                var tce = new swd.TableCell();
                if (1 != tc.ColumnSpan)
                {
                    tce.ColumnSpan = tc.ColumnSpan;
                }

                if (1 != tc.RowSpan)
                {
                    tce.RowSpan = tc.RowSpan;
                }
                if (tc.BorderBrush.HasValue)
                {
                    tce.BorderBrush = new System.Windows.Media.SolidColorBrush(ToColor(tc.BorderBrush.Value));
                }
                if (tc.BorderThickness.HasValue)
                {
                    tce.BorderThickness = ToThickness(tc.BorderThickness.Value);
                }
                wpf = tce;
            }
            break;

            case TableRow trow:
            {
                wpf = new swd.TableRow();
            }
            break;

            case TableRowGroup trg:
            {
                wpf = new swd.TableRowGroup();
            }
            break;

            default:
            {
                wpf = null;
            }
            break;
            }

            // Render TextElement properties

            if (wpf is swd.TextElement te)
            {
                if (!string.IsNullOrEmpty(e.FontFamily))
                {
                    te.FontFamily = GetFontFamily(e.FontFamily);
                }

                if (e.FontSize.HasValue)
                {
                    var fs = e.FontSize.Value;
                    fs          = Math.Max(0.004, fs);
                    te.FontSize = fs;
                }

                if (e.FontStyle.HasValue)
                {
                    te.FontStyle = ToFontStyle(e.FontStyle.Value);
                }

                if (e.FontWeight.HasValue)
                {
                    te.FontWeight = ToFontWeight(e.FontWeight.Value);
                }

                if (e.Foreground.HasValue && e.Foreground != e.ForegroundInheritedOnly)
                {
                    te.Foreground = GetBrushFromColor(e.Foreground.Value);
                }

                if (e.Background.HasValue && e.Background != e.BackgroundInheritedOnly)
                {
                    te.Background = GetBrushFromColor(e.Background.Value);
                }
            }

            // now special properties

            if (e is Block b && wpf is swd.Block be)
            {
                if (b.Margin.HasValue)
                {
                    be.Margin = ToThickness(b.Margin.Value);
                }

                if (b.Padding.HasValue)
                {
                    be.Padding = ToThickness(b.Padding.Value);
                }

                if (b.BorderBrush.HasValue)
                {
                    be.BorderBrush = new System.Windows.Media.SolidColorBrush(ToColor(b.BorderBrush.Value));
                }

                if (b.BorderThickness.HasValue)
                {
                    be.BorderThickness = ToThickness(b.BorderThickness.Value);
                }

                if (b.TextAlignment.HasValue)
                {
                    be.TextAlignment = ToTextAlignment(b.TextAlignment.Value);
                }

                if (b.LineHeight.HasValue)
                {
                    be.LineHeight = b.LineHeight.Value;
                }
            }
            if (e is Inline i && wpf is swd.Inline ie)
            {
                if (i.VerticalAlignment.HasValue)
                {
                    ie.BaselineAlignment = ToBaselineAlignment(i.VerticalAlignment.Value);
                }
            }
            //  finished rendering the attributes


            // now, render all children
            foreach (var child in e.Childs)
            {
                var childe = RenderRecursively(child);

                switch (wpf)
                {
                case swd.Figure figure:
                    figure.Blocks.Add((swd.Block)childe);
                    break;

                case swd.Floater floater:
                    floater.Blocks.Add((swd.Block)childe);
                    break;

                case swd.FlowDocument flowDocument:
                    flowDocument.Blocks.Add((swd.Block)childe);
                    break;

                case swd.List list:
                    list.ListItems.Add((swd.ListItem)childe);
                    break;

                case swd.ListItem listItem:
                    listItem.Blocks.Add((swd.Block)childe);
                    break;

                case swd.Section section:
                    section.Blocks.Add((swd.Block)childe);
                    break;

                case swd.Table table:
                    table.RowGroups.Add((swd.TableRowGroup)childe);
                    break;

                case swd.TableCell tableCell:
                    tableCell.Blocks.Add((swd.Block)childe);
                    break;

                case swd.TableRow tableRow:
                    tableRow.Cells.Add((swd.TableCell)childe);
                    break;

                case swd.TableRowGroup tableRowGroup:
                    tableRowGroup.Rows.Add((swd.TableRow)childe);
                    break;

                // now elements that can contain inlines
                case swd.Paragraph paragraph:
                    paragraph.Inlines.Add((swd.Inline)childe);
                    break;

                case swd.Span span:
                    span.Inlines.Add((swd.Inline)childe);
                    break;

                // now some specialties
                case swd.InlineUIContainer inlineUIContainer:
                    if (inlineUIContainer.Child != null)
                    {
                        throw new InvalidOperationException($"{nameof(swd.InlineUIContainer)} can not contain more than one child");
                    }
                    inlineUIContainer.Child = (System.Windows.UIElement)childe;
                    break;

                case swd.BlockUIContainer blockUIContainer:
                    if (blockUIContainer.Child != null)
                    {
                        throw new InvalidOperationException($"{nameof(swd.BlockUIContainer)} can not contain more than one child");
                    }
                    blockUIContainer.Child = (System.Windows.UIElement)childe;
                    break;

                default:
                    throw new NotImplementedException();
                }
            }

            if (AttachDomAsTags)
            {
                if (wpf is System.Windows.FrameworkContentElement conEle)
                {
                    conEle.Tag = e;
                }
                else if (wpf is System.Windows.FrameworkElement uiEle)
                {
                    uiEle.Tag = e;
                }
            }

            return(wpf);
        }
Exemplo n.º 3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.hometxt = ((System.Windows.Controls.TextBlock)(target));

            #line 13 "..\..\UC0104-SS03.xaml"
                this.hometxt.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.gotoHome);

            #line default
            #line hidden
                return;

            case 2:
                this.txt = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 3:
                this.typetxt = ((System.Windows.Controls.TextBlock)(target));

            #line 15 "..\..\UC0104-SS03.xaml"
                this.typetxt.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.gotoType);

            #line default
            #line hidden
                return;

            case 4:
                this.txt1 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 5:
                this.tabletxt = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.homeim = ((System.Windows.Controls.Image)(target));

            #line 19 "..\..\UC0104-SS03.xaml"
                this.homeim.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.gotoHome);

            #line default
            #line hidden
                return;

            case 7:
                this.logouttxt = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 8:
                this.logoutim = ((System.Windows.Controls.Image)(target));
                return;

            case 9:
                this.table = ((System.Windows.Documents.Table)(target));
                return;

            case 10:
                this.tablerowgroup = ((System.Windows.Documents.TableRowGroup)(target));
                return;

            case 11:
                this.UC0104_3 = ((System.Windows.Controls.Frame)(target));
                return;
            }
            this._contentLoaded = true;
        }
        internal object BuildObjectTree()
        {
            IAddChild root;

            switch (_type)
            {
            case ElementType.Table:
                root = new Table();
                break;

            case ElementType.TableRowGroup:
                root = new TableRowGroup();
                break;

            case ElementType.TableRow:
                root = new TableRow();
                break;

            case ElementType.TableCell:
                root = new TableCell();
                break;

            case ElementType.Paragraph:
                root = new Paragraph();
                break;

            case ElementType.Hyperlink:
                Hyperlink link = new Hyperlink();
                link.NavigateUri      = GetValue(NavigateUriProperty) as Uri;
                link.RequestNavigate += new RequestNavigateEventHandler(ClickHyperlink);
                AutomationProperties.SetHelpText(link, (String)this.GetValue(HelpTextProperty));
                AutomationProperties.SetName(link, (String)this.GetValue(NameProperty));
                root = link;
                break;

            default:
                Debug.Assert(false);
                root = null;
                break;
            }

            ITextPointer pos = ((ITextPointer)_start).CreatePointer();

            while (pos.CompareTo((ITextPointer)_end) < 0)
            {
                TextPointerContext tpc = pos.GetPointerContext(LogicalDirection.Forward);
                if (tpc == TextPointerContext.Text)
                {
                    root.AddText(pos.GetTextInRun(LogicalDirection.Forward));
                }
                else if (tpc == TextPointerContext.EmbeddedElement)
                {
                    root.AddChild(pos.GetAdjacentElement(LogicalDirection.Forward));
                }
                else if (tpc == TextPointerContext.ElementStart)
                {
                    object obj = pos.GetAdjacentElement(LogicalDirection.Forward);
                    if (obj != null)
                    {
                        root.AddChild(obj);
                        pos.MoveToNextContextPosition(LogicalDirection.Forward);
                        pos.MoveToElementEdge(ElementEdge.BeforeEnd);
                    }
                }

                pos.MoveToNextContextPosition(LogicalDirection.Forward);
            }
            return(root);
        }
        // Token: 0x06002D1F RID: 11551 RVA: 0x000CBAC0 File Offset: 0x000C9CC0
        internal object BuildObjectTree()
        {
            FixedElement.ElementType type = this._type;
            IAddChild addChild;

            if (type != FixedElement.ElementType.Paragraph)
            {
                switch (type)
                {
                case FixedElement.ElementType.Table:
                    addChild = new Table();
                    goto IL_C7;

                case FixedElement.ElementType.TableRowGroup:
                    addChild = new TableRowGroup();
                    goto IL_C7;

                case FixedElement.ElementType.TableRow:
                    addChild = new TableRow();
                    goto IL_C7;

                case FixedElement.ElementType.TableCell:
                    addChild = new TableCell();
                    goto IL_C7;

                case FixedElement.ElementType.Hyperlink:
                {
                    Hyperlink hyperlink = new Hyperlink();
                    hyperlink.NavigateUri      = (base.GetValue(FixedElement.NavigateUriProperty) as Uri);
                    hyperlink.RequestNavigate += this.ClickHyperlink;
                    AutomationProperties.SetHelpText(hyperlink, (string)base.GetValue(FixedElement.HelpTextProperty));
                    AutomationProperties.SetName(hyperlink, (string)base.GetValue(FixedElement.NameProperty));
                    addChild = hyperlink;
                    goto IL_C7;
                }
                }
                addChild = null;
            }
            else
            {
                addChild = new Paragraph();
            }
IL_C7:
            ITextPointer textPointer = ((ITextPointer)this._start).CreatePointer();

            while (textPointer.CompareTo(this._end) < 0)
            {
                TextPointerContext pointerContext = textPointer.GetPointerContext(LogicalDirection.Forward);
                if (pointerContext == TextPointerContext.Text)
                {
                    addChild.AddText(textPointer.GetTextInRun(LogicalDirection.Forward));
                }
                else if (pointerContext == TextPointerContext.EmbeddedElement)
                {
                    addChild.AddChild(textPointer.GetAdjacentElement(LogicalDirection.Forward));
                }
                else if (pointerContext == TextPointerContext.ElementStart)
                {
                    object adjacentElement = textPointer.GetAdjacentElement(LogicalDirection.Forward);
                    if (adjacentElement != null)
                    {
                        addChild.AddChild(adjacentElement);
                        textPointer.MoveToNextContextPosition(LogicalDirection.Forward);
                        textPointer.MoveToElementEdge(ElementEdge.BeforeEnd);
                    }
                }
                textPointer.MoveToNextContextPosition(LogicalDirection.Forward);
            }
            return(addChild);
        }
Exemplo n.º 6
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.fdrReader = ((System.Windows.Controls.FlowDocumentReader)(target));
     return;
     case 2:
     this.printedPage = ((System.Windows.Documents.FlowDocument)(target));
     return;
     case 3:
     this.mainTbl = ((System.Windows.Documents.Table)(target));
     return;
     case 4:
     this.inDate = ((System.Windows.Documents.Paragraph)(target));
     return;
     case 5:
     this.dueDate = ((System.Windows.Documents.Paragraph)(target));
     return;
     case 6:
     this.topShade = ((System.Windows.Controls.Image)(target));
     return;
     case 7:
     this.middleShade = ((System.Windows.Controls.Image)(target));
     return;
     case 8:
     this.bottomShade = ((System.Windows.Controls.Image)(target));
     return;
     case 9:
     this.teethRowGroup = ((System.Windows.Documents.TableRowGroup)(target));
     return;
     case 10:
     this.comment = ((System.Windows.Documents.Paragraph)(target));
     return;
     case 11:
     
     #line 250 "..\..\..\PrintLab.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Exemplo n.º 7
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.rbGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
     return;
     case 2:
     this.rbL = ((System.Windows.Controls.RadioButton)(target));
     
     #line 17 "..\..\Highscore.xaml"
     this.rbL.Click += new System.Windows.RoutedEventHandler(this.rb_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.rbM = ((System.Windows.Controls.RadioButton)(target));
     
     #line 18 "..\..\Highscore.xaml"
     this.rbM.Click += new System.Windows.RoutedEventHandler(this.rb_Click);
     
     #line default
     #line hidden
     return;
     case 4:
     this.rbS = ((System.Windows.Controls.RadioButton)(target));
     
     #line 19 "..\..\Highscore.xaml"
     this.rbS.Click += new System.Windows.RoutedEventHandler(this.rb_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.highscoreListEasy = ((System.Windows.Controls.FlowDocumentReader)(target));
     return;
     case 6:
     this.winnersListEasy = ((System.Windows.Documents.TableRowGroup)(target));
     return;
     case 7:
     this.highscoreListMedium = ((System.Windows.Controls.FlowDocumentReader)(target));
     return;
     case 8:
     this.winnersListMedium = ((System.Windows.Documents.TableRowGroup)(target));
     return;
     case 9:
     this.highscoreListHard = ((System.Windows.Controls.FlowDocumentReader)(target));
     return;
     case 10:
     this.winnersListHard = ((System.Windows.Documents.TableRowGroup)(target));
     return;
     case 11:
     
     #line 117 "..\..\Highscore.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.clickOK);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Exemplo n.º 8
0
 // Token: 0x060036C5 RID: 14021 RVA: 0x000F5E42 File Offset: 0x000F4042
 internal TableRowCollection(TableRowGroup owner)
 {
     this._rowCollectionInternal = new TableTextElementCollectionInternal <TableRowGroup, TableRow>(owner);
 }
Exemplo n.º 9
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.fdrReader = ((System.Windows.Controls.FlowDocumentReader)(target));
     return;
     case 2:
     this.printedPage = ((System.Windows.Documents.FlowDocument)(target));
     return;
     case 3:
     this.headerInfo = ((System.Windows.Documents.TableRowGroup)(target));
     return;
     case 4:
     this.header = ((System.Windows.Documents.TableRowGroup)(target));
     return;
     case 5:
     this.srvcRow = ((System.Windows.Documents.TableRowGroup)(target));
     return;
     case 6:
     this.tblServices = ((System.Windows.Documents.TableRowGroup)(target));
     return;
     case 7:
     this.Fee = ((System.Windows.Documents.Paragraph)(target));
     return;
     case 8:
     this.cmntRow = ((System.Windows.Documents.TableRowGroup)(target));
     return;
     case 9:
     this.comment = ((System.Windows.Documents.Paragraph)(target));
     return;
     case 10:
     
     #line 85 "..\..\..\VisitPrint.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }