Ejemplo n.º 1
0
        private static void CreateESQuestion(ESQuestion question,
                                             int index,
                                             FlowDocument flowDocument,
                                             bool showAnswer,
                                             bool showResponse,
                                             ESQuestionResponse response)
        {
            System.Windows.Documents.Section questionSection = new System.Windows.Documents.Section();
            flowDocument.Blocks.Add(questionSection);

            System.Windows.Documents.Paragraph questionContentBlock = CreateContentControl(question.Content,
                                                                                           (index + 1).ToString() + ". ",
                                                                                           null,
                                                                                           showResponse ? response : null);

            Paragraph lastParagraph = questionContentBlock;

            lastParagraph.Inlines.AddRange(new LineBreak[] { new LineBreak(), new LineBreak(), new LineBreak() });

            if (showAnswer)
            {
            }

            questionSection.Blocks.Add(questionContentBlock);
        }
Ejemplo n.º 2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ReciplesBox = ((System.Windows.Controls.ListBox)(target));

            #line 17 "..\..\MainWindow.xaml"
                this.ReciplesBox.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.ReciplesBox_MouseDoubleClick);

            #line default
            #line hidden
                return;

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

            case 3:
                this.Photo = ((System.Windows.Controls.Image)(target));
                return;

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

            case 5:
                this.rText = ((System.Windows.Documents.Paragraph)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ChapterNetwork = ((System.Windows.Documents.Run)(target));
                return;

            case 2:
                this.ChapterNodes = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 3:
                this.ChapterEdges = ((System.Windows.Documents.Paragraph)(target));
                return;

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

            case 5:
                this.ChapterOffline = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 6:
                this.ChapterDelete = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 7:
                this.ChapterRouting = ((System.Windows.Documents.Paragraph)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 4
0
        public Paragraph insertSmileys(Paragraph p, string text)
        {
            int lastPos = 0;
            foreach (Match match in _fixSmileyRegex.Matches(text)) {
                if (match.Index != lastPos) {
                    p.Inlines.Add(text.Substring(lastPos, match.Index - lastPos));
                    // Bild hinzufugen falls vorhanden
                    try {
                        BitmapImage bitmapSmiley = new BitmapImage();
                        bitmapSmiley.BeginInit();
                        bitmapSmiley.UriSource = new Uri("pack://application:,,,/Smileys/" + (string)_fixSmileys[match.Value]);
                        bitmapSmiley.EndInit();
                        System.Windows.Controls.Image smiley = new System.Windows.Controls.Image();
                        smiley.Source = bitmapSmiley;
                        smiley.Width = bitmapSmiley.Width;
                        smiley.Height = bitmapSmiley.Height;
                        smiley.SnapsToDevicePixels = true;
                        ImageBehavior.SetAnimatedSource(smiley, bitmapSmiley);
                        p.Inlines.Add(smiley);
                    }
                    catch (FileNotFoundException)
                    {
                        // Loggen file not found

                        // Text einfuegen statt Smiley
                        p.Inlines.Add(match.Value);
                    }
                    lastPos = match.Index + match.Length;
                }
            }
            if (lastPos < text.Length) {
                p.Inlines.Add(text.Substring(lastPos));
            }
            return p;
        }
        private void BindFeatures(List<HalanVersionInfo> products)
        {
            foreach( HalanVersionInfo inf in products ) {

            string v = inf.LatestVersion.ToString(2);

            Paragraph para = new Paragraph();
            para.Inlines.Add(new Bold(new Run(string.Format("{0} v{1}", inf.Product, v))));

            if( inf.ReleaseDate > DateTime.MinValue )
              para.Inlines.Add( new Run(string.Concat(", Released: ", inf.ReleaseDate.ToShortDateString())) );

            tbFeatures.Document.Blocks.Add(para);

            var list = new System.Windows.Documents.List();

            foreach( var f in inf.Features )
              list.ListItems.Add( new ListItem(new Paragraph(new Run(f))) );

            tbFeatures.Document.Blocks.Add(list);

            if( !_url.IsValid() )
              _url = inf.Url;
              }
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.sentMessages = ((System.Windows.Controls.FlowDocumentScrollViewer)(target));
                return;

            case 2:

            #line 15 "..\..\..\..\Controls\ChatTextBox.xaml"
                ((System.Windows.Documents.FlowDocument)(target)).ContextMenuOpening += new System.Windows.Controls.ContextMenuEventHandler(this.FlowDocument_ContextMenuOpening);

            #line default
            #line hidden
                return;

            case 3:
                this.mnuEdit = ((System.Windows.Controls.MenuItem)(target));

            #line 20 "..\..\..\..\Controls\ChatTextBox.xaml"
                this.mnuEdit.Click += new System.Windows.RoutedEventHandler(this.mnuEdit_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.Root = ((System.Windows.Documents.Paragraph)(target));
                return;
            }
            this._contentLoaded = true;
        }
        /// <summary>
        /// This method returns a simple paragraph text of header. 
        /// </summary>
        /// <param name="patternName">The name of pattern we want to display</param>
        /// <param name="hitStart">Start position of our hit</param>
        /// <param name="hitEnd">End position of our hit</param>
        /// <returns>A paragraph of text for our header.</returns>
        static public Paragraph GetRichHeader
                            (String patternName, int hitStart, int hitEnd)
        {
            // Create our bold header bold text.
            Bold myBold = new Bold();
            myBold.Inlines.Add("Sequence Hits Viewer");

            Run myRun2 = new Run();
            myRun2.Text = "================";
            myRun2.Text += NEWLINE;
            myRun2.Text += NEWLINE;
            myRun2.Text += "Matched Start Position : [ " + hitStart + " ]";
            myRun2.Text += NEWLINE;
            myRun2.Text += "Matched End   Position : [ " + hitEnd + " ]";
            myRun2.Text += NEWLINE;
            myRun2.Text += NEWLINE;
            myRun2.Text += "================ " + patternName + " ================";
            myRun2.Text += NEWLINE;

            Paragraph Header = new Paragraph();

            Header.Inlines.Add(myBold);
            Header.Inlines.Add(myRun2);

            return Header;
        }
        public ConversationRendererRichText(IDisplayOptionsReadOnly displayOptions, IConversation conversation)
            : base(displayOptions, conversation)
        {
            _currentParagraph = null;

            _fileSystem = new OsFileSystem();
        }
Ejemplo n.º 9
0
 /// <summary>
 /// Traverses only passed paragraph
 /// </summary>
 /// <param name="p"></param>
 public void TraverseParagraph(Paragraph p)
 {
     if (p.Inlines != null && p.Inlines.Count > 0)
     {
         Inline il = p.Inlines.FirstInline;
         while (il != null)
         {
             Run r = il as Run;
             if (r != null)
             {
                 VisualVisited(this, r, true);
                 il = il.NextInline;
                 continue;
             }
             InlineUIContainer uc = il as InlineUIContainer;
             if (uc != null && uc.Child != null)
             {
                 VisualVisited(this, uc.Child, true);
                 il = il.NextInline;
                 continue;
             }
             Figure fg = il as Figure;
             if (fg != null)
             {
                 TraverseBlockCollection(fg.Blocks);
             }
             il = il.NextInline;
         }
     }
 }
Ejemplo n.º 10
0
		/// <summary>
		/// Converts a readonly TextDocument to a Block and applies the provided highlighter.
		/// </summary>
		public static Block ConvertTextDocumentToBlock(IDocument document, IHighlighter highlighter)
		{
			if (document == null)
				throw new ArgumentNullException("document");
//			Table table = new Table();
//			table.Columns.Add(new TableColumn { Width = GridLength.Auto });
//			table.Columns.Add(new TableColumn { Width = new GridLength(1, GridUnitType.Star) });
//			TableRowGroup trg = new TableRowGroup();
//			table.RowGroups.Add(trg);
			Paragraph p = new Paragraph();
			p.TextAlignment = TextAlignment.Left;
			for (int lineNumber = 1; lineNumber <= document.LineCount; lineNumber++) {
				if (lineNumber > 1)
					p.Inlines.Add(new LineBreak());
				var line = document.GetLineByNumber(lineNumber);
//				TableRow row = new TableRow();
//				trg.Rows.Add(row);
//				row.Cells.Add(new TableCell(new Paragraph(new Run(lineNumber.ToString()))) { TextAlignment = TextAlignment.Right });
//				Paragraph p = new Paragraph();
//				row.Cells.Add(new TableCell(p));
				if (highlighter != null) {
					HighlightedLine highlightedLine = highlighter.HighlightLine(lineNumber);
					p.Inlines.AddRange(highlightedLine.ToRichText().CreateRuns());
				} else {
					p.Inlines.Add(document.GetText(line));
				}
			}
			return p;
		}
Ejemplo n.º 11
0
        public Object Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
        {
            var text = value as String;
            var flowDocument = new FlowDocument();

            if (String.IsNullOrEmpty(text))
                return flowDocument;

            var paragraph = new Paragraph();

            using (var reader = new StringReader(text))
            {
                String line;

                while ((line = reader.ReadLine()) != null)
                {
                    if (line.StartsWith("+++") || 
                        line.StartsWith("---") || 
                        line.StartsWith("diff ", StringComparison.OrdinalIgnoreCase))
                        continue;

                    paragraph.Inlines.Add(BuildLine(line));
                    paragraph.Inlines.Add(new LineBreak());
                }
            }

            return paragraph.Inlines;
        }
Ejemplo n.º 12
0
		public Paragraph CreateDiffTextForDisplay(string diffText)
		{
			Paragraph diffParagraph = new Paragraph();

			string[] lines = diffText.Split(new string[] { "\n", "\r\n" }, StringSplitOptions.None);

			foreach (string line in lines)
			{
				if (line.StartsWith("+"))
				{
					diffParagraph.Inlines.Add(new AddTextRun(line));
				}
				else if (line.StartsWith("-"))
				{
					diffParagraph.Inlines.Add(new DeleteTextRun(line));
				}
				else if (line.StartsWith("@@"))
				{
					diffParagraph.Inlines.Add(new LineBreak());
					diffParagraph.Inlines.Add(new LineNumberTextRun(line));
				}
				else
				{
					diffParagraph.Inlines.Add(new Run(line));
				}
				diffParagraph.Inlines.Add(new LineBreak());
			}

			return diffParagraph;
		}
Ejemplo n.º 13
0
        public static FrameworkContentElement LoadDataTemplate(DataTemplate dataTemplate)
        {
            var content = dataTemplate.LoadContent();
            if (content is Fragment)
            {
                return ((Fragment)content).Content;
            }
            else if (content is TextBlock)
            {
                var inlines = ((TextBlock)content).Inlines;
                if (inlines.Count == 1)
                    return inlines.FirstInline;
                else
                {
                    var paragraph = new Paragraph();
                    // we can't use an enumerator, since adding an inline removes it from its collection
                    while (inlines.FirstInline != null)
                        paragraph.Inlines.Add(inlines.FirstInline);

                    return paragraph;
                }
            }
            else
            {
                throw new Exception("Data template needs to contain a <Fragment> or <TextBlock>");
            }
        }
Ejemplo n.º 14
0
 public static Paragraph AddParagraph(this FlowDocument doc, string text)
 {
     var par = new Paragraph();
     par.Inlines.Add(text);
     doc.Blocks.Add(par);
     return par;
 }
Ejemplo n.º 15
0
 private static Doc.Paragraph CreateParagraph()
 {
     Doc.Paragraph paragraph = new Doc.Paragraph();
     paragraph.TextAlignment = TextAlignment.Left;
     paragraph.Margin        = new Thickness(0);
     return(paragraph);
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.codeLabel = ((System.Windows.Controls.TextBox)(target));
                return;

            case 2:
                this.codeView = ((System.Windows.Documents.FlowDocument)(target));
                return;

            case 3:
                this.main = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 4:
                this.deps2Label = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.metaDataView = ((System.Windows.Documents.FlowDocument)(target));
                return;

            case 6:
                this.metaDataText = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 7:
                this.exitButton = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 17
0
        public about()
        {
            InitializeComponent();
            aboutBox.AddHandler(Hyperlink.RequestNavigateEvent, new RequestNavigateEventHandler(RequestNavigateHandler));
            // Create a FlowDocument to contain content for the RichTextBox.
            FlowDocument myFlowDoc = new FlowDocument();

            // Add paragraphs to the FlowDocument.

            Hyperlink oskarGithub = new Hyperlink();
            oskarGithub.Inlines.Add("github");
            oskarGithub.NavigateUri = new Uri("https://github.com/oskarp/redminetimetask");

            Hyperlink redmineLib = new Hyperlink();
            redmineLib.Inlines.Add("Redmine-net-api");
            redmineLib.NavigateUri = new Uri("https://github.com/zapadi/redmine-net-api");

            // Create a paragraph and add the Run and hyperlink to it.
            Paragraph mePa = new Paragraph();
            mePa.Inlines.Add("This project is open source and hosted at ");
            mePa.Inlines.Add(oskarGithub);
            myFlowDoc.Blocks.Add(mePa);

            Paragraph redminePa = new Paragraph();
            redminePa.Inlines.Add("We use ");
            redminePa.Inlines.Add(redmineLib);
            redminePa.Inlines.Add(" for the redmine communication.");
            myFlowDoc.Blocks.Add(redminePa);

            // Add initial content to the RichTextBox.
            aboutBox.Document = myFlowDoc;
        }
Ejemplo n.º 18
0
        private static void CreateFIBQuestion(FIBQuestion question,
                                              int index,
                                              FlowDocument flowDocument,
                                              bool showAnswer,
                                              bool showResponse,
                                              FIBQuestionResponse response)
        {
            System.Windows.Documents.Section questionSection = new System.Windows.Documents.Section();
            flowDocument.Blocks.Add(questionSection);

            System.Windows.Documents.Paragraph questionContentBlock = CreateContentControl(question.Content,
                                                                                           (index + 1).ToString() + ". ",
                                                                                           null,
                                                                                           showResponse ? response : null);
            Paragraph lastParagraph = questionContentBlock;

            if (showAnswer)
            {
                lastParagraph.Inlines.Add(CreateText("。   正确答案:"));
                foreach (QuestionBlank blank in question.QuestionBlankCollection)
                {
                    lastParagraph.Inlines.Add(CreateText(blank.ReferenceAnswerList[0].Content + "  "));
                }
            }

            questionSection.Blocks.Add(questionContentBlock);
        }
Ejemplo n.º 19
0
        public Action AddToFlowDocument(IResumeDataObject rdo, IResumeFormatObject rfo, Win.FlowDocument flowDoc)
        {
            return(() =>
            {
                var list = new List <Win.Block>();

                if (rdo.PublicationEntities != null && rdo.PublicationEntities.Count > 0)
                {
                    Win.Paragraph pubTitle = new Win.Paragraph(new Win.Run("Publications"));
                    pubTitle.Foreground = rfo.HeaderColorBrush;
                    pubTitle.FontFamily = new FontFamily(rfo.HeaderFontName);
                    pubTitle.FontSize = rfo.HeaderFontSizeWindows;
                    pubTitle.Margin = rfo.HeaderMargin;
                    list.Add(pubTitle);

                    foreach (var item in rdo.PublicationEntities)
                    {
                        Win.Paragraph pItem = new Win.Paragraph();
                        pItem.Inlines.Add(new Win.Run(item.Publication));
                        pItem.FontFamily = new FontFamily(rfo.BodyFontName);
                        pItem.FontSize = rfo.BodyFontSizeWindows;
                        list.Add(pItem);
                    }
                }

                foreach (var item in list)
                {
                    flowDoc.Blocks.Add(item);
                }
            });
        }
        private void BindFeatures(List<HalanVersionInfo> products)
        {
            foreach( HalanVersionInfo inf in products ) {

            string title = string.Format("{0} {1}.{2:D2}", inf.Product.Replace("ServiceBusMQManager", "Service Bus MQ Manager"),
                                                        inf.LatestVersion.Major, inf.LatestVersion.Minor);

            Paragraph para = new Paragraph();
            para.Inlines.Add(new Bold(
                               new Run(title) { FontSize = 19 } ));

            if( inf.ReleaseDate > DateTime.MinValue )
              para.Inlines.Add( new Run(string.Concat(", Released: ", inf.ReleaseDate.ToShortDateString())) );

            tbFeatures.Document.Blocks.Add(para);

            var list = new System.Windows.Documents.List();

            foreach( var f in inf.Features )
              list.ListItems.Add( new ListItem(new Paragraph(new Run(f))) );

            tbFeatures.Document.Blocks.Add(list);

            if( !_url.IsValid() )
              _url = inf.Url;
              }
        }
Ejemplo n.º 21
0
        //Смена значений RTB при клике по таблицам
        private void dataGridView1_SelectonChanged(object sender, RoutedEventArgs e)
        {
            //Заполняем SymptomsInfoRichTextBox
            FlowDocument document = new FlowDocument();

            System.Windows.Documents.Paragraph paragraph = new System.Windows.Documents.Paragraph();
            TextBlock Symptomtextblock = dataGridView1.Columns[1].GetCellContent(dataGridView1.SelectedItem) as TextBlock;

            paragraph.Inlines.Add(new System.Windows.Documents.Run(Symptomtextblock.Text));
            document.Blocks.Add(paragraph);
            SymptomsInfoRichTextBox.Document = document;

            //Заполняем DiagnosInfoRichTextBox
            FlowDocument document2 = new FlowDocument();

            System.Windows.Documents.Paragraph paragraph2 = new System.Windows.Documents.Paragraph();
            TextBlock Diagnostextblock = dataGridView1.Columns[2].GetCellContent(dataGridView1.SelectedItem) as TextBlock;

            paragraph2.Inlines.Add(new System.Windows.Documents.Run(Diagnostextblock.Text));
            document2.Blocks.Add(paragraph2);
            DiagnosInfoRichTextBox.Document = document2;

            //Заполняем HealingInfoRichTextBox
            FlowDocument document3 = new FlowDocument();

            System.Windows.Documents.Paragraph paragraph3 = new System.Windows.Documents.Paragraph();
            TextBlock Healingtextblock = dataGridView1.Columns[3].GetCellContent(dataGridView1.SelectedItem) as TextBlock;

            paragraph3.Inlines.Add(new System.Windows.Documents.Run(Healingtextblock.Text));
            document3.Blocks.Add(paragraph3);
            HealingInfoRichTexBox.Document = document3;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.TextColumn = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 2:
                this.ScoreColumn = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 3:
                this.Score = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.ScoreSlider = ((System.Windows.Controls.Slider)(target));
                return;

            case 5:
                this.ExerciseTextBox = ((System.Windows.Controls.RichTextBox)(target));
                return;

            case 6:
                this.ExerciseTextBoxPlayer = ((System.Windows.Documents.Paragraph)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 23
0
        private void cmdCreateDynamicDocument_Click(object sender, RoutedEventArgs e)
        {
            // Create first part of sentence.
            Run runFirst = new Run();
            runFirst.Text = "Hello world of ";

            // Create bolded text.
            Bold bold = new Bold();
            Run runBold = new Run();
            runBold.Text = "dynamically generated";
            bold.Inlines.Add(runBold);

            // Create last part of sentence.
            Run runLast = new Run();
            runLast.Text = " documents";

            // Add three parts of sentence to a paragraph, in order.
            Paragraph paragraph = new Paragraph();
            paragraph.Inlines.Add(runFirst);
            paragraph.Inlines.Add(bold);
            paragraph.Inlines.Add(runLast);

            // Create a document and add this paragraph.
            FlowDocument document = new FlowDocument();
            document.Blocks.Add(paragraph);

            // Show the document.
            docViewer.Document = document;
        }
Ejemplo n.º 24
0
        public object Convert()
        {
            FlowDocument flowdoc = new FlowDocument();

            //For Each p As OpenXmlPart In OpenXMLFile.MainDocumentPart.
            //Next
            flowdoc.PageWidth  = 816;
            flowdoc.PageHeight = 1056;
            DocumentFormat.OpenXml.Wordprocessing.Body body = OpenXMLFile.MainDocumentPart.Document.Body;
            foreach (DocumentFormat.OpenXml.OpenXmlElement oxmlobject in body.ChildElements)
            {
                DocumentFormat.OpenXml.Wordprocessing.Paragraph par = oxmlobject as DocumentFormat.OpenXml.Wordprocessing.Paragraph;
                if (par != null)
                {
                    System.Windows.Documents.Paragraph p = new System.Windows.Documents.Paragraph();
                    flowdoc.Blocks.Add(p);
                    foreach (DocumentFormat.OpenXml.OpenXmlElement paroxmlobject in par.ChildElements)
                    {
                        DocumentFormat.OpenXml.Wordprocessing.Run ru = paroxmlobject as DocumentFormat.OpenXml.Wordprocessing.Run;
                        if (ru != null)
                        {
                            System.Windows.Documents.Run r = new System.Windows.Documents.Run();
                            r.Text = ru.InnerText;
                            p.Inlines.Add(r);
                        }
                    }
                    //flowdoc.ContentStart.InsertTextInRun(par.InnerText)
                }
            }
            return(flowdoc);
        }
Ejemplo n.º 25
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.codeLabel = ((System.Windows.Controls.TextBox)(target));
                return;

            case 2:
                this.codeView = ((System.Windows.Documents.FlowDocument)(target));
                return;

            case 3:
                this.main = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 4:
                this.exitButton = ((System.Windows.Controls.Button)(target));

            #line 62 "..\..\Window1.xaml"
                this.exitButton.Click += new System.Windows.RoutedEventHandler(this.exitButton_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 26
0
        private void SetException(Exception exception)
        {
            string path = Path.Combine(Constant.DataDirectory, Log.DirectoryName, Constant.Version);
            var directory = new DirectoryInfo(path);
            var log = directory.GetFiles().OrderByDescending(f => f.LastWriteTime).First();

            var paragraph  = Hyperlink("Please open new issue in: " , Constant.Issue);
            paragraph.Inlines.Add($"1. upload log file: {log.FullName}\n");
            paragraph.Inlines.Add($"2. copy below exception message");
            ErrorTextbox.Document.Blocks.Add(paragraph);

            StringBuilder content = new StringBuilder();
            content.AppendLine($"Wox version: {Constant.Version}");
            content.AppendLine($"OS Version: {Environment.OSVersion.VersionString}");
            content.AppendLine($"IntPtr Length: {IntPtr.Size}");
            content.AppendLine($"x64: {Environment.Is64BitOperatingSystem}");
            content.AppendLine($"Python Path: {Constant.PythonPath}");
            content.AppendLine($"Everything SDK Path: {Constant.EverythingSDKPath}");
            content.AppendLine($"Date: {DateTime.Now.ToString(CultureInfo.InvariantCulture)}");
            content.AppendLine("Exception:");
            content.AppendLine(exception.Source);
            content.AppendLine(exception.GetType().ToString());
            content.AppendLine(exception.Message);
            content.AppendLine(exception.StackTrace);
            paragraph = new Paragraph();
            paragraph.Inlines.Add(content.ToString());
            ErrorTextbox.Document.Blocks.Add(paragraph);
        }
Ejemplo n.º 27
0
        public PopupExceptionWindow()
        {
            InitializeComponent();
            this.MinWidth = 200;
            this.MaxWidth = 500;
            this.LayoutRoot_R1C0.Height = new GridLength(0);//︾︽
            //this.txtMessage.MaxWidth = 500;
            this.richTxtMessage.MaxWidth = 500;
            this.richTxtMessage.MaxHeight = 100;

            //this.txtStack.MaxWidth = 500;
            //this.txtStack.Visibility = Visibility.Collapsed;
            this.richTxtStack.MaxWidth = 500;
            this.richTxtStack.MaxHeight = 200;
            this.richTxtStack.Visibility = Visibility.Collapsed;
            this.richTxtStack.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;

            System.Windows.Documents.Run run1 = new Run();
            run1.Text = "";
            Paragraph Paragraph1 = new Paragraph();
            Paragraph1.Inlines.Add(run1);
            this.richTxtMessage.Blocks.Add(Paragraph1);

            run1 = new Run();
            run1.Text = "";
            Paragraph1 = new Paragraph();
            Paragraph1.Inlines.Add(run1);
            this.richTxtStack.Blocks.Add(Paragraph1);
        }
Ejemplo n.º 28
0
        private void SetListItems()
        {
            foreach (XElement clientElement in this.m_ShipmentElement.Element("ClientOrderCollection").Elements("ClientOrder"))
            {
                Run nameblock = new Run("Patient: " + clientElement.Element("PatientName").Value + "   Birthdate: " + clientElement.Element("PBirthdate").Value);
                nameblock.FontSize = 12;
                Paragraph clientParagraph = new Paragraph(nameblock);
                clientParagraph.Padding = new Thickness(50, 10, 0, 10);
                ListItem listitem = new ListItem(clientParagraph);
                this.DetailsList.ListItems.Add(listitem);

                foreach (XElement specimenElement in clientElement.Element("ClientOrderDetailCollection").Elements("ClientOrderDetail"))
                {
                    Run lineOne = new Run(specimenElement.Element("ContainerId").Value + "   Collected: " + specimenElement.Element("CollectionDate").Value);
                    lineOne.FontSize = 12;
                    Paragraph paragraphOne = new Paragraph(lineOne);
                    paragraphOne.Padding = new Thickness(55, 10, 0, 10);
                    ListItem listOne = new ListItem(paragraphOne);
                    this.DetailsList.ListItems.Add(listOne);

                    Run lineTwo = new Run(specimenElement.Element("Description").Value + "   By: " + specimenElement.Element("OrderedBy").Value);
                    lineTwo.FontSize = 12;
                    Paragraph paragraphTwo = new Paragraph(lineTwo);
                    paragraphTwo.Padding = new Thickness(55, 10, 0, 10);
                    ListItem listTwo = new ListItem(paragraphTwo);
                    this.DetailsList.ListItems.Add(listTwo);
                }
            }
        }
Ejemplo n.º 29
0
		public static Block ConvertTextDocumentToBlock(TextDocument document, IHighlighter highlighter)
		{
			if (document == null)
				throw new ArgumentNullException("document");
//			Table table = new Table();
//			table.Columns.Add(new TableColumn { Width = GridLength.Auto });
//			table.Columns.Add(new TableColumn { Width = new GridLength(1, GridUnitType.Star) });
//			TableRowGroup trg = new TableRowGroup();
//			table.RowGroups.Add(trg);
			Paragraph p = new Paragraph();
			foreach (DocumentLine line in document.Lines) {
				int lineNumber = line.LineNumber;
//				TableRow row = new TableRow();
//				trg.Rows.Add(row);
//				row.Cells.Add(new TableCell(new Paragraph(new Run(lineNumber.ToString()))) { TextAlignment = TextAlignment.Right });
				HighlightedInlineBuilder inlineBuilder = new HighlightedInlineBuilder(document.GetText(line));
				if (highlighter != null) {
					HighlightedLine highlightedLine = highlighter.HighlightLine(lineNumber);
					int lineStartOffset = line.Offset;
					foreach (HighlightedSection section in highlightedLine.Sections)
						inlineBuilder.SetHighlighting(section.Offset - lineStartOffset, section.Length, section.Color);
				}
//				Paragraph p = new Paragraph();
//				row.Cells.Add(new TableCell(p));
				p.Inlines.AddRange(inlineBuilder.CreateRuns());
				p.Inlines.Add(new LineBreak());
			}
			return p;
		}
    public static FlowDocument ColorizeXAML( string xamlText, FlowDocument targetDoc )
    {
      XmlTokenizer tokenizer = new XmlTokenizer();
      XmlTokenizerMode mode = XmlTokenizerMode.OutsideElement;

      List<XmlToken> tokens = tokenizer.Tokenize( xamlText, ref mode );
      List<string> tokenTexts = new List<string>( tokens.Count );
      List<Color> colors = new List<Color>( tokens.Count );
      int position = 0;
      foreach( XmlToken token in tokens )
      {
        string tokenText = xamlText.Substring( position, token.Length );
        tokenTexts.Add( tokenText );
        Color color = ColorForToken( token, tokenText );
        colors.Add( color );
        position += token.Length;
      }

      Paragraph p = new Paragraph();

      // Loop through tokens
      for( int i = 0; i < tokenTexts.Count; i++ )
      {
        Run r = new Run( tokenTexts[ i ] );
        r.Foreground = new SolidColorBrush( colors[ i ] );
        p.Inlines.Add( r );
      }

      targetDoc.Blocks.Add( p );

      return targetDoc;
    }
 private static void AddTextToRTF(FlowDocument myFlowDoc, string text)
 {
     var para = new Paragraph();
     var run = new Run(text);
     para.Inlines.Add(run);
     myFlowDoc.Blocks.Add(para);
 }
Ejemplo n.º 32
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var text = value as string;
            if (text == null) throw new ArgumentException("Value must be of type string.");
            var fd = new FlowDocument();
            var paragraph = new Paragraph();
            var splitText = text.Split(' ');
            foreach (var word in splitText)
            {
                Uri uri;
                bool result = Uri.TryCreate(word, UriKind.Absolute, out uri) && uri.Scheme == Uri.UriSchemeHttp;
                if (result)
                {
                    var hl = new Hyperlink();
                    hl.Inlines.Add(uri.AbsoluteUri);
                    hl.NavigateUri = uri;
                    paragraph.Inlines.Add(hl);
                    paragraph.Inlines.Add(" ");
                }
                else
                {
                    paragraph.Inlines.Add(word);
                    paragraph.Inlines.Add(" ");
                }
            }

            fd.Blocks.Add(paragraph);

            return fd;
        }
Ejemplo n.º 33
0
        private static void OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RichTextBox richTextBox = d as RichTextBox;
            if (richTextBox == null)
                return;

            HtmlDocument content = (HtmlDocument)e.NewValue;
            if (content == null)
                return;

            var HyperlinkForeground = Application.Current.Resources["DefaultGreenBrush"] as SolidColorBrush;
            if (HyperlinkForeground == null)
                HyperlinkForeground = new SolidColorBrush(Color.FromArgb(255, 245, 222, 179));

            richTextBox.Blocks.Clear();
            var p = new Paragraph();
            foreach (var item in content.DocumentNode.ChildNodes)
            {
                var r = new Run();
                if (item.NodeType == HtmlNodeType.Element)
                    r.Foreground = HyperlinkForeground;
                else
                    r.Foreground = richTextBox.Foreground;

                r.Text = item.InnerText;
                p.Inlines.Add(r);
            }
            richTextBox.Blocks.Add(p);


        }
Ejemplo n.º 34
0
 public Paragraph parse(string message)
 {
     Paragraph p = new Paragraph();
     p.LineHeight = 1;
     DateTime today = DateTime.Now;
     p.Inlines.Add("(" + today.ToString("HH:mm:ss") + ") ");
     int lastPos = 0;
     foreach (Match match in _regexUrl.Matches(message.Replace(Environment.NewLine,"")))
     {
         if (match.Index != lastPos) {
             // parse smileys before hyperlink
             p = _smiley.insertSmileys(p, message.Substring(lastPos, match.Index - lastPos));
             lastPos = match.Index + match.Length;
             // parse hyperlink
             Hyperlink textLink = new Hyperlink(new Run(match.Value));
             textLink.NavigateUri = new Uri(match.Value);
             textLink.RequestNavigate += new System.Windows.Navigation.RequestNavigateEventHandler(_openHyperlink);
             p.Inlines.Add(textLink);
             lastPos = match.Index + match.Length;
         }
     }
     // wenn text noch nicht zu ende, noch mal nach smileys schauen
     p = _smiley.insertSmileys(p, message.Substring(lastPos));
     return p;
 }
 public RichTextBoxAppender(RichTextBox textbox)
 {
     _richtextBox = textbox;
     _paragraph = new Paragraph();
     Layout = CreateLogLayout();
     Document.Blocks.Add(_paragraph);
 }
        private void UpdateInlines()
        {
            if (this.HightlightedText == null || this.Text == null)
            {
                return;
            }

            var p = new Paragraph();
            var parts = this.Text.Split(new[] { this.HightlightedText }, StringSplitOptions.None);
            for (var i = 0; i < parts.Length; ++i)
            {
                if (i != 0)
                {
                    p.Inlines.Add(new Run()
                    {
                        Text = this.HightlightedText,
                        Background = Brushes.Yellow,
                    });
                }

                p.Inlines.Add(new Run()
                {
                    Text = parts[i],
                    Background = Brushes.Transparent,
                });
            }
            this.TextBlock.Document = new FlowDocument(p);
        }
Ejemplo n.º 37
0
 public static FlowDocument MakeFlowDocument(string eugenstr, System.Windows.Media.Brush specialColor)
 {
     FlowDocument document = new FlowDocument();
     int i = 0;
     string[] parts = eugenstr.Split(GREEN_TAG, StringSplitOptions.None);
     if (parts.Length > 1)
     {
         Paragraph paragraph = new Paragraph();
         while (i < parts.Length)
         {
             if (i % 2 == 0)
             {
                 Span normalspan = new Span(new Run(parts[i].Replace("#styleGreen", string.Empty)));
                 paragraph.Inlines.Add(normalspan);
             }
             else
             {
                 Span coloredSpan = new Span(new Run(parts[i]));
                 coloredSpan.Foreground = specialColor;
                 paragraph.Inlines.Add(coloredSpan);
             }
             i++;
         }
         document.Blocks.Add(paragraph);
     }
     else { Paragraph paragraph = new Paragraph(new Run(eugenstr)); document.Blocks.Add(paragraph); }
     return document;
 }
Ejemplo n.º 38
0
        public Block CreateDataList()
        {
            var list = new List {MarkerStyle = TextMarkerStyle.None};
            foreach (var sug in this._groups.OrderByDescending(x=>x.Count))
            {
                var p = new Paragraph();

                p.Inlines.Add(new Run(new string('▄', sug.Count)));
                p.Inlines.Add(new LineBreak());

                p.Inlines.Add(new Run(sug.SuggestionItems.First().Text) { FontWeight = FontWeights.Bold });
                p.Inlines.Add(new LineBreak());

                if (sug.SuggestionItems.Count > 1)
                {
                    p.Inlines.Add(new Run("Synonyme: "));
                    p.Inlines.Add(new Run(sug.SuggestionItems.Skip(1).First().Text) { FontStyle = FontStyles.Italic });
                    foreach (var syn in sug.SuggestionItems.Skip(2))
                    {
                        p.Inlines.Add(new Run(", "));
                        p.Inlines.Add(new Run(syn.Text) { FontStyle = FontStyles.Italic });
                    }
                    p.Inlines.Add(new LineBreak());
                }

                p.Inlines.Add(new Run("Anzahl: "));
                p.Inlines.Add(new Run(sug.Count.ToString()) { FontWeight = FontWeights.Bold });
                p.Inlines.Add(new LineBreak());

                var li = new ListItem();
                li.Blocks.Add(p);
                list.ListItems.Add(li);
            }
            return list;
        }
Ejemplo n.º 39
0
        private void InitBox()
        {
            msgBox.Document.Blocks.Clear();
            paragraph = new Paragraph();

            msgBox.Document.Blocks.Add(paragraph);
        }
Ejemplo n.º 40
0
        public static FlowDocument CreateTemplateDocument(string pattern, Dictionary<string, ParamValue> parameters, ArrayList lines)
        {
            FlowDocument document = new FlowDocument();

            Paragraph paragraph = new Paragraph();
            foreach (string line in lines)
            {
                  MatchCollection matchReturn = Regex.Matches(line, pattern);
                if (matchReturn.Count != 0)
                {
                    int index = 0;
                    foreach (Match match in matchReturn)
                    {
                        paragraph.Inlines.Add(new Run(line.Substring(index, match.Index - index)));
                        index = match.Index + match.Length;

                        TextBlock textBlock = new TextBlock();
                        parameters[match.Value].TextControl.Add(textBlock);
                        textBlock.Text = parameters[match.Value].Value;
                        textBlock.Background = Brushes.Green;
                        paragraph.Inlines.Add(textBlock);
                    }
                    paragraph.Inlines.Add(new Run(line.Substring(index, line.Length - index)));
                }
                else
                {
                    paragraph.Inlines.Add(new Run(line));
                }
                paragraph.Inlines.Add(new LineBreak());
            }
            document.Blocks.Add(paragraph);

            return document;
        }
Ejemplo n.º 41
0
 public static void InvalidUinMsg(Window owner, string uin)
 {
     Paragraph paragraph = new Paragraph();
     AddNormalText(paragraph.Inlines, Global.InvalidUinMsg);
     AddLinkText(paragraph.Inlines, "[详情请点击]", new HyperLinkObj_Url(string.Format("http://exp.qq.com/cgi-bin/present/tec_cgi_index?source_flag=0&uin={0}", uin)));
     IAMessageBox.Show(owner, paragraph.Inlines, "QQ");
 }
Ejemplo n.º 42
0
        public ZTextBufferWindow(ZWindowManager manager, FontAndColorService fontAndColorService)
            : base(manager, fontAndColorService)
        {
            this.normalFontFamily = new FontFamily("Cambria");
            this.fixedFontFamily = new FontFamily("Consolas");

            var zero = new FormattedText(
                textToFormat: "0",
                culture: CultureInfo.InstalledUICulture,
                flowDirection: FlowDirection.LeftToRight,
                typeface: new Typeface(normalFontFamily, FontStyles.Normal, FontWeights.Normal, FontStretches.Normal),
                emSize: this.FontSize,
                foreground: Brushes.Black);

            this.fontCharSize = new Size(zero.Width, zero.Height);

            this.document = new FlowDocument
            {
                FontFamily = normalFontFamily,
                FontSize = this.FontSize,
                PagePadding = new Thickness(8.0)
            };

            this.paragraph = new Paragraph();
            this.document.Blocks.Add(this.paragraph);

            this.scrollViewer = new FlowDocumentScrollViewer
            {
                FocusVisualStyle = null,
                Document = this.document
            };

            this.Children.Add(this.scrollViewer);
        }
Ejemplo n.º 43
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.BrowseWindowPara = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 2:
                this.DependentsVw = ((System.Windows.Controls.ListBox)(target));
                return;

            case 3:
                this.CategoriesVw = ((System.Windows.Controls.ListBox)(target));
                return;

            case 4:
                this.DescriptionVw = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.FileStatus = ((System.Windows.Controls.Label)(target));
                return;

            case 6:

            #line 28 "..\..\..\BrowseWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Exit_ButtonClick);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 44
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.nr = ((System.Windows.Documents.Paragraph)(target));
         return;
     }
     this._contentLoaded = true;
 }
Ejemplo n.º 45
0
 private void SetRTBText(RichTextBox a_rtb)
 {
     a_rtb.Document.Blocks.Clear();
     if (!Clipboard.ContainsText())
     {
         return;
     }
     System.Windows.Documents.Paragraph prg = new System.Windows.Documents.Paragraph();
     prg.Inlines.Add(Clipboard.GetText());
     a_rtb.Document.Blocks.Add(prg);
 }
Ejemplo n.º 46
0
        /// <summary>
        /// Converts the paragraph.
        /// </summary>
        /// <param name="pgh">The PGH.</param>
        /// <param name="ils">The ils.</param>
        /// <param name="FontName">Name of the font.</param>
        /// <param name="Size">The size.</param>
        /// <returns></returns>
        public static InlineString ConvertParagraph(System.Windows.Documents.Paragraph pgh, InlineString ils, string FontName, decimal Size)
        {
            if (ils == null)
            {
                ils = new InlineString();
            }

            foreach (Inline ilSpan in pgh.Inlines)
            {
                if (ilSpan.GetType() == typeof(Span))
                {
                    Span sp = (Span)ilSpan;

                    foreach (object obj in sp.Inlines)
                    {
                        if (obj.GetType() == typeof(System.Windows.Documents.Run))
                        {
                            System.Windows.Documents.Run rn = (System.Windows.Documents.Run)obj;

                            List <OpenXmlLeafElement> DecorationList = new List <OpenXmlLeafElement>();

                            FontName fn = new FontName {
                                Val = FontName
                            };
                            FontSize fs = new FontSize {
                                Val = (double)Size
                            };
                            //Font.FontFamilyNumbering = new FontFamilyNumbering { Val = 2 };

                            if (rn.FontStyle == FontStyles.Italic)
                            {
                                DecorationList.Add(new DocumentFormat.OpenXml.Spreadsheet.Italic());
                            }

                            if (sp.TextDecorations.Contains(TextDecorations.Underline.First()))
                            {
                                DecorationList.Add(new DocumentFormat.OpenXml.Spreadsheet.Underline());
                            }

                            if (rn.FontWeight == FontWeights.Bold)
                            {
                                DecorationList.Add(new DocumentFormat.OpenXml.Spreadsheet.Bold());
                            }

                            ils.AppendChild(NewRunText(rn.Text, DecorationList, fn, fs));
                        }
                    }
                }
            }

            return(ils);
        }
Ejemplo n.º 47
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.border1 = ((System.Windows.Controls.Border)(target));
                return;

            case 2:
                this.button1 = ((System.Windows.Controls.Button)(target));

            #line 24 "..\..\Window1.xaml"
                this.button1.Click += new System.Windows.RoutedEventHandler(this.button1_Click);

            #line default
            #line hidden
                return;

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

            #line 27 "..\..\Window1.xaml"
                this.button2.Click += new System.Windows.RoutedEventHandler(this.button2_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.grid1 = ((System.Windows.Controls.Grid)(target));
                return;

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

            case 6:
                this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 7:
                this.Flow2 = ((System.Windows.Documents.FlowDocument)(target));
                return;

            case 8:
                this.Para2 = ((System.Windows.Documents.Paragraph)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 48
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.rtb = ((System.Windows.Controls.RichTextBox)(target));
     return;
     case 2:
     this.paragraph = ((System.Windows.Documents.Paragraph)(target));
     return;
     case 3:
     this.txt = ((System.Windows.Documents.Run)(target));
     return;
     }
     this._contentLoaded = true;
 }
Ejemplo n.º 49
0
        public Action AddToFlowDocument(IResumeDataObject rdo, IResumeFormatObject rfo, Win.FlowDocument flowDoc)
        {
            return(() =>
            {
                var para = new Win.Paragraph(new Win.Run(rdo.FullName));

                para.FontSize = rfo.NameFontSizeWindows;
                para.Foreground = rfo.NameColorBrush;
                para.TextAlignment = TextAlignment.Center;
                para.FontFamily = new FontFamily(rfo.NameFontName);
                para.Margin = rfo.HeaderMargin;

                flowDoc.Blocks.Add(para);
            });
        }
Ejemplo n.º 50
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.GridSplitterRow = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 2:
                this.GridSplitterRow2 = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 3:
                this.groupBox = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 4:
                this.Resources = ((System.Windows.Controls.WrapPanel)(target));
                return;

            case 5:
                this.Clear = ((System.Windows.Controls.Button)(target));
                return;

            case 6:
                this.tabControl = ((System.Windows.Controls.TabControl)(target));
                return;

            case 7:
                this.richTextBox = ((System.Windows.Controls.RichTextBox)(target));
                return;

            case 8:
                this.Paragraph = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 9:
                this.CompiledDSC = ((System.Windows.Documents.Run)(target));
                return;

            case 10:
                this.groupBox2 = ((System.Windows.Controls.GroupBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.codeLable = ((System.Windows.Controls.TextBox)(target));
                return;

            case 2:
                this.codeView = ((System.Windows.Documents.FlowDocument)(target));
                return;

            case 3:
                this.main = ((System.Windows.Documents.Paragraph)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 52
0
        public Action AddToFlowDocument(IResumeDataObject rdo, IResumeFormatObject rfo, Win.FlowDocument flowDoc)
        {
            return(() =>
            {
                var listOfCats = new List <Win.Paragraph>();

                // Add the "Expertise" legend
                if (rdo.ExpertiseEntities.Count > 0)
                {
                    Win.Paragraph header = new Win.Paragraph();
                    header.Inlines.Add("Expertise");

                    header.FontFamily = new FontFamily(rfo.HeaderFontName);
                    header.FontSize = rfo.HeaderFontSizeWindows;
                    header.Foreground = rfo.HeaderColorBrush;
                    header.Margin = rfo.HeaderMargin;

                    listOfCats.Add(header);
                }

                List <string> cats = rdo.ExpertiseEntities.Select(T => T.Category).Distinct().ToList();
                for (int i = 0; i < cats.Count; i++)
                {
                    Win.Paragraph p = new Win.Paragraph();
                    p.Inlines.Add(new Win.Bold(new Win.Run(cats[i] + ": ")));
                    List <string> expItems = rdo.ExpertiseEntities.Where(T => T.Category == cats[i]).Select(T => T.Expertise).ToList();
                    string s = string.Empty;
                    for (int j = 0; j < expItems.Count; j++)
                    {
                        s += (expItems[j] + " " + itemSeparator + " ");
                    }
                    s = s.Remove(s.Length - 3);
                    p.Inlines.Add(s);
                    p.FontFamily = new FontFamily(rfo.BodyFontName);
                    p.FontSize = rfo.BodyFontSizeWindows;
                    listOfCats.Add(p);
                }

                foreach (var item in listOfCats)
                {
                    flowDoc.Blocks.Add(item);
                }
            });
        }
Ejemplo n.º 53
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.btnGetText = ((System.Windows.Controls.Button)(target));

            #line 12 "..\..\RikasTeksti.xaml"
                this.btnGetText.Click += new System.Windows.RoutedEventHandler(this.btnGetText_Click);

            #line default
            #line hidden
                return;

            case 2:
                this.btnSetText = ((System.Windows.Controls.Button)(target));

            #line 13 "..\..\RikasTeksti.xaml"
                this.btnSetText.Click += new System.Windows.RoutedEventHandler(this.btnSetText_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.txtStatus = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.rtbEditor = ((System.Windows.Controls.RichTextBox)(target));

            #line 18 "..\..\RikasTeksti.xaml"
                this.rtbEditor.SelectionChanged += new System.Windows.RoutedEventHandler(this.rtbEditor_SelectionChanged);

            #line default
            #line hidden
                return;

            case 5:
                this.kpl = ((System.Windows.Documents.Paragraph)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 54
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.codeLabel = ((System.Windows.Controls.TextBox)(target));
                return;

            case 2:
                this.codeView = ((System.Windows.Documents.FlowDocument)(target));
                return;

            case 3:
                this.main = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 4:
                this.dstat = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.dauth = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.ddate = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.dcat = ((System.Windows.Controls.TextBox)(target));
                return;

            case 8:
                this.ddep = ((System.Windows.Controls.TextBox)(target));
                return;

            case 9:
                this.dver = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\..\View\ExerciseView.xaml"
                ((Typo.View.ExerciseView)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.UserControl_KeyDown);

            #line default
            #line hidden

            #line 10 "..\..\..\View\ExerciseView.xaml"
                ((Typo.View.ExerciseView)(target)).KeyUp += new System.Windows.Input.KeyEventHandler(this.UserControl_KeyUp);

            #line default
            #line hidden
                return;

            case 2:
                this.ExerciseTextBox = ((System.Windows.Controls.RichTextBox)(target));
                return;

            case 3:
                this.ExerciseTextBoxParagraph = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 4:
                this.KeyStrokesLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 5:
                this.AccuracyLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.keyBoard = ((Typo.View.Keyboard)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 56
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.sp_messageDetail_outside = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 2:
                this.rtb_detail = ((System.Windows.Controls.RichTextBox)(target));
                return;

            case 3:
                this.gara = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 4:
                this.tb_detail = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 57
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\ReadOnline.xaml"
                ((DownloadNovel.ReadOnline)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.zj = ((HandyControl.Controls.Divider)(target));
                return;

            case 3:
                this.nr = ((System.Windows.Documents.Paragraph)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 58
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.myMainWindow = ((Projects_Manager_Medexy.add_project)(target));

            #line 7 "..\..\..\windows\add_project.xaml"
                this.myMainWindow.Loaded += new System.Windows.RoutedEventHandler(this.myMainWindow_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.grid = ((System.Windows.Controls.Grid)(target));

            #line 8 "..\..\..\windows\add_project.xaml"
                this.grid.SizeChanged += new System.Windows.SizeChangedEventHandler(this.Grid_SizeChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.ApplicationScaleTransform = ((System.Windows.Media.ScaleTransform)(target));
                return;

            case 4:
                this.StartDatePicker = ((System.Windows.Controls.DatePicker)(target));

            #line 20 "..\..\..\windows\add_project.xaml"
                this.StartDatePicker.SelectedDateChanged += new System.EventHandler <System.Windows.Controls.SelectionChangedEventArgs>(this.StartDatePicker_SelectedDateChanged);

            #line default
            #line hidden
                return;

            case 5:
                this.EndDatePicker = ((System.Windows.Controls.DatePicker)(target));

            #line 24 "..\..\..\windows\add_project.xaml"
                this.EndDatePicker.SelectedDateChanged += new System.EventHandler <System.Windows.Controls.SelectionChangedEventArgs>(this.EndDatePicker_SelectedDateChanged);

            #line default
            #line hidden
                return;

            case 6:
                this.pavTb = ((System.Windows.Controls.TextBox)(target));

            #line 26 "..\..\..\windows\add_project.xaml"
                this.pavTb.GotFocus += new System.Windows.RoutedEventHandler(this.pavTb_GotFocus);

            #line default
            #line hidden
                return;

            case 7:
                this.added_users_dg = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 9:
                this.users_dg = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 11:
                this.searchTb = ((System.Windows.Controls.TextBox)(target));

            #line 73 "..\..\..\windows\add_project.xaml"
                this.searchTb.GotFocus += new System.Windows.RoutedEventHandler(this.searchTb_GotFocus);

            #line default
            #line hidden

            #line 73 "..\..\..\windows\add_project.xaml"
                this.searchTb.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.searchTb_TextChanged);

            #line default
            #line hidden
                return;

            case 12:
                this.clearSearchTb = ((System.Windows.Controls.Button)(target));

            #line 75 "..\..\..\windows\add_project.xaml"
                this.clearSearchTb.Click += new System.Windows.RoutedEventHandler(this.clearSearchTb_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.RemoveUserBtn = ((System.Windows.Controls.Button)(target));

            #line 77 "..\..\..\windows\add_project.xaml"
                this.RemoveUserBtn.Click += new System.Windows.RoutedEventHandler(this.RemoveUserBtnClick);

            #line default
            #line hidden
                return;

            case 14:
                this.AddUserBtn = ((System.Windows.Controls.Button)(target));

            #line 78 "..\..\..\windows\add_project.xaml"
                this.AddUserBtn.Click += new System.Windows.RoutedEventHandler(this.AddUserBtnClick);

            #line default
            #line hidden
                return;

            case 15:

            #line 79 "..\..\..\windows\add_project.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.SaveProjectBtnClick);

            #line default
            #line hidden
                return;

            case 16:
                this.komentarasTb = ((System.Windows.Controls.RichTextBox)(target));
                return;

            case 17:
                this.flow = ((System.Windows.Documents.FlowDocument)(target));
                return;

            case 18:
                this.Paragraph = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 19:
                this.Run = ((System.Windows.Documents.Run)(target));
                return;

            case 20:
                this.TasksDatagrid = ((System.Windows.Controls.DataGrid)(target));

            #line 88 "..\..\..\windows\add_project.xaml"
                this.TasksDatagrid.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.TasksDatagrid_SelectionChanged);

            #line default
            #line hidden
                return;

            case 21:
                this.TaskStartDatePicker = ((System.Windows.Controls.DatePicker)(target));

            #line 149 "..\..\..\windows\add_project.xaml"
                this.TaskStartDatePicker.SelectedDateChanged += new System.EventHandler <System.Windows.Controls.SelectionChangedEventArgs>(this.TaskStartDatePicker_SelectedDateChanged);

            #line default
            #line hidden
                return;

            case 22:
                this.TaskEndDatePicker = ((System.Windows.Controls.DatePicker)(target));

            #line 151 "..\..\..\windows\add_project.xaml"
                this.TaskEndDatePicker.SelectedDateChanged += new System.EventHandler <System.Windows.Controls.SelectionChangedEventArgs>(this.TaskEndDatePicker_SelectedDateChanged);

            #line default
            #line hidden
                return;

            case 23:
                this.TaskPavTb = ((System.Windows.Controls.TextBox)(target));

            #line 152 "..\..\..\windows\add_project.xaml"
                this.TaskPavTb.GotFocus += new System.Windows.RoutedEventHandler(this.TaskPavTb_GotFocus);

            #line default
            #line hidden
                return;

            case 24:
                this.TaskAtsakingasDg = ((System.Windows.Controls.DataGrid)(target));

            #line 155 "..\..\..\windows\add_project.xaml"
                this.TaskAtsakingasDg.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.TaskAtsakingasDg_SelectionChanged);

            #line default
            #line hidden
                return;

            case 25:
                this.TaskKomentaras = ((System.Windows.Controls.RichTextBox)(target));

            #line 168 "..\..\..\windows\add_project.xaml"
                this.TaskKomentaras.GotFocus += new System.Windows.RoutedEventHandler(this.TaskKomentaras_GotFocus);

            #line default
            #line hidden
                return;

            case 26:
                this.flow1 = ((System.Windows.Documents.FlowDocument)(target));
                return;

            case 27:
                this.Paragraph1 = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 28:
                this.Run1 = ((System.Windows.Documents.Run)(target));
                return;

            case 29:
                this.AddTasksBtn = ((System.Windows.Controls.Button)(target));

            #line 176 "..\..\..\windows\add_project.xaml"
                this.AddTasksBtn.Click += new System.Windows.RoutedEventHandler(this.AddTasksBtnClick);

            #line default
            #line hidden
                return;

            case 30:
                this.TaskAtsakingasSearchTb = ((System.Windows.Controls.TextBox)(target));

            #line 177 "..\..\..\windows\add_project.xaml"
                this.TaskAtsakingasSearchTb.GotFocus += new System.Windows.RoutedEventHandler(this.TaskAtsakingasSearchTb_GotFocus);

            #line default
            #line hidden

            #line 177 "..\..\..\windows\add_project.xaml"
                this.TaskAtsakingasSearchTb.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TaskAtsakingasSearchTb_TextChanged);

            #line default
            #line hidden
                return;

            case 31:
                this.ClearTaskAtsakingasSearchTbBtn = ((System.Windows.Controls.Button)(target));

            #line 178 "..\..\..\windows\add_project.xaml"
                this.ClearTaskAtsakingasSearchTbBtn.Click += new System.Windows.RoutedEventHandler(this.ClearTaskAtsakingasSearchTbBtnClick);

            #line default
            #line hidden
                return;

            case 32:
                this.TaskAddedUsersDg = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 34:
                this.TaskUsersDg = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 36:
                this.TaskInvolvedSearchTb = ((System.Windows.Controls.TextBox)(target));

            #line 224 "..\..\..\windows\add_project.xaml"
                this.TaskInvolvedSearchTb.GotFocus += new System.Windows.RoutedEventHandler(this.TaskInvolvedSearchTb_GotFocus);

            #line default
            #line hidden

            #line 224 "..\..\..\windows\add_project.xaml"
                this.TaskInvolvedSearchTb.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TaskInvolvedSearchTb_TextChanged);

            #line default
            #line hidden
                return;

            case 37:
                this.ClearTaskInvolvedSearchTb = ((System.Windows.Controls.Button)(target));

            #line 225 "..\..\..\windows\add_project.xaml"
                this.ClearTaskInvolvedSearchTb.Click += new System.Windows.RoutedEventHandler(this.ClearTaskInvolvedSearchTbBtnClick);

            #line default
            #line hidden
                return;

            case 38:
                this.RemoveTaskUsersBtn = ((System.Windows.Controls.Button)(target));

            #line 226 "..\..\..\windows\add_project.xaml"
                this.RemoveTaskUsersBtn.Click += new System.Windows.RoutedEventHandler(this.RemoveTaskUsersBtnClick);

            #line default
            #line hidden
                return;

            case 39:
                this.AddTaksUsersBtn = ((System.Windows.Controls.Button)(target));

            #line 227 "..\..\..\windows\add_project.xaml"
                this.AddTaksUsersBtn.Click += new System.Windows.RoutedEventHandler(this.AddTaskUsersBtnClick);

            #line default
            #line hidden
                return;

            case 40:
                this.RemoveTasksBtn = ((System.Windows.Controls.Button)(target));

            #line 229 "..\..\..\windows\add_project.xaml"
                this.RemoveTasksBtn.Click += new System.Windows.RoutedEventHandler(this.RemoveTasksBtnClick);

            #line default
            #line hidden
                return;

            case 41:
                this.Close_btn = ((System.Windows.Controls.Button)(target));

            #line 230 "..\..\..\windows\add_project.xaml"
                this.Close_btn.Click += new System.Windows.RoutedEventHandler(this.Close_btn_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 59
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.caseSensitive = ((System.Windows.Controls.CheckBox)(target));

            #line 26 "..\..\MainWindow.xaml"
                this.caseSensitive.Checked += new System.Windows.RoutedEventHandler(this.caseSensitive_Checked);

            #line default
            #line hidden
                return;

            case 2:
                this.useWildcards = ((System.Windows.Controls.CheckBox)(target));

            #line 28 "..\..\MainWindow.xaml"
                this.useWildcards.Checked += new System.Windows.RoutedEventHandler(this.useWildcards_Checked);

            #line default
            #line hidden
                return;

            case 3:
                this.searchText = ((System.Windows.Controls.TextBox)(target));

            #line 31 "..\..\MainWindow.xaml"
                this.searchText.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.searchText_TextChanged);

            #line default
            #line hidden
                return;

            case 4:
                this.search = ((System.Windows.Controls.Button)(target));

            #line 34 "..\..\MainWindow.xaml"
                this.search.Click += new System.Windows.RoutedEventHandler(this.search_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.searchResults = ((System.Windows.Controls.ComboBox)(target));

            #line 38 "..\..\MainWindow.xaml"
                this.searchResults.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.searchResults_SelectionChanged);

            #line default
            #line hidden
                return;

            case 6:
                this.status = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 7:
                this.textArea = ((System.Windows.Controls.RichTextBox)(target));
                return;

            case 8:
                this.paragraph = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 9:
                this.prompt = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.myMainWindow = ((Projects_Manager_Medexy.AddTasksToProject)(target));

            #line 8 "..\..\..\windows\AddTasksToProject.xaml"
                this.myMainWindow.Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:

            #line 9 "..\..\..\windows\AddTasksToProject.xaml"
                ((System.Windows.Controls.Grid)(target)).SizeChanged += new System.Windows.SizeChangedEventHandler(this.Grid_SizeChanged_1);

            #line default
            #line hidden
                return;

            case 3:
                this.TasksDatagrid = ((System.Windows.Controls.DataGrid)(target));

            #line 10 "..\..\..\windows\AddTasksToProject.xaml"
                this.TasksDatagrid.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.TasksDatagrid_SelectionChanged);

            #line default
            #line hidden
                return;

            case 4:
                this.TaskStartDatePicker = ((System.Windows.Controls.DatePicker)(target));

            #line 71 "..\..\..\windows\AddTasksToProject.xaml"
                this.TaskStartDatePicker.SelectedDateChanged += new System.EventHandler <System.Windows.Controls.SelectionChangedEventArgs>(this.TaskStartDatePicker_SelectedDateChanged);

            #line default
            #line hidden
                return;

            case 5:
                this.TaskEndDatePicker = ((System.Windows.Controls.DatePicker)(target));

            #line 73 "..\..\..\windows\AddTasksToProject.xaml"
                this.TaskEndDatePicker.SelectedDateChanged += new System.EventHandler <System.Windows.Controls.SelectionChangedEventArgs>(this.TaskEndDatePicker_SelectedDateChanged);

            #line default
            #line hidden
                return;

            case 6:
                this.TaskPavTb = ((System.Windows.Controls.TextBox)(target));

            #line 74 "..\..\..\windows\AddTasksToProject.xaml"
                this.TaskPavTb.GotFocus += new System.Windows.RoutedEventHandler(this.TaskPavTb_GotFocus);

            #line default
            #line hidden
                return;

            case 7:
                this.TaskAtsakingasDg = ((System.Windows.Controls.DataGrid)(target));

            #line 76 "..\..\..\windows\AddTasksToProject.xaml"
                this.TaskAtsakingasDg.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.TaskAtsakingasDg_SelectionChanged);

            #line default
            #line hidden
                return;

            case 8:
                this.TaskKomentaras = ((System.Windows.Controls.RichTextBox)(target));

            #line 89 "..\..\..\windows\AddTasksToProject.xaml"
                this.TaskKomentaras.GotFocus += new System.Windows.RoutedEventHandler(this.TaskKomentaras_GotFocus);

            #line default
            #line hidden
                return;

            case 9:
                this.flow1 = ((System.Windows.Documents.FlowDocument)(target));
                return;

            case 10:
                this.Paragraph1 = ((System.Windows.Documents.Paragraph)(target));
                return;

            case 11:
                this.Run1 = ((System.Windows.Documents.Run)(target));
                return;

            case 12:
                this.AddTasksBtn = ((System.Windows.Controls.Button)(target));

            #line 97 "..\..\..\windows\AddTasksToProject.xaml"
                this.AddTasksBtn.Click += new System.Windows.RoutedEventHandler(this.AddTasksBtnClick);

            #line default
            #line hidden
                return;

            case 13:
                this.TaskAtsakingasSearchTb = ((System.Windows.Controls.TextBox)(target));

            #line 98 "..\..\..\windows\AddTasksToProject.xaml"
                this.TaskAtsakingasSearchTb.GotFocus += new System.Windows.RoutedEventHandler(this.TaskAtsakingasSearchTb_GotFocus);

            #line default
            #line hidden

            #line 98 "..\..\..\windows\AddTasksToProject.xaml"
                this.TaskAtsakingasSearchTb.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TaskAtsakingasSearchTb_TextChanged);

            #line default
            #line hidden
                return;

            case 14:
                this.ClearTaskAtsakingasSearchTbBtn = ((System.Windows.Controls.Button)(target));

            #line 99 "..\..\..\windows\AddTasksToProject.xaml"
                this.ClearTaskAtsakingasSearchTbBtn.Click += new System.Windows.RoutedEventHandler(this.ClearTaskAtsakingasSearchTbBtnClick);

            #line default
            #line hidden
                return;

            case 15:
                this.TaskAddedUsersDg = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 17:
                this.TaskUsersDg = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 19:
                this.TaskInvolvedSearchTb = ((System.Windows.Controls.TextBox)(target));

            #line 145 "..\..\..\windows\AddTasksToProject.xaml"
                this.TaskInvolvedSearchTb.GotFocus += new System.Windows.RoutedEventHandler(this.TaskInvolvedSearchTb_GotFocus);

            #line default
            #line hidden

            #line 145 "..\..\..\windows\AddTasksToProject.xaml"
                this.TaskInvolvedSearchTb.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TaskInvolvedSearchTb_TextChanged);

            #line default
            #line hidden
                return;

            case 20:
                this.ClearTaskInvolvedSearchTb = ((System.Windows.Controls.Button)(target));

            #line 146 "..\..\..\windows\AddTasksToProject.xaml"
                this.ClearTaskInvolvedSearchTb.Click += new System.Windows.RoutedEventHandler(this.ClearTaskInvolvedSearchTbBtnClick);

            #line default
            #line hidden
                return;

            case 21:
                this.RemoveTaskUsersBtn = ((System.Windows.Controls.Button)(target));

            #line 147 "..\..\..\windows\AddTasksToProject.xaml"
                this.RemoveTaskUsersBtn.Click += new System.Windows.RoutedEventHandler(this.RemoveTaskUsersBtnClick);

            #line default
            #line hidden
                return;

            case 22:
                this.AddTaksUsersBtn = ((System.Windows.Controls.Button)(target));

            #line 148 "..\..\..\windows\AddTasksToProject.xaml"
                this.AddTaksUsersBtn.Click += new System.Windows.RoutedEventHandler(this.AddTaskUsersBtnClick);

            #line default
            #line hidden
                return;

            case 23:
                this.RemoveTasksBtn = ((System.Windows.Controls.Button)(target));

            #line 150 "..\..\..\windows\AddTasksToProject.xaml"
                this.RemoveTasksBtn.Click += new System.Windows.RoutedEventHandler(this.RemoveTasksBtnClick);

            #line default
            #line hidden
                return;

            case 24:
                this.SaveBtn = ((System.Windows.Controls.Button)(target));

            #line 151 "..\..\..\windows\AddTasksToProject.xaml"
                this.SaveBtn.Click += new System.Windows.RoutedEventHandler(this.SaveBtn_OnClick);

            #line default
            #line hidden
                return;

            case 25:
                this.CloseBtn = ((System.Windows.Controls.Button)(target));

            #line 152 "..\..\..\windows\AddTasksToProject.xaml"
                this.CloseBtn.Click += new System.Windows.RoutedEventHandler(this.CloseBtn_OnClick);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }