void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 29 "..\..\..\View\OrderSend.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.eatin); #line default #line hidden return; case 2: #line 32 "..\..\..\View\OrderSend.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.takeout); #line default #line hidden return; case 3: this.fdViewer = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.DoubleSpacedMessages = ((System.Windows.Controls.TextBlock)(target)); return; case 2: this.SingleSpacedMessagesContainer = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 3: this.SingleSpacedMessages = ((System.Windows.Controls.TextBlock)(target)); return; case 4: this.CloseButton = ((System.Windows.Controls.Button)(target)); #line 34 "..\..\HelpMessageBox.xaml" this.CloseButton.Click += new System.Windows.RoutedEventHandler(this.CloseClicked); #line default #line hidden return; } this._contentLoaded = true; }
public void HighlightParameter(int parameterIndex) { if (highlightedParameterIndex == parameterIndex) return; this.highlightedParameterIndex = parameterIndex; if (header != null) header = GenerateHeader(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.btnPrint = ((System.Windows.Controls.Button)(target)); #line 7 "..\..\..\..\Rich text controls\FlowDocumentPrintSample.xaml" this.btnPrint.Click += new System.Windows.RoutedEventHandler(this.btnPrint_Click); #line default #line hidden return; case 2: this.btnPrintPreview = ((System.Windows.Controls.Button)(target)); #line 8 "..\..\..\..\Rich text controls\FlowDocumentPrintSample.xaml" this.btnPrintPreview.Click += new System.Windows.RoutedEventHandler(this.btnPrintPreview_Click); #line default #line hidden return; case 3: this.fdViewer = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.fdcv = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); #line 11 "..\..\..\documentViewer.xaml" this.fdcv.SizeChanged += new System.Windows.SizeChangedEventHandler(this.Fdcv_SizeChanged); #line default #line hidden return; case 2: this.fdMain = ((System.Windows.Documents.FlowDocument)(target)); return; case 3: this.table = ((System.Windows.Documents.Table)(target)); return; case 4: this.row = ((System.Windows.Documents.TableRow)(target)); return; case 5: this.run = ((System.Windows.Documents.Run)(target)); return; } this._contentLoaded = true; }
public static FlowDocument AddDrop(this StackPanel sp, Drop drop) { FlowDocumentParser fdp = new FlowDocumentParser() { TextAlignment = TextAlignment.Right }; fdp.AddBold(drop.Author.Name + " at " + String.Format("{0:dd/MM/yyyy HH:mm}", drop.UpdatedAt)); fdp = new FlowDocumentParser(fdp.Doc); fdp.AddMarkUp(drop.Content); FlowDocumentScrollViewer fdsv = new FlowDocumentScrollViewer() { HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled, Document = fdp.Doc, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, Foreground = new SolidColorBrush(Colors.White) }; Border border = new Border() { BorderThickness = new Thickness(0, 5, 0, 5), CornerRadius = new CornerRadius(10), Padding = new Thickness(3), Background = new SolidColorBrush(Colors.Black), Cursor = Cursors.Hand, Child = fdsv }; fdp.Doc.PreviewMouseWheel += Bubbler; fdsv.PreviewMouseWheel += Bubbler; fdsv.SizeChanged += Resizer; sp.Children.Add(border); return fdp.Doc; }
public DocumentManager(ConsoleOutputControl consoleOutput, FlowDocumentScrollViewer viewer) { m_viewer = viewer; m_consoleOutput = consoleOutput; consoleOutput.TextAddedEvent += consoleOutput_TextAddedEvent; m_viewer.Document = new FlowDocument(new Paragraph()); }
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; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 11 "..\..\..\src\TutorialWindow.xaml" ((tutorialUI.TutorialWindow)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Window_MouseDown); #line default #line hidden return; case 2: this.TutorialTextPresenter = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 3: this.TextContent = ((System.Windows.Controls.TextBlock)(target)); return; case 4: this.BtnSaveClose = ((System.Windows.Controls.Button)(target)); return; case 5: this.BtnPrev = ((System.Windows.Controls.Button)(target)); return; case 6: this.BtnNext = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
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); }
public FlowDocumentScrollViewerHighlightAdorner(FlowDocumentScrollViewer flowDocumentScrollViewer, Run run, int start, int length, double horizontalScrollBarHeight, Brush bodyHighlightAdornerBrush, Pen bodyHighlightAdornerPen, Brush bodyIterativeHighlightAdornerBrush, Pen bodyIterativeHighlightAdornerPen) : base(flowDocumentScrollViewer, run, start, length, horizontalScrollBarHeight, bodyHighlightAdornerBrush, bodyHighlightAdornerPen, bodyIterativeHighlightAdornerBrush, bodyIterativeHighlightAdornerPen) { this.flowDocumentScrollViewer = flowDocumentScrollViewer; flowDocumentScrollViewer.AddHandler(ScrollViewer.ScrollChangedEvent, new RoutedEventHandler(scroller_ScrollChanged)); }
public FlowDocumentScrollViewerHighlightHandler(FlowDocumentScrollViewer flowDocumentScrollViewer, System.Windows.Media.Brush bodyHighlightAdornerBrush, System.Windows.Media.Pen bodyHighlightAdornerPen, Brush bodyIterativeHighlightAdornerBrush, Pen bodyIterativeHighlightAdornerPen) : base(flowDocumentScrollViewer, bodyHighlightAdornerBrush, bodyHighlightAdornerPen, bodyIterativeHighlightAdornerBrush, bodyIterativeHighlightAdornerPen) { this.flowDocumentScrollViewer = flowDocumentScrollViewer; ignorePropertyChange = true; BindingOperations.SetBinding(this, FlowDocumentScrollViewerZoomProperty, new Binding { Source = flowDocumentScrollViewer, Path = new PropertyPath("Zoom"), Mode = BindingMode.OneWay }); ignorePropertyChange = false; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Report = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; } this._contentLoaded = true; }
private static void UnhookOldCollection(FlowDocumentScrollViewer viewer) { if (viewer.Tag != null) { DocumentManager manager = (DocumentManager) viewer.Tag; manager.Unhook(); viewer.Tag = null; } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mainPane = ((System.Windows.Controls.DockPanel)(target)); return; case 2: this.Configuration = ((PosControls.ConfigurationManager)(target)); return; case 3: this.mainContentBorder = ((System.Windows.Controls.Border)(target)); return; case 4: this.dragScrollViewer = ((PosControls.DragScrollViewer)(target)); return; case 5: this.flowDocumentScroll = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 6: this.buttonStart = ((PosControls.TextBlockButton)(target)); #line 35 "..\..\..\UpdateServiceControl.xaml" this.buttonStart.Click += new System.Windows.RoutedEventHandler(this.buttonStart_Click); #line default #line hidden return; case 7: this.buttonRestart = ((PosControls.TextBlockButton)(target)); #line 36 "..\..\..\UpdateServiceControl.xaml" this.buttonRestart.Click += new System.Windows.RoutedEventHandler(this.buttonRestart_Click); #line default #line hidden return; case 8: this.buttonStop = ((PosControls.TextBlockButton)(target)); #line 37 "..\..\..\UpdateServiceControl.xaml" this.buttonStop.Click += new System.Windows.RoutedEventHandler(this.buttonStop_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mainPane = ((System.Windows.Controls.DockPanel)(target)); return; case 2: this.Configuration = ((PointOfSale.ConfigurationManager)(target)); return; case 3: this.dragScrollViewer = ((PosControls.DragScrollViewer)(target)); return; case 4: this.flowDocumentScroll = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 5: this.buttonSendException = ((PosControls.PushButton)(target)); #line 37 "..\..\..\UpdateControl.xaml" this.buttonSendException.Selected += new System.EventHandler(this.buttonSendException_Selected); #line default #line hidden return; case 6: this.buttonVersionCheck = ((PosControls.PushButton)(target)); #line 38 "..\..\..\UpdateControl.xaml" this.buttonVersionCheck.Selected += new System.EventHandler(this.buttonVersionCheck_Selected); #line default #line hidden return; case 7: this.buttonUpdate = ((PosControls.PushButton)(target)); #line 39 "..\..\..\UpdateControl.xaml" this.buttonUpdate.Selected += new System.EventHandler(this.buttonUpdate_Selected); #line default #line hidden return; case 8: this.progressBar = ((System.Windows.Controls.ProgressBar)(target)); return; } this._contentLoaded = true; }
/// <summary> /// Selects the highlight as the current highlight when iterating through hits, bringing the control to focus. /// </summary> public override void Select() { System.Windows.Controls.FlowDocumentScrollViewer fdpv = (BodyAdorner.AdornedElement as System.Windows.Controls.FlowDocumentScrollViewer); fdpv.Selection.Select(run.ContentStart.GetPositionAtOffset(Start), run.ContentStart.GetPositionAtOffset(End)); ScrollViewer scr = Utility.FindScrollViewer(fdpv); scr.ScrollToVerticalOffset(fdpv.Selection.Start.GetCharacterRect(LogicalDirection.Forward).Top); fdpv.Focus();//focusing is very important because not only is it correct user behaviour but it also allows us to track the user moving focus to other controls better base.Select(); }
public void HighlightParameter(int parameterIndex) { if (highlightedParameterIndex == parameterIndex) return; this.highlightedParameterIndex = parameterIndex; if (header != null) header = GenerateHeader(); OnPropertyChanged("Header"); OnPropertyChanged("Content"); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.docViewer = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; } this._contentLoaded = true; }
/// <inheritdoc/> public override void OnApplyTemplate() { base.OnApplyTemplate(); messageContainer = GetTemplateChild(MessageContainerPartName) as FlowDocumentScrollViewer; if (messageContainer == null) throw new InvalidOperationException($"A part named '{MessageContainerPartName}' must be present in the ControlTemplate, and must be of type '{typeof(FlowDocumentScrollViewer)}'."); ResetMessage(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.HearththrobAnimation = ((System.Windows.Controls.Image)(target)); #line 27 "..\..\..\MainWindow.xaml" this.HearththrobAnimation.AddHandler(WpfAnimatedGif.ImageBehavior.AnimationLoadedEvent, new System.Windows.RoutedEventHandler(this.OnAnimationLoaded)); #line default #line hidden return; case 2: this.StartButton = ((System.Windows.Controls.Button)(target)); #line 29 "..\..\..\MainWindow.xaml" this.StartButton.Click += new System.Windows.RoutedEventHandler(this.OnStartButtonClick); #line default #line hidden return; case 3: this.ButtonMute = ((System.Windows.Controls.Button)(target)); #line 30 "..\..\..\MainWindow.xaml" this.ButtonMute.Click += new System.Windows.RoutedEventHandler(this.OnMuteButtonClick); #line default #line hidden return; case 4: this.ButtonClearTheTranscript = ((System.Windows.Controls.Button)(target)); #line 31 "..\..\..\MainWindow.xaml" this.ButtonClearTheTranscript.Click += new System.Windows.RoutedEventHandler(this.OnResetButtonClick); #line default #line hidden return; case 5: this.WhatTheComputerThinksTheUserIsSayingTextbox = ((System.Windows.Controls.TextBlock)(target)); return; case 6: this.ChatTranscriptViewer = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.flowDoc = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 2: this.table1 = ((System.Windows.Documents.Table)(target)); return; case 3: this.seq1TextBox = ((System.Windows.Controls.TextBox)(target)); return; case 4: this.seq2TextBox = ((System.Windows.Controls.TextBox)(target)); return; case 5: this.startButton = ((System.Windows.Controls.Button)(target)); #line 50 "..\..\MainWindow.xaml" this.startButton.Click += new System.Windows.RoutedEventHandler(this.startButton_Click); #line default #line hidden return; case 6: this.globalAlignmentRB = ((System.Windows.Controls.RadioButton)(target)); return; case 7: this.localAlignmentRB = ((System.Windows.Controls.RadioButton)(target)); return; case 8: this.topAlignmentLable = ((System.Windows.Controls.Label)(target)); return; case 9: this.pairwiseBarsLable = ((System.Windows.Controls.Label)(target)); return; case 10: this.leftAlignmentLable = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }
public void UpdateDiary() { Diary mDiary = new Diary(); postsStackPanel.Children.Clear(); DateTime previousDate = DateTime.Now; int counter = 0; Style contentStyle = Application.Current.Resources["postContent"] as Style; Style dateStyle = Application.Current.Resources["postDate"] as Style; Style timeStyle = Application.Current.Resources["postTime"] as Style; foreach (DiaryPost post in mDiary) { DockPanel itemPanel = new DockPanel(); itemPanel.Tag = post.ID.ToString(); itemPanel.MouseEnter += ItemStackPanel_MouseEnter; itemPanel.MouseLeave += ItemStackPanel_MouseLeave; itemPanel.ContextMenu = DiaryContextMenu(); TextBlock postDate = new TextBlock(); postDate.Style = dateStyle; if (previousDate != post.DateTime.Date) { postDate.Text = post.DateTime.ToString("dd MMMM yyyy"); previousDate = post.DateTime.Date; postsStackPanel.Children.Add(postDate); } TextBlock postTime = new TextBlock(); postTime.Style = timeStyle; postTime.Text = post.DateTime.ToString("HH:mm"); itemPanel.Children.Add(postTime); FlowDocumentScrollViewer postContent = new FlowDocumentScrollViewer(); FlowDocument doc = new FlowDocument(); TextRange tr = new TextRange(doc.ContentStart, doc.ContentEnd); MemoryStream ms = GetMemoryStreamFromString(post.Content); tr.Load(ms, DataFormats.Rtf); postContent.Document = doc; postContent.ContextMenu = null; postContent.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; itemPanel.Children.Add(postContent); postsStackPanel.Children.Add(itemPanel); counter++; } }
public FlowDocumentTooltip(FlowDocument document) { TextOptions.SetTextFormattingMode(this, TextFormattingMode.Display); viewer = new FlowDocumentScrollViewer(); viewer.Document = document; Border border = new Border { Background = SystemColors.InfoBrush, BorderBrush = SystemColors.InfoTextBrush, BorderThickness = new Thickness(1), MaxHeight = 400, Child = viewer }; this.Child = border; viewer.Foreground = SystemColors.InfoTextBrush; document.FontSize = CodeEditorOptions.Instance.FontSize; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 10 "..\..\..\UpdateBuilderControl.xaml" ((TemposClientAdministration.UpdateBuilderControl)(target)).Loaded += new System.Windows.RoutedEventHandler(this.UserControl_Loaded); #line default #line hidden return; case 2: this.mainPane = ((System.Windows.Controls.DockPanel)(target)); return; case 3: this.Configuration = ((PosControls.ConfigurationManager)(target)); return; case 4: this.mainContentBorder = ((System.Windows.Controls.Border)(target)); return; case 5: this.dragScrollViewer = ((PosControls.DragScrollViewer)(target)); return; case 6: this.flowDocumentScroll = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 7: this.buttonBuildUpdate = ((PosControls.TextBlockButton)(target)); #line 35 "..\..\..\UpdateBuilderControl.xaml" this.buttonBuildUpdate.Click += new System.Windows.RoutedEventHandler(this.buttonBuildUpdate_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.TutorialTextPresenter = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 2: this.BtnPrev = ((System.Windows.Controls.Button)(target)); return; case 3: this.BtnNext = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
public static void ReportUnexpectedException(Exception e) { Window w = new Window() { Title = "Unexpected exception occured", Width = 500, Height = 400, Background = new SolidColorBrush(Color.FromRgb(0xF0, 0xF0, 0xF0)) }; Grid g = new Grid(); g.RowDefinitions.Add(new RowDefinition()); g.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto }); FlowDocumentScrollViewer f = new FlowDocumentScrollViewer() { HorizontalScrollBarVisibility = ScrollBarVisibility.Auto, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, BorderBrush = Brushes.Black, BorderThickness = new Thickness(0, 0, 0, 1), }; f.SetValue(Grid.RowProperty, 0); f.Document = buildExceptionMessage(new FlowDocument() { Background = Brushes.White, TextAlignment = TextAlignment.Left, FontFamily = new FontFamily("Sans Serif") }, e, 4); g.Children.Add(f); Button b = new Button() { Padding = new Thickness(10, 2, 10, 2), Margin = new Thickness(10), Content = "Ok", HorizontalAlignment = HorizontalAlignment.Center, IsDefault = true, }; b.SetValue(Grid.RowProperty, 1); b.Click += delegate { w.Close(); }; g.Children.Add(b); w.Content = g; w.ShowDialog(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mainGrid = ((System.Windows.Controls.Grid)(target)); return; case 2: #line 55 "..\..\..\Views\ShowAbnormalWin.xaml" ((System.Windows.Controls.ListBox)(target)).SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ListBox_SelectionChanged); #line default #line hidden return; case 3: this.docViewer = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 4: this.btnClear = ((System.Windows.Controls.Button)(target)); #line 67 "..\..\..\Views\ShowAbnormalWin.xaml" this.btnClear.Click += new System.Windows.RoutedEventHandler(this.ClearExceptionButton_Click); #line default #line hidden return; case 5: this.btnOK = ((System.Windows.Controls.Button)(target)); #line 75 "..\..\..\Views\ShowAbnormalWin.xaml" this.btnOK.Click += new System.Windows.RoutedEventHandler(this.btnOK_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.docViewer = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 2: #line 11 "..\..\FlowContent.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.cmdCreateDynamicDocument_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mainPane = ((System.Windows.Controls.DockPanel)(target)); return; case 2: this.Configuration = ((PosControls.ConfigurationManagerCore)(target)); return; case 3: this.buttonDeleteIncident = ((PosControls.PushButton)(target)); #line 39 "..\..\..\CrashReportControl.xaml" this.buttonDeleteIncident.Selected += new System.EventHandler(this.buttonDeleteIncident_Selected); #line default #line hidden return; case 4: this.listBox = ((PosControls.DragScrollListBox)(target)); #line 40 "..\..\..\CrashReportControl.xaml" this.listBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.listBox_SelectionChanged); #line default #line hidden return; case 5: this.dragScrollViewer = ((PosControls.DragScrollViewer)(target)); return; case 6: this.flowDocumentScroll = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mainPane = ((System.Windows.Controls.DockPanel)(target)); return; case 2: this.Configuration = ((PosControls.ConfigurationManager)(target)); return; case 3: this.gridControl = ((System.Windows.Controls.Grid)(target)); return; case 4: this.listBox1 = ((PosControls.DragScrollListBox)(target)); #line 26 "..\..\..\ReportViewerControl.xaml" this.listBox1.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.listBox1_SelectionChanged); #line default #line hidden return; case 5: this.flowDocumentScroll = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 6: this.buttonPrint = ((System.Windows.Controls.Button)(target)); #line 39 "..\..\..\ReportViewerControl.xaml" this.buttonPrint.Click += new System.Windows.RoutedEventHandler(this.buttonPrint_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.documentViewer = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 2: this.buttonDisplay = ((System.Windows.Controls.Button)(target)); #line 16 "..\..\MainWindow.xaml" this.buttonDisplay.Click += new System.Windows.RoutedEventHandler(this.buttonDisplay_Click); #line default #line hidden return; } this._contentLoaded = true; }
FlowDocumentScrollViewer GenerateHeader() { CSharpAmbience ambience = new CSharpAmbience(); ambience.ConversionFlags = ConversionFlags.StandardConversionFlags; var stringBuilder = new StringBuilder(); var formatter = new ParameterHighlightingOutputFormatter(stringBuilder, highlightedParameterIndex); ambience.ConvertEntity(Method, formatter, FormattingOptionsFactory.CreateSharpDevelop()); var documentation = XmlDocumentationElement.Get(Method); ambience.ConversionFlags = ConversionFlags.ShowTypeParameterList; DocumentationUIBuilder b = new DocumentationUIBuilder(ambience); string parameterName = null; if (Method.Parameters.Count > highlightedParameterIndex) parameterName = Method.Parameters[highlightedParameterIndex].Name; b.AddSignatureBlock(stringBuilder.ToString(), formatter.parameterStartOffset, formatter.parameterLength, parameterName); DocumentationUIBuilder b2 = new DocumentationUIBuilder(ambience); b2.ParameterName = parameterName; b2.ShowAllParameters = false; if (documentation != null) { foreach (var child in documentation.Children) { b2.AddDocumentationElement(child); } } content = new FlowDocumentScrollViewer { Document = b2.CreateFlowDocument(), VerticalScrollBarVisibility = ScrollBarVisibility.Auto }; var flowDocument = b.CreateFlowDocument(); flowDocument.PagePadding = new Thickness(0); // default is NOT Thickness(0), but Thickness(Auto), which adds unnecessary space return new FlowDocumentScrollViewer { Document = flowDocument, VerticalScrollBarVisibility = ScrollBarVisibility.Auto }; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mainPane = ((System.Windows.Controls.DockPanel)(target)); return; case 2: this.Configuration = ((PosControls.ConfigurationManager)(target)); return; case 3: this.dragScrollViewer = ((PosControls.DragScrollViewer)(target)); return; case 4: this.flowDocumentScroll = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 5: this.keyboardControl = ((PosControls.KeyboardEntryControl)(target)); #line 31 "..\..\..\CommandShellControl.xaml" this.keyboardControl.EnterPressed += new System.EventHandler(this.keyboardControl_EnterPressed); #line default #line hidden #line 31 "..\..\..\CommandShellControl.xaml" this.keyboardControl.ConsoleClear += new System.EventHandler(this.keyboardControl_ConsoleClear); #line default #line hidden return; } this._contentLoaded = true; }
public static ScrollViewer FindScrollViewer(FlowDocumentScrollViewer flowDocumentScrollViewer) { if (VisualTreeHelper.GetChildrenCount(flowDocumentScrollViewer) == 0) { return null; } // Border is the first child of first child of a ScrolldocumentViewer DependencyObject firstChild = VisualTreeHelper.GetChild(flowDocumentScrollViewer, 0); if (firstChild == null) { return null; } Decorator border = VisualTreeHelper.GetChild(firstChild, 0) as Decorator; if (border == null) { return null; } return border.Child as ScrollViewer; }
public MainWindow() { api = new Base(); scrollChanged_flows = new ScrollChangedEventHandler(scrollViewer1_ScrollChanged_flows); scrollChanged_drops = new ScrollChangedEventHandler(scrollViewer1_ScrollChanged_drops); InitializeComponent(); { UI.GIFImageControl img = new UI.GIFImageControl() { GIFSource = "Resources/ajax-loader.gif", MaxHeight = 100, MaxWidth = 100 }; img.PreviewMouseWheel += FAGGUI.XamlHelpers.Bubbler; BlockUIContainer buic = new BlockUIContainer(img); buic.PreviewMouseWheel += FAGGUI.XamlHelpers.Bubbler; FlowDocument doc = new FlowDocument() { TextAlignment = TextAlignment.Center }; doc.PreviewMouseWheel += FAGGUI.XamlHelpers.Bubbler; doc.Blocks.Add(buic); loader_fdsv = new FlowDocumentScrollViewer() { HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled, Document = doc, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, Background = new SolidColorBrush(Colors.White) }; loader_fdsv.PreviewMouseWheel += FAGGUI.XamlHelpers.Bubbler; loader_fdsv.SizeChanged += FAGGUI.XamlHelpers.Resizer; } lastExpression = expressionBox.Text; lastOffset = 0; LoadFlows(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mainPane = ((System.Windows.Controls.DockPanel)(target)); return; case 2: this.Configuration = ((PosControls.ConfigurationManagerCore)(target)); return; case 3: this.mainContentBorder = ((System.Windows.Controls.Border)(target)); return; case 4: this.dragScrollViewer = ((PosControls.DragScrollViewer)(target)); return; case 5: this.flowDocumentScroll = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 6: this.buttonBuildUpdate = ((PosControls.PushButton)(target)); #line 49 "..\..\..\UpdateBuilderControl.xaml" this.buttonBuildUpdate.Selected += new System.EventHandler(this.buttonBuildUpdate_Selected); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 4 "..\..\MadLibs.xaml" ((Documents.MadLibs)(target)).Loaded += new System.Windows.RoutedEventHandler(this.WindowLoaded); #line default #line hidden return; case 2: this.gridWords = ((System.Windows.Controls.Grid)(target)); return; case 3: #line 21 "..\..\MadLibs.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.cmdGenerate_Click); #line default #line hidden return; case 4: this.docViewer = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 5: this.document = ((System.Windows.Documents.FlowDocument)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 5 "..\..\MainWindow.xaml" ((PointOfSaleManagementSys.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden return; case 2: this.LvShopping = ((System.Windows.Controls.ListView)(target)); #line 21 "..\..\MainWindow.xaml" this.LvShopping.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.LvShopping_MouseDoubleClick); #line default #line hidden return; case 3: this.BalancePriceTb = ((System.Windows.Controls.TextBox)(target)); return; case 4: this.totalTaxCost = ((System.Windows.Controls.TextBox)(target)); return; case 5: this.PaidTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.ComboCard = ((System.Windows.Controls.ComboBox)(target)); return; case 7: this.DpDate = ((System.Windows.Controls.DatePicker)(target)); return; case 8: #line 66 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonBeer_Click); #line default #line hidden return; case 9: #line 69 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonDessert_Click); #line default #line hidden return; case 10: #line 72 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonLunch_Click); #line default #line hidden return; case 11: #line 75 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonDinner_Click); #line default #line hidden return; case 12: #line 78 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonHotDrink_Click); #line default #line hidden return; case 13: #line 81 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonWine_Click); #line default #line hidden return; case 14: this.TabControl = ((System.Windows.Controls.TabControl)(target)); return; case 15: this.Tab1 = ((System.Windows.Controls.TabItem)(target)); return; case 16: this.LvItems = ((System.Windows.Controls.ListView)(target)); #line 123 "..\..\MainWindow.xaml" this.LvItems.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.LvItems_MouseDoubleClick); #line default #line hidden return; case 17: this.tab2 = ((System.Windows.Controls.TabItem)(target)); return; case 18: this.FdViewer = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 19: this.FlowDocument1 = ((System.Windows.Documents.FlowDocument)(target)); return; case 20: #line 143 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonAdd_Click); #line default #line hidden return; case 21: #line 144 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonDelete_Click); #line default #line hidden return; case 22: #line 145 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonChekOut_Click); #line default #line hidden return; case 23: #line 146 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonInvoice_Click); #line default #line hidden return; case 24: #line 147 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonReset_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.FileNameTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 2: this.button1 = ((System.Windows.Controls.Button)(target)); #line 16 "..\..\..\MainWindow.xaml" this.button1.Click += new System.Windows.RoutedEventHandler(this.Button_Browse); #line default #line hidden return; case 3: this.FlowDocReader = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 4: this.cbPrzecinek = ((System.Windows.Controls.CheckBox)(target)); return; case 5: this.cbSpacja = ((System.Windows.Controls.CheckBox)(target)); return; case 6: this.tbZnak = ((System.Windows.Controls.TextBox)(target)); return; case 7: #line 23 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Open); #line default #line hidden return; case 8: #line 24 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Sprawdz); #line default #line hidden return; case 9: #line 25 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Stworz); #line default #line hidden return; case 10: #line 26 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_PrzegladajConfig); #line default #line hidden return; case 11: #line 27 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Normalizuj); #line default #line hidden return; case 12: this.tbDodajWiersz = ((System.Windows.Controls.TextBox)(target)); return; case 13: #line 29 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Dodaj_Wiersz); #line default #line hidden return; case 14: this.tbNumerKolumny = ((System.Windows.Controls.TextBox)(target)); return; case 15: #line 32 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Ignoruj_Kolumny); #line default #line hidden return; case 16: #line 33 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Wczytaj_Config); #line default #line hidden return; case 17: this.tbWylaczZNormalizacji = ((System.Windows.Controls.TextBox)(target)); return; case 18: #line 37 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Zapisz_Txt); #line default #line hidden return; case 19: #line 38 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Zapisz_Json); #line default #line hidden return; case 20: this.cbMetryki = ((System.Windows.Controls.ComboBox)(target)); return; case 21: this.tbParametrK = ((System.Windows.Controls.TextBox)(target)); #line 40 "..\..\..\MainWindow.xaml" this.tbParametrK.GotFocus += new System.Windows.RoutedEventHandler(this.TbParametrK_GotFocus); #line default #line hidden return; case 22: this.tbWierszDoKlasyfikacji = ((System.Windows.Controls.TextBox)(target)); #line 41 "..\..\..\MainWindow.xaml" this.tbWierszDoKlasyfikacji.GotFocus += new System.Windows.RoutedEventHandler(this.TbWierszDoKlasyfikacji_GotFocus); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.LogGameWindow = ((BarsGroup.View.Windows.GameLogWindow)(target)); #line 8 "..\..\..\..\View\Windows\GameLogWindow.xaml" this.LogGameWindow.Closing += new System.ComponentModel.CancelEventHandler(this.LogGameWindow_Closing); #line default #line hidden return; case 2: this.MainFlowDocument = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 3: this.Text16 = ((System.Windows.Controls.RadioButton)(target)); #line 23 "..\..\..\..\View\Windows\GameLogWindow.xaml" this.Text16.Checked += new System.Windows.RoutedEventHandler(this.SelectFontSizeRadioBtn); #line default #line hidden return; case 4: this.Text18 = ((System.Windows.Controls.RadioButton)(target)); #line 24 "..\..\..\..\View\Windows\GameLogWindow.xaml" this.Text18.Checked += new System.Windows.RoutedEventHandler(this.SelectFontSizeRadioBtn); #line default #line hidden return; case 5: this.Text20 = ((System.Windows.Controls.RadioButton)(target)); #line 25 "..\..\..\..\View\Windows\GameLogWindow.xaml" this.Text20.Checked += new System.Windows.RoutedEventHandler(this.SelectFontSizeRadioBtn); #line default #line hidden return; case 6: this.Text24 = ((System.Windows.Controls.RadioButton)(target)); #line 26 "..\..\..\..\View\Windows\GameLogWindow.xaml" this.Text24.Checked += new System.Windows.RoutedEventHandler(this.SelectFontSizeRadioBtn); #line default #line hidden return; case 7: this.Text30 = ((System.Windows.Controls.RadioButton)(target)); #line 27 "..\..\..\..\View\Windows\GameLogWindow.xaml" this.Text30.Checked += new System.Windows.RoutedEventHandler(this.SelectFontSizeRadioBtn); #line default #line hidden return; case 8: this.Text32 = ((System.Windows.Controls.RadioButton)(target)); #line 28 "..\..\..\..\View\Windows\GameLogWindow.xaml" this.Text32.Checked += new System.Windows.RoutedEventHandler(this.SelectFontSizeRadioBtn); #line default #line hidden return; case 9: this.Text34 = ((System.Windows.Controls.RadioButton)(target)); #line 29 "..\..\..\..\View\Windows\GameLogWindow.xaml" this.Text34.Checked += new System.Windows.RoutedEventHandler(this.SelectFontSizeRadioBtn); #line default #line hidden return; case 10: this.Text38 = ((System.Windows.Controls.RadioButton)(target)); #line 30 "..\..\..\..\View\Windows\GameLogWindow.xaml" this.Text38.Checked += new System.Windows.RoutedEventHandler(this.SelectFontSizeRadioBtn); #line default #line hidden return; case 11: this.Text50 = ((System.Windows.Controls.RadioButton)(target)); #line 31 "..\..\..\..\View\Windows\GameLogWindow.xaml" this.Text50.Checked += new System.Windows.RoutedEventHandler(this.SelectFontSizeRadioBtn); #line default #line hidden return; case 12: this.SaveLogBtn = ((System.Windows.Controls.Button)(target)); #line 37 "..\..\..\..\View\Windows\GameLogWindow.xaml" this.SaveLogBtn.Click += new System.Windows.RoutedEventHandler(this.SaveLogBtn_Click); #line default #line hidden return; } this._contentLoaded = true; }
/// <summary> /// Returns the AnnotationService enabled for the viewer. If no service is /// enabled for the viewer, returns null. /// </summary> /// <param name="viewer">viewer to check for an enabled AnnotationService</param> /// <returns>the AnnotationService instance for this viewer, null if a service /// is not enabled for this viewer</returns> /// <exception cref="ArgumentNullException">viewer is null</exception> public static AnnotationService GetService(FlowDocumentScrollViewer viewer) { if (viewer == null) throw new ArgumentNullException("viewer"); return viewer.GetValue(AnnotationService.ServiceProperty) as AnnotationService; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.GridMain = ((System.Windows.Controls.Grid)(target)); return; case 2: this.TextBoxPersonFio = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.TextBoxPersonDocument = ((System.Windows.Controls.TextBox)(target)); return; case 4: this.TextBoxPersonPlace = ((System.Windows.Controls.TextBox)(target)); return; case 5: this.TextBoxFirmName = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.TextBoxFirmFio = ((System.Windows.Controls.TextBox)(target)); return; case 7: this.TextBoxFirmPlace = ((System.Windows.Controls.TextBox)(target)); return; case 8: this.TextBoxDate = ((System.Windows.Controls.TextBox)(target)); return; case 9: this.TextBoxVehicle = ((System.Windows.Controls.TextBox)(target)); return; case 10: this.TextBoxRent = ((System.Windows.Controls.TextBox)(target)); return; case 11: this.targetPrint = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 12: this.Print = ((System.Windows.Controls.Button)(target)); #line 259 "..\..\MainWindow.xaml" this.Print.Click += new System.Windows.RoutedEventHandler(this.Print_Click); #line default #line hidden return; case 13: this.Exit = ((System.Windows.Controls.Button)(target)); #line 260 "..\..\MainWindow.xaml" this.Exit.Click += new System.Windows.RoutedEventHandler(this.Exit_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Print = ((System.Windows.Controls.MenuItem)(target)); #line 7 "..\..\..\ContainerList.xaml" this.Print.Click += new System.Windows.RoutedEventHandler(this.print_Click); #line default #line hidden return; case 2: this.flowDocViewer = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; } this._contentLoaded = true; }
public FlowDocumentScrollViewerProxy(FlowDocumentScrollViewer proxied) : base(proxied) { }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.dayTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 2: this.monthTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.yearTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 4: this.markName = ((System.Windows.Controls.TextBox)(target)); return; case 5: this.manufacturYear = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.bodyName = ((System.Windows.Controls.TextBox)(target)); return; case 7: this.colorCar = ((System.Windows.Controls.TextBox)(target)); return; case 8: this.IIN = ((System.Windows.Controls.TextBox)(target)); return; case 9: this.plateNumber = ((System.Windows.Controls.TextBox)(target)); return; case 10: this.cashMoney = ((System.Windows.Controls.TextBox)(target)); return; case 11: this.documentViewer = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 12: this.day = ((System.Windows.Controls.TextBlock)(target)); return; case 13: this.month = ((System.Windows.Controls.TextBlock)(target)); return; case 14: this.year = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }
public static FlowDocument AddFlow(this StackPanel sp, Flow flow, MainWindow win) { FlowDocumentParser fdp = new FlowDocumentParser() { TextAlignment = TextAlignment.Left }; fdp.Doc.Cursor = Cursors.Hand; fdp.AddBold(flow.Title); fdp.AddNewLine(); fdp.AddBold("by " + flow.Author.Name + " at " + String.Format("{0:dd/MM/yyyy HH:mm}", flow.UpdatedAt)); fdp.AddNewLine(); fdp.AddBold("Tags: "); fdp.AddPart(String.Join(", ", flow.Tags)); FlowDocumentScrollViewer fdsv = new FlowDocumentScrollViewer() { HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled, Document = fdp.Doc, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, Foreground = new SolidColorBrush(Colors.White), Cursor = Cursors.Hand }; Border border = new Border() { BorderThickness = new Thickness(2, 5, 2, 5), CornerRadius = new CornerRadius(10), Padding = new Thickness(3), Background = new SolidColorBrush(Colors.Black), Cursor = Cursors.Hand, Child = fdsv }; border.PreviewMouseDown += new MouseButtonEventHandler((object sender, MouseButtonEventArgs e) => { e.Handled = true; win.LoadFlow(flow.ID); }); fdp.Doc.PreviewMouseWheel += Bubbler; fdsv.PreviewMouseWheel += Bubbler; fdsv.SizeChanged += Resizer; sp.Children.Add(border); return fdp.Doc; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.fdsvConversation = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 2: this.fdConversation = ((System.Windows.Documents.FlowDocument)(target)); return; case 3: this.pConversation = ((System.Windows.Documents.Paragraph)(target)); return; case 4: this.btnSendMessage = ((System.Windows.Controls.Button)(target)); #line 34 "..\..\ChatWindow.xaml" this.btnSendMessage.Click += new System.Windows.RoutedEventHandler(this.btnSendMessage_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 10 "..\..\..\Views\MultipleControlTypesSupported.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click); #line default #line hidden return; case 2: this.findCtrl = ((Keyoti.RapidFindReplace.WPF.RapidFindReplacePopupControl)(target)); return; case 3: this.g1 = ((System.Windows.Controls.Grid)(target)); return; case 4: this.fld = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); #line 20 "..\..\..\Views\MultipleControlTypesSupported.xaml" this.fld.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.fld_PreviewKeyDown); #line default #line hidden return; case 5: this.ListBox1 = ((System.Windows.Controls.ListBox)(target)); return; } this._contentLoaded = true; }
public void init_show() { //small_title.Width = content_stackpanel.ActualWidth; //newtimer.Elapsed += new System.Timers.ElapsedEventHandler(newtimer_Elapsed); //newtimer.Interval = 1000; //newtimer.Start(); // if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this)) // { // //在此处加载数据并将结果指派给 CollectionViewSource。 // System.Windows.Data.CollectionViewSource myCollectionViewSource = (System.Windows.Data.CollectionViewSource)this.Resources["Resource Key for CollectionViewSource"]; // myCollectionViewSource.Source = your data // } //MediaElement newmedia = new MediaElement(); //newmedia.Source = new Uri(Directory.GetCurrentDirectory() + "\\image\\" + "weicheng.mp4", UriKind.Absolute); //abc.Children.Add(newmedia); //Thread newthread = new Thread(new ThreadStart(() => //{ // Dispatcher.Invoke(new Action(() => // { fcb_public.publicDataSet publicDataSet = ((fcb_public.publicDataSet)(this.FindResource("publicDataSet"))); fcb_public.publicDataSetTableAdapters.elementTableAdapter elpublicDataSetTableAdapters = new publicDataSetTableAdapters.elementTableAdapter(); fcb_public.publicDataSetTableAdapters.element_setTableAdapter elsetpublicDataSetTableAdapters = new fcb_public.publicDataSetTableAdapters.element_setTableAdapter(); fcb_public.publicDataSetTableAdapters.InitializeTableAdapter initpublicDataSetTableAdapters = new fcb_public.publicDataSetTableAdapters.InitializeTableAdapter(); fcb_public.publicDataSetTableAdapters.el_elsetTableAdapter publicDataSetel_elsetTableAdapter = new fcb_public.publicDataSetTableAdapters.el_elsetTableAdapter(); publicDataSetel_elsetTableAdapter.Fill(publicDataSet.el_elset); elpublicDataSetTableAdapters.Fill(publicDataSet.element); elsetpublicDataSetTableAdapters.Fill(publicDataSet.element_set); initpublicDataSetTableAdapters.Fill(publicDataSet.Initialize); if (elset_id > -1 && init_publicdataset == false) { var show_el = from el in publicDataSet.element join el_set in publicDataSet.el_elset on el.ID equals el_set.element_ID where elset_id == el_set.element_set_ID select el; element_count = show_el.Count(); init_publicdataset = true; //newtimer.Interval = 1000; } if (element_count > 0) { var show_el = from el in publicDataSet.element join el_set in publicDataSet.el_elset on el.ID equals el_set.element_ID where el.status == true && el.start_time<=DateTime.Now && el.end_time>=DateTime.Now where el_set.element_set_ID == elset_id select el; // int temp_step = 0; foreach (var t in show_el) { //if (step == temp_step) //{ var show_el_set = from el_set in publicDataSet.element_set join el_elset in publicDataSet.el_elset on el_set.ID equals el_elset.element_ID where el_elset.element_ID == t.ID select el_elset; foreach (var st in show_el_set) { //var sst = from c in publicDataSet.element_set where c.ID == st.element_set_ID select c; //var sst = from c in publicDataSet.element join el in publicDataSet.el_elset on c.ID equals el.element_ID where el.element_set_ID == elset_id select c; var sst = from c in publicDataSet.element_set where c.ID == elset_id select c; foreach (var ssst in sst) { big_title.Text = ssst.elset_name; // break; } } small_title.Text = t.title; titlename.Add(t.ID + "|" + t.title); //10000; if (t.type == "文档") { small_title.Visibility = Visibility.Hidden; RichTextBox newRTB = new RichTextBox(); TextRange documentTextRange = new TextRange(newRTB.Document.ContentStart, newRTB.Document.ContentEnd); MemoryStream stream = new MemoryStream(); StreamWriter sw = new StreamWriter(stream); sw.Write(t.content); sw.Flush(); stream.Seek(0, SeekOrigin.Begin); documentTextRange.Load(stream, DataFormats.Xaml); string xw = XamlWriter.Save(newRTB.Document); StringReader sr = new StringReader(xw); System.Xml.XmlReader xr = System.Xml.XmlReader.Create(sr); FlowDocument doc = XamlReader.Load(xr) as FlowDocument; //var showel = from el in publicDataSet.element join el_set in publicDataSet.el_elset on el.ID equals el_set.element_ID where el.status == true where el_set.element_set_ID == elset_id select el; //foreach (var s in showel) //{ FlowDocumentScrollViewer deldoc = content_stackpanel.FindName("newdoc" + t.ID) as FlowDocumentScrollViewer; if (deldoc != null) { content_stackpanel.Children.Remove(deldoc); content_stackpanel.UnregisterName("newdoc" + t.ID); } FlowDocumentScrollViewer newdoc = new FlowDocumentScrollViewer(); newdoc.Document = doc; // newdoc.Effect = da; //newdoc.Padding = new Thickness(10); newdoc.IsEnabled = false; newdoc.Foreground = Brushes.White; newdoc.Opacity = 0; newdoc.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden; newdoc.Margin = new Thickness(0, 0, 0, 0); newdoc.Width = content_stackpanel.ActualWidth; newdoc.UpdateLayout(); content_stackpanel.Children.Add(newdoc); content_stackpanel.RegisterName("newdoc" + t.ID, newdoc); //newdoc.Name = "newdoc" + t.ID; //Storyboard newstoryboard = new Storyboard(); //ThicknessAnimation txt_animation = new ThicknessAnimation(); //txt_animation.From = new Thickness(0, 0, 0, 0); //txt_animation.To = new Thickness(0, -800, 0, 0); //// newdoc.Visibility = Visibility.Visible; //txt_animation.Duration = TimeSpan.FromSeconds(t.show_time); //newstoryboard.Children.Add(txt_animation); //Storyboard.SetTargetName(txt_animation, newdoc.Name); //Storyboard.SetTargetProperty(txt_animation, new PropertyPath(MarginProperty)); //newstoryboard.Stop(content_stackpanel); //newstoryboard.Begin(content_stackpanel); //DoubleAnimation newadouble = new DoubleAnimation(); //newadouble.From = 1; //newadouble.To = 0; //newadouble.Duration = TimeSpan.FromSeconds(1); //newstoryboard.Children.Add(newadouble); //Storyboard.SetTargetName(newadouble, newdoc.Name); //Storyboard.SetTargetProperty(newadouble, new PropertyPath(OpacityProperty)); //newstoryboard.Begin(content_stackpanel); //DoubleAnimation newadouble = new DoubleAnimation(); //newadouble.From = 1; //newadouble.To = 0; //newadouble.Duration = TimeSpan.FromSeconds(1); //newstoryboard.Children.Add(newadouble); //Storyboard.SetTargetName(txt_animation, newdoc.Name); //Storyboard.SetTargetProperty(newadouble, new PropertyPath(OpacityProperty)); //newstoryboard.Begin(content_stackpanel); //} //show_video.Width = 0; //show_video.Height = 0; //show_image.Width = 0; //show_image.Height = 0; //text_content.Document = doc; //newtimer.Interval = t.show_time * 1000; // newtimer.Stop(); //newtimer.Start(); // PublicClass.show_hight = text_content.Height; //text_content.UpdateLayout(); //content_stackpanel.UpdateLayout(); //ThicknessAnimation wait_animation = new ThicknessAnimation(); //wait_animation.From = new Thickness(0, 0, 0, 0); //wait_animation.To = new Thickness(0, 0, 0, 0); //wait_animation.Duration = TimeSpan.FromSeconds(t.show_time/2); //text_content.BeginAnimation(TextBlock.MarginProperty, wait_animation); // newtimer.Start(); //ThicknessAnimation txt_margin_animation = new ThicknessAnimation(); //txt_margin_animation.From = new Thickness(0, 0, 0, 0); //txt_margin_animation.To = new Thickness(0, -(text_content.ActualHeight), 0, 0); //txt_margin_animation.Duration = TimeSpan.FromSeconds(t.show_time); //text_content.BeginAnimation(FlowDocumentScrollViewer.MarginProperty, txt_margin_animation); // txt_margin_animation.RepeatBehavior = RepeatBehavior.Forever; // newtimer.Interval = t.show_time * 1000; } else if (t.type == "图片") { //text_content.Width = 0; //text_content.Height = 0; //show_video.Width = 0; //show_video.Height = 0; //show_image.Source = new BitmapImage(new Uri(t.content, UriKind.Absolute)); //small_title.Text = t.title; Image delimg = content_stackpanel.FindName("newimage" + t.ID) as Image; if (delimg != null) { content_stackpanel.Children.Remove(delimg); content_stackpanel.UnregisterName("newimage" + t.ID); } content_stackpanel.UpdateLayout(); Image newimage = new Image(); newimage.Opacity = 0; newimage.Source = new BitmapImage(new Uri(t.content, UriKind.Absolute)); newimage.Width = content_stackpanel.ActualWidth; newimage.Height = this.ActualHeight; //newimage.Width = content_stackpanel.Width; //newimage.Height = content_stackpanel.Height; content_stackpanel.Children.Add(newimage); content_stackpanel.RegisterName("newimage" + t.ID, newimage); //Label backlable = new Label(); //small_title.Background = new SolidColorBrush(Color.FromArgb(50, 0, 0, 0)); small_title.Margin = new Thickness(0, content_back.ActualHeight - 150, 0, 0); //backlable.Height = 200; small_title.Width = content_stackpanel.ActualWidth; //Panel.SetZIndex(backlable, 2); //content_stackpanel.Children.Add(backlable); //TextBlock newtextblock = new TextBlock(); } else if (t.type == "视频") { mvlist.Add(t.content); //text_content.Height = 0; //text_content.Width = 0; //show_image.Width = 0; //show_image.Height = 0; //show_video.Source = new Uri(t.content, UriKind.Absolute); // newtimer.Interval = t.show_time * 1000; small_title.Visibility = Visibility.Hidden; } //} //temp_step++; } if (mvlist.Count > 0) { //foreach (var v in show_el) //{ //MediaElement delmedia = content_stackpanel.FindName("newmeida" + v.ID) as MediaElement; //if (delmedia != null) //{ // content_stackpanel.Children.Remove(delmedia); // content_stackpanel.UnregisterName("newmeida" + v.ID); //} MediaElement newmeida = new MediaElement(); content_stackpanel.Children.Add(newmeida); //content_stackpanel.RegisterName("newmeida" + v.ID, newmeida); newmeida.LoadedBehavior = MediaState.Manual; newmeida.UnloadedBehavior = MediaState.Manual; newmeida.MediaEnded += new RoutedEventHandler(newmeida_MediaEnded); newmeida.Source = new Uri(mvlist[0], UriKind.Absolute); content_stackpanel.UpdateLayout(); newmeida.Width = content_stackpanel.ActualWidth; //newmeida.Height = content_stackpanel.ActualHeight; // newmeida.UpdateLayout(); newmeida.Play(); //newmeida.Loaded += new RoutedEventHandler(newmeida_Loaded); //newmeida.Unloaded += new RoutedEventHandler(newmeida_Unloaded); //newmeida.MediaOpened += new RoutedEventHandler(newmeida_MediaOpened); //} } //var showel = from el in publicDataSet.element join el_set in publicDataSet.el_elset on el.ID equals el_set.element_ID where el.status == true where el_set.element_set_ID == elset_id select el; //Storyboard newstoryboard = new Storyboard(); int startanimation = 0; foreach (var s in show_el) { if (s.type == "文档") { //ThicknessAnimation txt_animation = new ThicknessAnimation(); FlowDocumentScrollViewer new_fld = content_stackpanel.FindName("newdoc" + s.ID) as FlowDocumentScrollViewer; new_fld.Name = "newdoc" + s.ID; new_fld.UpdateLayout(); Storyboard newstoryboard1 = new Storyboard(); newstoryboard1.Name = "t" + s.ID; DoubleAnimation newadoubleop = new DoubleAnimation(); newadoubleop.From = 0; newadoubleop.To = 1; newadoubleop.Duration = TimeSpan.FromSeconds(5); newstoryboard1.Children.Add(newadoubleop); Storyboard.SetTargetName(newadoubleop, new_fld.Name); Storyboard.SetTargetProperty(newadoubleop, new PropertyPath(OpacityProperty)); newstoryboard1.Completed += new EventHandler(newstoryboard_Completed); alist.Add(newstoryboard1); if (startanimation == 0) { newstoryboard1.Begin(content_stackpanel); startanimation = 1; } Storyboard newstoryboard2 = new Storyboard(); newstoryboard2.Name = "m" + s.ID; ThicknessAnimation txt_animation = new ThicknessAnimation(); txt_animation.From = new Thickness(0, 0, 0, 0); if (PublicClass.show_hight - new_fld.ActualHeight >= 0) { txt_animation.To = new Thickness(0, 0, 0, 0); } else { txt_animation.To = new Thickness(0, (PublicClass.show_hight - new_fld.ActualHeight), 0, 0); } // newdoc.Visibility = Visibility.Visible; txt_animation.Duration = TimeSpan.FromSeconds(s.show_time); newstoryboard2.Children.Add(txt_animation); Storyboard.SetTargetName(txt_animation, new_fld.Name); Storyboard.SetTargetProperty(txt_animation, new PropertyPath(MarginProperty)); newstoryboard2.Completed += new EventHandler(newstoryboard_Completed); alist.Add(newstoryboard2); //newstoryboard.Stop(content_stackpanel); //newstoryboard.Begin(content_stackpanel); Storyboard newstoryboard3 = new Storyboard(); DoubleAnimation newadouble = new DoubleAnimation(); newadouble.From = 1; newadouble.To = 0; newadouble.Duration = TimeSpan.FromSeconds(5); newstoryboard3.Children.Add(newadouble); Storyboard.SetTargetName(newadouble, new_fld.Name); Storyboard.SetTargetProperty(newadouble, new PropertyPath(OpacityProperty)); newstoryboard3.Completed += new EventHandler(newstoryboard_Completed); alist.Add(newstoryboard3); Storyboard newstoryboard4 = new Storyboard(); //newstoryboard2.Name = "m" + s.ID; ThicknessAnimation txt_animation4 = new ThicknessAnimation(); //txt_animation4.From = new Thickness(0, 0, 0, 0); txt_animation4.To = new Thickness(0, 0, 0, 0); // newdoc.Visibility = Visibility.Visible; txt_animation4.Duration = TimeSpan.FromSeconds(0.1); newstoryboard4.Children.Add(txt_animation4); Storyboard.SetTargetName(txt_animation4, new_fld.Name); Storyboard.SetTargetProperty(txt_animation4, new PropertyPath(MarginProperty)); newstoryboard4.Completed += new EventHandler(newstoryboard_Completed); alist.Add(newstoryboard4); } else if (s.type == "图片") { Image new_img = content_stackpanel.FindName("newimage" + s.ID) as Image; new_img.Name = "newimage" + s.ID; // new_img.UpdateLayout(); Storyboard newstoryboard_img1 = new Storyboard(); newstoryboard_img1.Name = "t1" + s.ID; DoubleAnimation newadoubleop = new DoubleAnimation(); newadoubleop.From = 0; newadoubleop.To = 1; newadoubleop.Duration = TimeSpan.FromSeconds(0.5); newstoryboard_img1.Children.Add(newadoubleop); Storyboard.SetTargetName(newadoubleop, new_img.Name); Storyboard.SetTargetProperty(newadoubleop, new PropertyPath(OpacityProperty)); newstoryboard_img1.Completed += new EventHandler(newstoryboard_img1_Completed); alist.Add(newstoryboard_img1); if (startanimation == 0) { newstoryboard_img1.Begin(content_stackpanel); startanimation = 1; } //newstoryboard_img1.Begin(content_stackpanel); Storyboard newstoryboard_img3 = new Storyboard(); newstoryboard_img3.Name = "t3" + s.ID; DoubleAnimation newadoubleop3 = new DoubleAnimation(); newadoubleop3.From = 1; newadoubleop3.To = 1; newadoubleop3.Duration = TimeSpan.FromSeconds(10); newstoryboard_img3.Children.Add(newadoubleop3); Storyboard.SetTargetName(newadoubleop3, new_img.Name); Storyboard.SetTargetProperty(newadoubleop3, new PropertyPath(OpacityProperty)); newstoryboard_img3.Completed += new EventHandler(newstoryboard_img1_Completed); alist.Add(newstoryboard_img3); Storyboard newstoryboard_img2 = new Storyboard(); newstoryboard_img1.Name = "t2" + s.ID; DoubleAnimation newadoubleop2 = new DoubleAnimation(); newadoubleop2.From = 1; newadoubleop2.To = 0; newadoubleop2.Duration = TimeSpan.FromSeconds(0.5); newstoryboard_img2.Children.Add(newadoubleop2); Storyboard.SetTargetName(newadoubleop2, new_img.Name); Storyboard.SetTargetProperty(newadoubleop2, new PropertyPath(OpacityProperty)); newstoryboard_img2.Completed += new EventHandler(newstoryboard_img1_Completed); alist.Add(newstoryboard_img2); //newstoryboard_img2.Begin(content_stackpanel); } } //newstoryboard.Begin(content_stackpanel); //step++; //if (step > element_count) //{ // step = 0; //} } // })); //})); //newthread.SetApartmentState(ApartmentState.MTA); //newthread.IsBackground = true; ////newthread.Priority = ThreadPriority.AboveNormal; //newthread.Start(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mainPane = ((System.Windows.Controls.DockPanel)(target)); return; case 2: this.Configuration = ((PosControls.ConfigurationManager)(target)); return; case 3: #line 13 "..\..\..\GeneralSettingsUpdateControl.xaml" ((System.Windows.Controls.Grid)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Grid_Loaded); #line default #line hidden return; case 4: this.dragScrollViewer = ((PosControls.DragScrollViewer)(target)); return; case 5: this.flowDocumentScroll = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 6: this.buttonVersionCheck = ((PosControls.TextBlockButton)(target)); #line 43 "..\..\..\GeneralSettingsUpdateControl.xaml" this.buttonVersionCheck.Click += new System.Windows.RoutedEventHandler(this.buttonVersionCheck_Click); #line default #line hidden return; case 7: this.buttonUpdate = ((PosControls.TextBlockButton)(target)); #line 44 "..\..\..\GeneralSettingsUpdateControl.xaml" this.buttonUpdate.Click += new System.Windows.RoutedEventHandler(this.buttonUpdate_Click); #line default #line hidden return; case 8: this.progressBar = ((System.Windows.Controls.ProgressBar)(target)); return; case 9: this.radioButtonAutoUpdateIsEnabled = ((PosControls.PushRadioButton)(target)); #line 54 "..\..\..\GeneralSettingsUpdateControl.xaml" this.radioButtonAutoUpdateIsEnabled.SelectionGained += new System.EventHandler(this.radioButtonAutoUpdateIsEnabled_SelectionGained); #line default #line hidden return; case 10: this.radioButtonAutoUpdateIsNotEnabled = ((PosControls.PushRadioButton)(target)); #line 55 "..\..\..\GeneralSettingsUpdateControl.xaml" this.radioButtonAutoUpdateIsNotEnabled.SelectionGained += new System.EventHandler(this.radioButtonAutoUpdateIsNotEnabled_SelectionGained); #line default #line hidden return; case 11: this.textBoxServer = ((PosControls.CustomTextBox)(target)); #line 57 "..\..\..\GeneralSettingsUpdateControl.xaml" this.textBoxServer.TextChanged += new System.Windows.RoutedEventHandler(this.textBoxServer_TextChanged); #line default #line hidden return; case 12: this.textBoxPort = ((PosControls.CustomTextBox)(target)); #line 58 "..\..\..\GeneralSettingsUpdateControl.xaml" this.textBoxPort.TextChanged += new System.Windows.RoutedEventHandler(this.textBoxPort_TextChanged); #line default #line hidden return; case 13: this.buttonSave = ((PosControls.TextBlockButton)(target)); #line 59 "..\..\..\GeneralSettingsUpdateControl.xaml" this.buttonSave.Click += new System.Windows.RoutedEventHandler(this.buttonSave_Click); #line default #line hidden return; } this._contentLoaded = true; }
private static ScrollViewer FindScrollViewer(FlowDocumentScrollViewer viewer) { if (VisualTreeHelper.GetChildrenCount(viewer) == 0) return null; DependencyObject first = VisualTreeHelper.GetChild(viewer, 0); if (first == null) return null; Decorator border = (Decorator)VisualTreeHelper.GetChild(first, 0); if (border == null) return null; return (ScrollViewer)border.Child; }
/// <summary> /// Creates an instance of the AnnotationService focused on a particular /// FlowDocumentScrollViewer. /// </summary> /// <param name="viewer">the viewer this service will operate on</param> /// <exception cref="ArgumentNullException">viewer is null</exception> public AnnotationService(FlowDocumentScrollViewer viewer) { if (viewer == null) throw new ArgumentNullException("viewer"); Initialize(viewer); }
public CommentBoad() { this.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(50, GridUnitType.Pixel) }); this.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) }); this.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(50, GridUnitType.Pixel) }); // Game Info Players = "Player 1 (Black) vs Player 2 (White)"; PlayersText = new TextBlock() { Text = Players, FontSize = 20, HorizontalAlignment = System.Windows.HorizontalAlignment.Center, Margin = new Thickness(10, 5, 5, 10), }; this.Children.Add(PlayersText); docContainer = new FlowDocumentScrollViewer() { VerticalScrollBarVisibility = ScrollBarVisibility.Auto, HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden, }; Text = new CommentText(); docContainer.Document = Text; this.Children.Add(docContainer); CloseButton = new Button() { Content = "Hide", HorizontalAlignment = System.Windows.HorizontalAlignment.Right, Width=100, Height=25, Margin = new Thickness(5,5,5,5), Visibility = System.Windows.Visibility.Collapsed }; CloseButton.Click += CloseButton_Click; this.Children.Add(CloseButton); // Grid.SetRow(PlayersText, 0); Grid.SetRow(docContainer, 1); Grid.SetRow(CloseButton, 2); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ExpressionViewerWindow = ((BaseWPFLibrary.Forms.ExceptionViewer)(target)); #line 10 "..\..\..\Forms\ExceptionViewer.xaml" this.ExpressionViewerWindow.Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden #line 11 "..\..\..\Forms\ExceptionViewer.xaml" this.ExpressionViewerWindow.SizeChanged += new System.Windows.SizeChangedEventHandler(this.ExpressionViewerWindow_SizeChanged); #line default #line hidden return; case 2: this.mainGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.treeCol = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 4: this.textCol = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 5: this.treeView1 = ((System.Windows.Controls.TreeView)(target)); #line 32 "..\..\..\Forms\ExceptionViewer.xaml" this.treeView1.SelectedItemChanged += new System.Windows.RoutedPropertyChangedEventHandler <object>(this.treeView1_SelectedItemChanged); #line default #line hidden return; case 6: this.docViewer = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; case 7: this.chkWrap = ((System.Windows.Controls.CheckBox)(target)); #line 63 "..\..\..\Forms\ExceptionViewer.xaml" this.chkWrap.Checked += new System.Windows.RoutedEventHandler(this.chkWrap_Checked); #line default #line hidden #line 66 "..\..\..\Forms\ExceptionViewer.xaml" this.chkWrap.Unchecked += new System.Windows.RoutedEventHandler(this.chkWrap_Unchecked); #line default #line hidden return; case 8: this.btnCopy = ((System.Windows.Controls.Button)(target)); #line 75 "..\..\..\Forms\ExceptionViewer.xaml" this.btnCopy.Click += new System.Windows.RoutedEventHandler(this.btnCopy_Click); #line default #line hidden return; case 9: this.btnClose = ((System.Windows.Controls.Button)(target)); #line 84 "..\..\..\Forms\ExceptionViewer.xaml" this.btnClose.Click += new System.Windows.RoutedEventHandler(this.btnClose_Click); #line default #line hidden return; } this._contentLoaded = true; }
/// <summary> /// New instance. /// </summary> public FlowDocumentScrollViewerRunReader(FlowDocumentScrollViewer docViewer) { this.docViewer = docViewer; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 11 "..\..\..\Reports\QuotationReport.xaml" ((ShortBody.Reports.QuotationReport)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden return; case 2: this.MainGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.TopPanel = ((System.Windows.Controls.StackPanel)(target)); return; case 4: #line 139 "..\..\..\Reports\QuotationReport.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 5: #line 142 "..\..\..\Reports\QuotationReport.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.PrintPreview_Click); #line default #line hidden return; case 6: this.Document = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); #line 148 "..\..\..\Reports\QuotationReport.xaml" this.Document.Loaded += new System.Windows.RoutedEventHandler(this.FlowDocumentPageViewer_Loaded); #line default #line hidden return; case 7: this.FD = ((System.Windows.Documents.FlowDocument)(target)); return; case 8: this.helperPanel = ((System.Windows.Controls.StackPanel)(target)); return; case 9: this.btnFsIncrease = ((System.Windows.Controls.Button)(target)); #line 265 "..\..\..\Reports\QuotationReport.xaml" this.btnFsIncrease.Click += new System.Windows.RoutedEventHandler(this.btnFsIncrease_Click); #line default #line hidden return; case 10: this.btnFsDecrease = ((System.Windows.Controls.Button)(target)); #line 269 "..\..\..\Reports\QuotationReport.xaml" this.btnFsDecrease.Click += new System.Windows.RoutedEventHandler(this.btnFsDecrease_Click); #line default #line hidden return; case 11: this.btnClearFormatting = ((System.Windows.Controls.Button)(target)); #line 273 "..\..\..\Reports\QuotationReport.xaml" this.btnClearFormatting.Click += new System.Windows.RoutedEventHandler(this.btnClearFormatting_Click); #line default #line hidden return; case 12: this.btnBolden = ((System.Windows.Controls.Button)(target)); #line 277 "..\..\..\Reports\QuotationReport.xaml" this.btnBolden.Click += new System.Windows.RoutedEventHandler(this.btnBolden_Click); #line default #line hidden return; case 13: this.btnUnderline = ((System.Windows.Controls.Button)(target)); #line 281 "..\..\..\Reports\QuotationReport.xaml" this.btnUnderline.Click += new System.Windows.RoutedEventHandler(this.btnUnderline_Click); #line default #line hidden return; case 14: this.btnItalicize = ((System.Windows.Controls.Button)(target)); #line 286 "..\..\..\Reports\QuotationReport.xaml" this.btnItalicize.Click += new System.Windows.RoutedEventHandler(this.btnItalicize_Click); #line default #line hidden return; case 15: this.btnDeleteItem = ((System.Windows.Controls.Button)(target)); #line 291 "..\..\..\Reports\QuotationReport.xaml" this.btnDeleteItem.Click += new System.Windows.RoutedEventHandler(this.DeleteButton_Click); #line default #line hidden return; case 16: this.ItemsDataGrid = ((System.Windows.Controls.DataGrid)(target)); #line 309 "..\..\..\Reports\QuotationReport.xaml" this.ItemsDataGrid.BeginningEdit += new System.EventHandler <System.Windows.Controls.DataGridBeginningEditEventArgs>(this.ItemsDataGrid_BeginningEdit); #line default #line hidden #line 309 "..\..\..\Reports\QuotationReport.xaml" this.ItemsDataGrid.Sorting += new System.Windows.Controls.DataGridSortingEventHandler(this.ItemsDataGrid_Sorting); #line default #line hidden #line 310 "..\..\..\Reports\QuotationReport.xaml" this.ItemsDataGrid.PreviewMouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.ItemsDataGrid_PreviewMouseWheel); #line default #line hidden #line 313 "..\..\..\Reports\QuotationReport.xaml" this.ItemsDataGrid.KeyUp += new System.Windows.Input.KeyEventHandler(this.ItemsDataGrid_KeyUp); #line default #line hidden #line 313 "..\..\..\Reports\QuotationReport.xaml" this.ItemsDataGrid.CellEditEnding += new System.EventHandler <System.Windows.Controls.DataGridCellEditEndingEventArgs>(this.ItemsDataGrid_CellEditEnding); #line default #line hidden #line 315 "..\..\..\Reports\QuotationReport.xaml" this.ItemsDataGrid.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ItemsDataGrid_SelectionChanged); #line default #line hidden #line 315 "..\..\..\Reports\QuotationReport.xaml" this.ItemsDataGrid.LoadingRow += new System.EventHandler <System.Windows.Controls.DataGridRowEventArgs>(this.ItemsDataGrid_LoadingRow); #line default #line hidden return; case 17: this.tbVatAmount = ((System.Windows.Controls.TextBox)(target)); return; case 18: this.tbSubTotal = ((System.Windows.Controls.TextBox)(target)); return; case 19: this.tbVat = ((System.Windows.Controls.TextBox)(target)); return; case 20: this.tbTotal = ((System.Windows.Controls.TextBox)(target)); return; case 21: this.SpAccountNavigator = ((System.Windows.Controls.StackPanel)(target)); return; case 22: this.btnUp = ((System.Windows.Controls.Button)(target)); #line 435 "..\..\..\Reports\QuotationReport.xaml" this.btnUp.Click += new System.Windows.RoutedEventHandler(this.CounterBtn_Click); #line default #line hidden return; case 23: this.tbCounter = ((System.Windows.Controls.TextBlock)(target)); return; case 24: this.btnDown = ((System.Windows.Controls.Button)(target)); #line 441 "..\..\..\Reports\QuotationReport.xaml" this.btnDown.Click += new System.Windows.RoutedEventHandler(this.CounterBtn_Click); #line default #line hidden return; } this._contentLoaded = true; }
public static void setDoc(FlowDocumentScrollViewer fd,MainWindow m) { fscroll = fd; fdoc = fd.Document; paragraphLog = new Paragraph(); fdoc.Blocks.Add(paragraphLog); fdoc.LineHeight = 10; window = m; timer = new Timer(1000); timer.Elapsed += Timer_Elapsed; timer.AutoReset = true; timer.Start(); linesPerSecond = 0; //fdoc.FontFamily = new FontFamily("Lucida Console"); //fdoc.FontSize = 10; //fdoc.LineStackingStrategy = System.Windows.LineStackingStrategy.BlockLineHeight; //fdoc.LineHeight = 10; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 4 "..\..\..\..\View\view2d.xaml" ((VisualPacker.view2d)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden return; case 2: this.Print = ((System.Windows.Controls.MenuItem)(target)); #line 7 "..\..\..\..\View\view2d.xaml" this.Print.Click += new System.Windows.RoutedEventHandler(this.print_Click); #line default #line hidden return; case 3: this.flowDocViewer = ((System.Windows.Controls.FlowDocumentScrollViewer)(target)); return; } this._contentLoaded = true; }
private async void OnUrlChangedImp(DependencyPropertyChangedEventArgs e) { var u = (string)e.NewValue; if (string.IsNullOrEmpty(u)) return; UiInvoke(() => ReasonPhrase = Properties.Resources.DownloadinPrompt); var fp = await HttpDownloadToLocalFile.DownloadAsync(u, "html", ".htm","text/html", 1*1024* 1024); if(string.IsNullOrEmpty(fp) || !File.Exists(fp)) { UiInvoke(() => ReasonPhrase = Properties.Resources.DownloadFailedPrompt); return; } var fdocn = fp + ".xaml"; if(!File.Exists(fdocn)) { var charset = File.ReadAllText(fp + ".enc"); if(string.IsNullOrEmpty(charset)) { charset = DetectEncoding(fp); }//zh-cn 不能被getencoding识别 if("zh-cn".Equals(charset,StringComparison.InvariantCultureIgnoreCase)) { charset = "gb2312"; } var enc = string.IsNullOrEmpty(charset) ? Encoding.GetEncoding(936) : Encoding.GetEncoding(charset); UiInvoke(()=>ReasonPhrase = Properties.Resources.FormattingPrompt); var result = new NReadabilityTranscoder().Transcode(new TranscodingInput(File.ReadAllText(fp,enc)) { Url = u, BackupFilePath = fp, }); if(result.ContentExtracted) { File.WriteAllText(fdocn,result.ExtractedContent); UiInvoke(()=>ReasonPhrase = Properties.Resources.ReadyPrompt); }else { UiInvoke(()=>ReasonPhrase = Properties.Resources.ConvertingFailedPrompt); return; } } UiInvoke(() => { var fdoc = (FlowDocument)XamlReader.Load(File.OpenRead(fdocn)); if (fdoc == null) { ReasonPhrase = Properties.Resources.ConvertingFailedPrompt; return; } _container.Children.Clear(); var fv = new FlowDocumentScrollViewer { Document = fdoc }; _container.Children.Add(fv); }); }