private void LoadImage(BitmapSource bitmap,ref FlowDocumentReader fdr) { fdr.Document.PageWidth=bitmap.Width+33; fdr.Document.Blocks.Add ( new Paragraph ( new InlineUIContainer() { Child= new Image() { HorizontalAlignment=HorizontalAlignment.Left, VerticalAlignment=VerticalAlignment.Top, Stretch=Stretch.None, Source=bitmap } } ) ); SetInformation(app.Language.Image); fdr.IsFindEnabled=false; fdr.MaxZoom=1000; fdr.MinZoom=80; }
private void SaveImage(ref FlowDocumentReader fdr) { string mask=app.Language.BitmapImage+" (*.bmp)|*.bmp|JPEG (*.jpg)|*.jpg|Portable Network Graphics (*.png)|*.png|Graphics Interchange Format (*.gif)|*.gif|Tagged Image File Format (*.tiff)|*.tiff"; SaveFileDialog Save=CreateSaveDialog(mask,app.Language.Save); if(Save.ShowDialog(this).GetValueOrDefault()) { FileStream file=SafeFileMethods.CreateFile(Save.FileName); if(file==null) { ShowNotification(app.Language.SaveImageError,Title,System.Windows.Forms.ToolTipIcon.Error); return; } object obj=GetParagraphImage(ref FlowDocReader); if(obj==null)goto CloseStream; BitmapFrame frame=BitmapFrame.Create(obj as BitmapSource); ImageType imgtype; switch(Save.FilterIndex) { case 1:imgtype=ImageType.Bmp;break; case 2:imgtype=ImageType.Jpg;break; case 3:imgtype=ImageType.Png;break; case 4:imgtype=ImageType.Gif;break; case 5:imgtype=ImageType.Tiff;break; default:imgtype=ImageType.Bmp;break; } CreateImageFile(file,frame,imgtype); CloseStream:file.Close(); } }
private void LoadClipboardData(string format,ref FlowDocumentReader fdr) { object obj=GetClipboardData(format); if(obj==null) { SetInformation(app.Language.Unknown); return; } switch (format) { case "Rich Text Format": LoadText ( obj as string, ref fdr, format ); SetInformation(app.Language.Text); break; case "UnicodeText": case "Text": case "OEMText": LoadPlainText ( obj as string, ref fdr ); SetInformation(app.Language.Text); break; case "FileDrop": case "FileNameW": case "FileName": LoadPlainText ( obj as string[], ref fdr ); SetInformation(app.Language.Files); break; case "Bitmap": LoadImage ( obj as BitmapSource, ref fdr ); break; case "DeviceIndependentBitmap": case "Format17": { MemoryStream ms=obj as MemoryStream; LoadImage ( DibImageV5.ConvertDibToImageSource(ref ms), ref fdr ); } break; } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.flowDocReader = ((System.Windows.Controls.FlowDocumentReader)(target)); return; } this._contentLoaded = true; }
private object GetParagraphImage(ref FlowDocumentReader FlowDocReader) { object obj=null; try { Paragraph p=FlowDocReader.Document.Blocks.FirstBlock as Paragraph; InlineUIContainer iui=p.Inlines.FirstInline as InlineUIContainer; Image image=iui.Child as Image; obj=image.Source as BitmapSource; } catch(Exception e) { obj=null; ShowNotification(e.Message,Title,System.Windows.Forms.ToolTipIcon.Error); } return obj; }
private void LoadPlainText(string text,ref FlowDocumentReader fdr) { fdr.Document.PageWidth=816; TextRange tr= new TextRange ( fdr.Document.ContentStart, fdr.Document.ContentEnd ) { Text=text }; tr.Select ( fdr.Document.ContentStart, fdr.Document.ContentStart ); }
/// <summary> /// </summary> /// <param name="time"> </param> /// <param name="playerName"></param> /// <param name="line"> </param> /// <param name="colors"> </param> /// <param name="flow"> </param> public void AppendFlow(string time, string playerName, string line, string[] colors, FlowDocumentReader flow) { Func<bool> funcAppend = delegate { DispatcherHelper.Invoke(delegate { var timeStampColor = _stb.Convert(String.IsNullOrWhiteSpace(colors[0]) ? "#FFFFFFFF" : colors[0]); var lineColor = _stb.Convert(String.IsNullOrWhiteSpace(colors[1]) ? "#FFFFFFFF" : colors[1]); var paraGraph = new Paragraph(); var timeStamp = new Span(new Run(time)) { Foreground = (Brush) timeStampColor, FontWeight = FontWeights.Bold }; var coloredLine = new Span(new Run(line)) { Foreground = (Brush) lineColor }; paraGraph.Inlines.Add(timeStamp); if (!String.IsNullOrWhiteSpace(playerName)) { var playerColor = _stb.Convert("#FFFF00FF"); var playerLine = new Span(new Run("[" + playerName + "] ")) { Foreground = (Brush) playerColor }; paraGraph.Inlines.Add(playerLine); } paraGraph.Inlines.Add(coloredLine); flow.Document.Blocks.Add(paraGraph); flow.Document.Blocks.LastBlock.Loaded += BlockLoaded; if (flow.Document.Blocks.Count <= 500) { return; } flow.Document.Blocks.Clear(); }); return true; }; funcAppend.BeginInvoke(null, null); }
private void SaveText(ref FlowDocumentReader fdr) { string mask="Rich Text Format (*.rtf)|*.rtf|"+app.Language.TextDocument+" (*.txt)|*.txt|"+app.Language.AllFiles+" (*.*)|*.*"; SaveFileDialog Save=CreateSaveDialog(mask,app.Language.Save); if(Save.ShowDialog(this).GetValueOrDefault()) { FileStream file=SafeFileMethods.CreateFile(Save.FileName); if(file==null) { ShowNotification(app.Language.SaveTextError,Title,System.Windows.Forms.ToolTipIcon.Error); return; } TextRange tr=new TextRange(fdr.Document.ContentStart,fdr.Document.ContentEnd); tr.Select(fdr.Document.ContentStart,fdr.Document.ContentEnd); if(Save.FilterIndex>1) tr.Save(file,DataFormats.Text); else tr.Save(file,DataFormats.Rtf); tr.Select(fdr.Document.ContentStart,fdr.Document.ContentStart); file.Close(); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 5 "..\..\..\MainWindow.xaml" ((Lotto.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.Window_KeyDown); #line default #line hidden #line 6 "..\..\..\MainWindow.xaml" ((Lotto.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden return; case 2: #line 10 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.CopyOfFlow_Click); #line default #line hidden return; case 3: #line 13 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MeaningChance_Click); #line default #line hidden return; case 4: #line 19 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.PasteToTextBox_Click); #line default #line hidden return; case 5: this.textnomove = ((System.Windows.Controls.TextBlock)(target)); return; case 6: this.help = ((System.Windows.Controls.Button)(target)); #line 610 "..\..\..\MainWindow.xaml" this.help.Click += new System.Windows.RoutedEventHandler(this.helpBotton_Click); #line default #line hidden return; case 7: this.grid1 = ((System.Windows.Controls.Grid)(target)); return; case 8: this.calendar = ((System.Windows.Controls.Calendar)(target)); #line 641 "..\..\..\MainWindow.xaml" this.calendar.SelectedDatesChanged += new System.EventHandler<System.Windows.Controls.SelectionChangedEventArgs>(this.calendar_SelectedDatesChanged); #line default #line hidden return; case 9: this.BallD = ((System.Windows.Controls.Grid)(target)); return; case 10: this.BallN = ((System.Windows.Controls.Grid)(target)); return; case 11: this.borde = ((System.Windows.Controls.Border)(target)); return; case 12: this.BeginStoryBoard1 = ((System.Windows.Media.Animation.BeginStoryboard)(target)); return; case 13: this.BeginStoryBoard2 = ((System.Windows.Media.Animation.BeginStoryboard)(target)); return; case 14: this.BeginStoryBoard3 = ((System.Windows.Media.Animation.BeginStoryboard)(target)); return; case 15: this.BeginStoryBoard4 = ((System.Windows.Media.Animation.BeginStoryboard)(target)); return; case 16: this.addBotton = ((System.Windows.Controls.Primitives.ToggleButton)(target)); #line 782 "..\..\..\MainWindow.xaml" this.addBotton.Click += new System.Windows.RoutedEventHandler(this.addBotton_Click); #line default #line hidden return; case 17: this.seeGrid = ((System.Windows.Controls.Grid)(target)); return; case 18: #line 815 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Combination_Click); #line default #line hidden return; case 19: this.number1 = ((System.Windows.Controls.TextBox)(target)); return; case 20: this.number2 = ((System.Windows.Controls.TextBox)(target)); return; case 21: this.number3 = ((System.Windows.Controls.TextBox)(target)); return; case 22: this.reporte = ((System.Windows.Controls.Button)(target)); #line 826 "..\..\..\MainWindow.xaml" this.reporte.Click += new System.Windows.RoutedEventHandler(this.reporte_Click); #line default #line hidden return; case 23: #line 831 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.See_Click); #line default #line hidden return; case 24: this.countSee = ((System.Windows.Controls.TextBox)(target)); return; case 25: #line 842 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AfterC_Click); #line default #line hidden return; case 26: this.afterthenC = ((System.Windows.Controls.TextBox)(target)); return; case 27: #line 851 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AfterS_Click); #line default #line hidden return; case 28: this.afterthenS = ((System.Windows.Controls.TextBox)(target)); return; case 29: #line 867 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.After_Click); #line default #line hidden return; case 30: this.afterthen = ((System.Windows.Controls.TextBox)(target)); return; case 31: #line 876 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AfterTD_Click); #line default #line hidden return; case 32: this.afterthenTD = ((System.Windows.Controls.TextBox)(target)); return; case 33: this.fijoCheckBox = ((System.Windows.Controls.CheckBox)(target)); return; case 34: this.TDCheckBox = ((System.Windows.Controls.CheckBox)(target)); return; case 35: this.gridMeanning = ((System.Windows.Controls.Grid)(target)); return; case 36: this.totalTB = ((System.Windows.Controls.TextBlock)(target)); return; case 37: this.daysListBox = ((System.Windows.Controls.ListBox)(target)); #line 905 "..\..\..\MainWindow.xaml" this.daysListBox.KeyUp += new System.Windows.Input.KeyEventHandler(this.daysListBox_KeyUp); #line default #line hidden return; case 38: #line 923 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Expander)(target)).Expanded += new System.Windows.RoutedEventHandler(this.Expander_Expanded1); #line default #line hidden #line 923 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Expander)(target)).Collapsed += new System.Windows.RoutedEventHandler(this.Expander_Collapsed1); #line default #line hidden return; case 39: this.meaning = ((System.Windows.Controls.TextBox)(target)); #line 930 "..\..\..\MainWindow.xaml" this.meaning.KeyUp += new System.Windows.Input.KeyEventHandler(this.meaning_KeyUp); #line default #line hidden return; case 40: this.CountTimes = ((System.Windows.Controls.Grid)(target)); return; case 41: #line 1036 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.insertBotton_Click); #line default #line hidden return; case 42: this.datePicker = ((System.Windows.Controls.DatePicker)(target)); return; case 43: this.fijo = ((System.Windows.Controls.TextBox)(target)); return; case 44: this.corrido1 = ((System.Windows.Controls.TextBox)(target)); return; case 45: this.corrido2 = ((System.Windows.Controls.TextBox)(target)); return; case 46: this.dia = ((System.Windows.Controls.RadioButton)(target)); return; case 47: this.noche = ((System.Windows.Controls.RadioButton)(target)); return; case 48: #line 1075 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AddCombinationOk_Click); #line default #line hidden return; case 49: this.fechafijocorrido = ((System.Windows.Controls.TextBox)(target)); #line 1087 "..\..\..\MainWindow.xaml" this.fechafijocorrido.KeyDown += new System.Windows.Input.KeyEventHandler(this.fechafijocorrido_KeyDown); #line default #line hidden #line 1087 "..\..\..\MainWindow.xaml" this.fechafijocorrido.KeyUp += new System.Windows.Input.KeyEventHandler(this.fechafijocorrido_KeyUp); #line default #line hidden return; case 50: this.add = ((System.Windows.Controls.Button)(target)); #line 1090 "..\..\..\MainWindow.xaml" this.add.Click += new System.Windows.RoutedEventHandler(this.AddCombination_Click); #line default #line hidden return; case 51: this.grid2 = ((System.Windows.Controls.ScrollViewer)(target)); return; case 52: #line 1115 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Descendents_Click); #line default #line hidden return; case 53: this.listBox = ((System.Windows.Controls.ListBox)(target)); return; case 54: #line 1121 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Ascendents_Click); #line default #line hidden return; case 55: #line 1139 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Fijo_Click); #line default #line hidden return; case 56: #line 1141 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Corrido_Click); #line default #line hidden return; case 57: #line 1143 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DesdeFijo_Click); #line default #line hidden return; case 58: #line 1145 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DesdeCorrido_Click); #line default #line hidden return; case 59: #line 1148 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DescendentsTD_Click); #line default #line hidden return; case 60: this.listBoxDT = ((System.Windows.Controls.ListBox)(target)); return; case 61: #line 1155 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AscendentsDT_Click); #line default #line hidden return; case 62: #line 1173 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Terminal_Click); #line default #line hidden return; case 63: #line 1175 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Decena_Click); #line default #line hidden return; case 64: #line 1177 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DesdeTerminal_Click); #line default #line hidden return; case 65: #line 1179 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DesdeDecena_Click); #line default #line hidden return; case 66: #line 1182 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DescendentsC_Click); #line default #line hidden return; case 67: this.listBoxC = ((System.Windows.Controls.ListBox)(target)); return; case 68: #line 1189 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AscendentsC_Click); #line default #line hidden return; case 69: #line 1206 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Centena_Click); #line default #line hidden return; case 70: #line 1208 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DesdeCentena_Click); #line default #line hidden return; case 71: #line 1211 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DescendentsS_Click); #line default #line hidden return; case 72: this.listBoxS = ((System.Windows.Controls.ListBox)(target)); return; case 73: #line 1218 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AscendentsS_Click); #line default #line hidden return; case 74: #line 1235 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Suma_Click); #line default #line hidden return; case 75: #line 1237 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DesdeSuma_Click); #line default #line hidden return; case 76: this.comboBoxYear = ((System.Windows.Controls.ComboBox)(target)); #line 1245 "..\..\..\MainWindow.xaml" this.comboBoxYear.Loaded += new System.Windows.RoutedEventHandler(this.ComboBoxYear_Loaded); #line default #line hidden #line 1246 "..\..\..\MainWindow.xaml" this.comboBoxYear.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ComboBoxYear_SelectionChanged); #line default #line hidden return; case 77: this.zoomSlider = ((System.Windows.Controls.Slider)(target)); return; case 78: this.gridFlow = ((System.Windows.Controls.Grid)(target)); return; case 79: this.gridmonths = ((System.Windows.Controls.Grid)(target)); return; case 80: this.listMYAll = ((System.Windows.Controls.ListBox)(target)); return; case 81: this.comboBox = ((System.Windows.Controls.ComboBox)(target)); #line 1316 "..\..\..\MainWindow.xaml" this.comboBox.Loaded += new System.Windows.RoutedEventHandler(this.ComboBox_Loaded); #line default #line hidden #line 1317 "..\..\..\MainWindow.xaml" this.comboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ComboBox_SelectionChanged); #line default #line hidden return; case 82: this.comboBox1 = ((System.Windows.Controls.ComboBox)(target)); #line 1323 "..\..\..\MainWindow.xaml" this.comboBox1.Loaded += new System.Windows.RoutedEventHandler(this.ComboBox_Loaded1); #line default #line hidden #line 1324 "..\..\..\MainWindow.xaml" this.comboBox1.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ComboBox_SelectionChanged1); #line default #line hidden return; case 83: #line 1325 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Print_Click); #line default #line hidden return; case 84: this.zoomSlider1 = ((System.Windows.Controls.Slider)(target)); return; case 85: #line 1354 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click); #line default #line hidden return; case 86: this.textBoxWrite1 = ((System.Windows.Controls.TextBox)(target)); #line 1359 "..\..\..\MainWindow.xaml" this.textBoxWrite1.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.textBoxWrite_PreviewKeyDown); #line default #line hidden return; case 87: this.textBoxWrite2 = ((System.Windows.Controls.TextBox)(target)); #line 1366 "..\..\..\MainWindow.xaml" this.textBoxWrite2.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.textBoxWrite_PreviewKeyDown); #line default #line hidden return; case 88: this.autotestListBox = ((System.Windows.Controls.ListBox)(target)); return; case 89: #line 1405 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AutoEvaluation_Click); #line default #line hidden return; case 90: this.countAuto = ((System.Windows.Controls.TextBox)(target)); return; case 91: #line 1417 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 92: #line 1420 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked_2); #line default #line hidden return; case 93: #line 1428 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked_3); #line default #line hidden return; case 94: #line 1699 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.normal_Checked); #line default #line hidden return; case 95: #line 1701 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.solodia_Checked); #line default #line hidden return; case 96: #line 1703 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.solonoche_Checked); #line default #line hidden return; case 97: this.flowDocumentReader = ((System.Windows.Controls.FlowDocumentReader)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.fdrReader = ((System.Windows.Controls.FlowDocumentReader)(target)); return; case 2: this.printedPage = ((System.Windows.Documents.FlowDocument)(target)); return; case 3: this.headerInfo = ((System.Windows.Documents.TableRowGroup)(target)); return; case 4: this.header = ((System.Windows.Documents.TableRowGroup)(target)); return; case 5: this.srvcRow = ((System.Windows.Documents.TableRowGroup)(target)); return; case 6: this.tblServices = ((System.Windows.Documents.TableRowGroup)(target)); return; case 7: this.Fee = ((System.Windows.Documents.Paragraph)(target)); return; case 8: this.cmntRow = ((System.Windows.Documents.TableRowGroup)(target)); return; case 9: this.comment = ((System.Windows.Documents.Paragraph)(target)); return; case 10: #line 85 "..\..\..\VisitPrint.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; } this._contentLoaded = true; }
/// <summary> /// Creates an instance of the AnnotationService focused on a particular /// FlowDocumentReader. /// </summary> /// <param name="viewer">the viewer this service will operate on</param> /// <exception cref="ArgumentNullException">viewer is null</exception> public AnnotationService(FlowDocumentReader viewer) { if (viewer == null) throw new ArgumentNullException("viewer"); Initialize(viewer); }
/// <summary> /// Returns the AnnotationService enabled for the reader. If no service is /// enabled for the reader, returns null. /// </summary> /// <param name="reader">reader to check for an enabled AnnotationService</param> /// <returns>the AnnotationService instance for this reader, null if a service /// is not enabled for this reader</returns> /// <exception cref="ArgumentNullException">reader is null</exception> public static AnnotationService GetService(FlowDocumentReader reader) { if (reader == null) throw new ArgumentNullException("reader"); return reader.GetValue(AnnotationService.ServiceProperty) as AnnotationService; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 4 "..\..\..\View\ReporterWindow.xaml" ((EngineCalculate.ReporterWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.FlowDocument = ((System.Windows.Controls.FlowDocumentReader)(target)); return; case 3: this.GoToMain = ((System.Windows.Controls.Button)(target)); #line 11 "..\..\..\View\ReporterWindow.xaml" this.GoToMain.Click += new System.Windows.RoutedEventHandler(this.GoToMain_OnClick); #line default #line hidden return; case 4: this.SaveReport = ((System.Windows.Controls.Button)(target)); #line 12 "..\..\..\View\ReporterWindow.xaml" this.SaveReport.Click += new System.Windows.RoutedEventHandler(this.SaveReport_Click); #line default #line hidden return; case 5: this.ChangeReport = ((System.Windows.Controls.Button)(target)); #line 13 "..\..\..\View\ReporterWindow.xaml" this.ChangeReport.Click += new System.Windows.RoutedEventHandler(this.ChangeReport_OnClick); #line default #line hidden return; } this._contentLoaded = true; }
private void CreateFlowDocReader() { ContextMenu menu=new ContextMenu(); MenuItem item= CreateMenuItem ( app.Language.Copy, ImageConverter.IconToBitmapFrame(Properties.Resources.Copy) ); item.Command=ApplicationCommands.Copy; item.ToolTip= new TextBlock() { Text=app.Language.CopyDescription }; menu.Items.Add(item); FlowDocument FlowDoc= new FlowDocument() { AllowDrop=false, FontSize=12, FontFamily=new FontFamily("Segoe UI"), ContextMenu=menu }; FlowDocReader= new FlowDocumentReader() { Name="FlowDocReader", Margin=new Thickness(0,40,0,40), Background=SystemColors.MenuBarBrush, ViewingMode=FlowDocumentReaderViewingMode.Scroll, IsTwoPageViewEnabled = false, IsPageViewEnabled=false, MinZoom=100, Document=FlowDoc }; FlowDocReader.IsEnabledChanged+=FlowDocReaderIsEnabledChanged; Grid1.Children.Add(FlowDocReader); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.docViewer = ((System.Windows.Controls.FlowDocumentReader)(target)); return; case 2: this.cmboOrientation = ((System.Windows.Controls.ComboBox)(target)); #line 14 "..\..\..\Windows\DocumentPreviewer.xaml" this.cmboOrientation.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cmboOrientation_SelectionChanged); #line default #line hidden return; case 3: this.cmdPrint = ((System.Windows.Controls.Button)(target)); #line 18 "..\..\..\Windows\DocumentPreviewer.xaml" this.cmdPrint.Click += new System.Windows.RoutedEventHandler(this.cmdPrint_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.fdr = ((System.Windows.Controls.FlowDocumentReader)(target)); return; case 2: this.canvas1 = ((System.Windows.Controls.Canvas)(target)); return; case 3: this.button1 = ((System.Windows.Controls.Button)(target)); #line 8 "..\..\..\MainWindow.xaml" this.button1.Click += new System.Windows.RoutedEventHandler(this.button1_Click); #line default #line hidden return; case 4: this.button2 = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
public WhiteFlowDocumentReaderPeer(FlowDocumentReader owner) : base(owner) { whitePeer = WhitePeer.Create(this, owner); }
private void LoadPlainText(string[] text,ref FlowDocumentReader fdr) { string list=string.Empty; foreach(string str in text) list+=str+Environment.NewLine; LoadPlainText(list,ref fdr); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 5 "..\..\..\..\..\Modules\CAD\Briefing\BriefingWorkspace.xaml" ((Invert911.Briefing.BriefingWorkspace)(target)).Initialized += new System.EventHandler(this.Window_Initialized); #line default #line hidden #line 5 "..\..\..\..\..\Modules\CAD\Briefing\BriefingWorkspace.xaml" ((Invert911.Briefing.BriefingWorkspace)(target)).Unloaded += new System.Windows.RoutedEventHandler(this.UserControl_Unloaded); #line default #line hidden return; case 2: this.flowDoc = ((System.Windows.Controls.FlowDocumentReader)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.rbGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target)); return; case 2: this.rbL = ((System.Windows.Controls.RadioButton)(target)); #line 17 "..\..\Highscore.xaml" this.rbL.Click += new System.Windows.RoutedEventHandler(this.rb_Click); #line default #line hidden return; case 3: this.rbM = ((System.Windows.Controls.RadioButton)(target)); #line 18 "..\..\Highscore.xaml" this.rbM.Click += new System.Windows.RoutedEventHandler(this.rb_Click); #line default #line hidden return; case 4: this.rbS = ((System.Windows.Controls.RadioButton)(target)); #line 19 "..\..\Highscore.xaml" this.rbS.Click += new System.Windows.RoutedEventHandler(this.rb_Click); #line default #line hidden return; case 5: this.highscoreListEasy = ((System.Windows.Controls.FlowDocumentReader)(target)); return; case 6: this.winnersListEasy = ((System.Windows.Documents.TableRowGroup)(target)); return; case 7: this.highscoreListMedium = ((System.Windows.Controls.FlowDocumentReader)(target)); return; case 8: this.winnersListMedium = ((System.Windows.Documents.TableRowGroup)(target)); return; case 9: this.highscoreListHard = ((System.Windows.Controls.FlowDocumentReader)(target)); return; case 10: this.winnersListHard = ((System.Windows.Documents.TableRowGroup)(target)); return; case 11: #line 117 "..\..\Highscore.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.clickOK); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 5 "..\..\..\MainWindow.xaml" ((Lotto.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.Window_KeyDown); #line default #line hidden #line 6 "..\..\..\MainWindow.xaml" ((Lotto.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden return; case 2: #line 10 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.CopyOfFlow_Click); #line default #line hidden return; case 3: #line 13 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MeaningChance_Click); #line default #line hidden return; case 4: #line 16 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.PasteToTextBox_Click); #line default #line hidden return; case 5: #line 19 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.CopyMoreProbability_Click); #line default #line hidden return; case 6: #line 20 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.PrintMoreProbability_Click); #line default #line hidden return; case 7: this.textnomove = ((System.Windows.Controls.TextBlock)(target)); return; case 8: this.help = ((System.Windows.Controls.Button)(target)); #line 694 "..\..\..\MainWindow.xaml" this.help.Click += new System.Windows.RoutedEventHandler(this.helpBotton_Click); #line default #line hidden return; case 9: this.grid1 = ((System.Windows.Controls.Grid)(target)); return; case 10: this.calendar = ((System.Windows.Controls.Calendar)(target)); #line 725 "..\..\..\MainWindow.xaml" this.calendar.SelectedDatesChanged += new System.EventHandler<System.Windows.Controls.SelectionChangedEventArgs>(this.calendar_SelectedDatesChanged); #line default #line hidden return; case 11: this.gridLefth = ((System.Windows.Controls.Grid)(target)); return; case 12: this.BallD = ((System.Windows.Controls.Grid)(target)); return; case 13: this.BallN = ((System.Windows.Controls.Grid)(target)); return; case 14: this.BeginStoryBoard1 = ((System.Windows.Media.Animation.BeginStoryboard)(target)); return; case 15: this.BeginStoryBoard2 = ((System.Windows.Media.Animation.BeginStoryboard)(target)); return; case 16: this.BeginStoryBoard3 = ((System.Windows.Media.Animation.BeginStoryboard)(target)); return; case 17: this.BeginStoryBoard4 = ((System.Windows.Media.Animation.BeginStoryboard)(target)); return; case 18: this.addBotton = ((System.Windows.Controls.Primitives.ToggleButton)(target)); #line 864 "..\..\..\MainWindow.xaml" this.addBotton.Click += new System.Windows.RoutedEventHandler(this.addBotton_Click); #line default #line hidden return; case 19: this.seeGrid = ((System.Windows.Controls.Grid)(target)); return; case 20: #line 896 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Combination_Click); #line default #line hidden return; case 21: this.number1 = ((System.Windows.Controls.TextBox)(target)); return; case 22: this.number2 = ((System.Windows.Controls.TextBox)(target)); return; case 23: this.number3 = ((System.Windows.Controls.TextBox)(target)); return; case 24: this.reporte = ((System.Windows.Controls.Button)(target)); #line 907 "..\..\..\MainWindow.xaml" this.reporte.Click += new System.Windows.RoutedEventHandler(this.reporte_Click); #line default #line hidden return; case 25: #line 912 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.See_Click); #line default #line hidden return; case 26: this.countSee = ((System.Windows.Controls.TextBox)(target)); return; case 27: #line 923 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AfterC_Click); #line default #line hidden return; case 28: this.afterthenC = ((System.Windows.Controls.TextBox)(target)); return; case 29: #line 933 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AfterS_Click); #line default #line hidden return; case 30: this.afterthenS = ((System.Windows.Controls.TextBox)(target)); return; case 31: #line 949 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.After_Click); #line default #line hidden return; case 32: this.afterthen = ((System.Windows.Controls.TextBox)(target)); return; case 33: #line 958 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AfterTD_Click); #line default #line hidden return; case 34: this.afterthenTD = ((System.Windows.Controls.TextBox)(target)); return; case 35: this.fijoCheckBox = ((System.Windows.Controls.CheckBox)(target)); return; case 36: this.TDCheckBox = ((System.Windows.Controls.CheckBox)(target)); return; case 37: this.gridMeanning = ((System.Windows.Controls.Grid)(target)); return; case 38: this.totalTB = ((System.Windows.Controls.TextBlock)(target)); return; case 39: this.centenaCB = ((System.Windows.Controls.CheckBox)(target)); #line 987 "..\..\..\MainWindow.xaml" this.centenaCB.Checked += new System.Windows.RoutedEventHandler(this.Centenas_Checked); #line default #line hidden #line 987 "..\..\..\MainWindow.xaml" this.centenaCB.Unchecked += new System.Windows.RoutedEventHandler(this.Centenas_Unchecked); #line default #line hidden return; case 40: this.daysListBox = ((System.Windows.Controls.ListBox)(target)); return; case 41: this.listBDT = ((System.Windows.Controls.ListBox)(target)); return; case 42: #line 1034 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Expander)(target)).Expanded += new System.Windows.RoutedEventHandler(this.Expander_Expanded1); #line default #line hidden #line 1034 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Expander)(target)).Collapsed += new System.Windows.RoutedEventHandler(this.Expander_Collapsed1); #line default #line hidden return; case 43: this.meaning = ((System.Windows.Controls.TextBox)(target)); #line 1041 "..\..\..\MainWindow.xaml" this.meaning.KeyUp += new System.Windows.Input.KeyEventHandler(this.meaning_KeyUp); #line default #line hidden return; case 44: this.CountTimes = ((System.Windows.Controls.Grid)(target)); return; case 45: #line 1147 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.insertBotton_Click); #line default #line hidden return; case 46: this.datePicker = ((System.Windows.Controls.DatePicker)(target)); return; case 47: this.fijo = ((System.Windows.Controls.TextBox)(target)); return; case 48: this.corrido1 = ((System.Windows.Controls.TextBox)(target)); return; case 49: this.corrido2 = ((System.Windows.Controls.TextBox)(target)); return; case 50: this.dia = ((System.Windows.Controls.RadioButton)(target)); return; case 51: this.noche = ((System.Windows.Controls.RadioButton)(target)); return; case 52: #line 1186 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AddCombinationOk_Click); #line default #line hidden return; case 53: this.fechafijocorrido = ((System.Windows.Controls.TextBox)(target)); #line 1198 "..\..\..\MainWindow.xaml" this.fechafijocorrido.KeyDown += new System.Windows.Input.KeyEventHandler(this.fechafijocorrido_KeyDown); #line default #line hidden #line 1198 "..\..\..\MainWindow.xaml" this.fechafijocorrido.KeyUp += new System.Windows.Input.KeyEventHandler(this.fechafijocorrido_KeyUp); #line default #line hidden return; case 54: this.add = ((System.Windows.Controls.Button)(target)); #line 1201 "..\..\..\MainWindow.xaml" this.add.Click += new System.Windows.RoutedEventHandler(this.AddCombination_Click); #line default #line hidden return; case 55: #line 1210 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ExtraFrecuency_Click); #line default #line hidden return; case 56: #line 1212 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Behavior_Click); #line default #line hidden return; case 57: this.grid2 = ((System.Windows.Controls.ScrollViewer)(target)); return; case 58: #line 1233 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Descendents_Click); #line default #line hidden return; case 59: this.listBox = ((System.Windows.Controls.ListBox)(target)); return; case 60: #line 1239 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Ascendents_Click); #line default #line hidden return; case 61: #line 1257 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Fijo_Click); #line default #line hidden return; case 62: #line 1259 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Corrido_Click); #line default #line hidden return; case 63: #line 1261 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DesdeFijo_Click); #line default #line hidden return; case 64: #line 1263 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DesdeCorrido_Click); #line default #line hidden return; case 65: #line 1266 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DescendentsTD_Click); #line default #line hidden return; case 66: this.listBoxDT = ((System.Windows.Controls.ListBox)(target)); return; case 67: #line 1273 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AscendentsDT_Click); #line default #line hidden return; case 68: #line 1292 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Terminal_Click); #line default #line hidden return; case 69: #line 1294 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Decena_Click); #line default #line hidden return; case 70: #line 1296 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DesdeTerminal_Click); #line default #line hidden return; case 71: #line 1298 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DesdeDecena_Click); #line default #line hidden return; case 72: #line 1301 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DescendentsC_Click); #line default #line hidden return; case 73: this.listBoxC = ((System.Windows.Controls.ListBox)(target)); return; case 74: #line 1308 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AscendentsC_Click); #line default #line hidden return; case 75: #line 1313 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Centena_Click); #line default #line hidden return; case 76: #line 1317 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DesdeCentena_Click); #line default #line hidden return; case 77: #line 1320 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DescendentsS_Click); #line default #line hidden return; case 78: this.listBoxS = ((System.Windows.Controls.ListBox)(target)); return; case 79: #line 1327 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AscendentsS_Click); #line default #line hidden return; case 80: #line 1331 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Suma_Click); #line default #line hidden return; case 81: #line 1333 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DesdeSuma_Click); #line default #line hidden return; case 82: #line 1336 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DescendentsDob_Click); #line default #line hidden return; case 83: this.listBoxDob = ((System.Windows.Controls.ListBox)(target)); return; case 84: #line 1343 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AscendentsDob_Click); #line default #line hidden return; case 85: #line 1348 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Dob_Click); #line default #line hidden return; case 86: #line 1352 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DesdeDob_Click); #line default #line hidden return; case 87: this.desdeDate = ((System.Windows.Controls.TextBox)(target)); return; case 88: this.hastaDate = ((System.Windows.Controls.TextBox)(target)); return; case 89: #line 1360 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.FiltroFecha_Click); #line default #line hidden return; case 90: #line 1363 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.RB_Checked_Fijo); #line default #line hidden return; case 91: #line 1364 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.RB_Checked_C1); #line default #line hidden return; case 92: #line 1365 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.RB_Checked_C2); #line default #line hidden return; case 93: this.gridFlow = ((System.Windows.Controls.Grid)(target)); return; case 94: this.gridmonths = ((System.Windows.Controls.Grid)(target)); return; case 95: this.listMYAll = ((System.Windows.Controls.ListBox)(target)); return; case 96: this.comboBox = ((System.Windows.Controls.ComboBox)(target)); #line 1440 "..\..\..\MainWindow.xaml" this.comboBox.Loaded += new System.Windows.RoutedEventHandler(this.ComboBox_Loaded); #line default #line hidden #line 1441 "..\..\..\MainWindow.xaml" this.comboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ComboBox_SelectionChanged); #line default #line hidden return; case 97: this.comboBox1 = ((System.Windows.Controls.ComboBox)(target)); #line 1447 "..\..\..\MainWindow.xaml" this.comboBox1.Loaded += new System.Windows.RoutedEventHandler(this.ComboBox_Loaded1); #line default #line hidden #line 1448 "..\..\..\MainWindow.xaml" this.comboBox1.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ComboBox_SelectionChanged1); #line default #line hidden return; case 98: #line 1449 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Print_Click); #line default #line hidden return; case 99: this.autotestListBox = ((System.Windows.Controls.ListBox)(target)); return; case 100: #line 1507 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AutoEvaluation_Click); #line default #line hidden return; case 101: this.countAuto = ((System.Windows.Controls.TextBox)(target)); return; case 102: this.radioalg1 = ((System.Windows.Controls.RadioButton)(target)); #line 1536 "..\..\..\MainWindow.xaml" this.radioalg1.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 103: this.radioalg2 = ((System.Windows.Controls.RadioButton)(target)); #line 1539 "..\..\..\MainWindow.xaml" this.radioalg2.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked_2); #line default #line hidden return; case 104: this.radioalgmagi = ((System.Windows.Controls.RadioButton)(target)); #line 1552 "..\..\..\MainWindow.xaml" this.radioalgmagi.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked_3); #line default #line hidden return; case 105: this.Cash3s = ((System.Windows.Controls.TextBlock)(target)); return; case 106: this.Cash1 = ((System.Windows.Controls.TextBlock)(target)); return; case 107: this.Cash2 = ((System.Windows.Controls.TextBlock)(target)); return; case 108: this.Cash3 = ((System.Windows.Controls.TextBlock)(target)); return; case 109: this.Lcash1 = ((System.Windows.Controls.TextBlock)(target)); return; case 110: this.Lcash2 = ((System.Windows.Controls.TextBlock)(target)); return; case 111: this.Lcash3 = ((System.Windows.Controls.TextBlock)(target)); return; case 112: this.Ccash1 = ((System.Windows.Controls.TextBlock)(target)); return; case 113: this.Ccash2 = ((System.Windows.Controls.TextBlock)(target)); return; case 114: this.Ccash3 = ((System.Windows.Controls.TextBlock)(target)); return; case 115: this.Cashs3 = ((System.Windows.Controls.TextBlock)(target)); return; case 116: this.Play4s = ((System.Windows.Controls.TextBlock)(target)); return; case 117: this.Play1 = ((System.Windows.Controls.TextBlock)(target)); return; case 118: this.Play2 = ((System.Windows.Controls.TextBlock)(target)); return; case 119: this.Play3 = ((System.Windows.Controls.TextBlock)(target)); return; case 120: this.Play4 = ((System.Windows.Controls.TextBlock)(target)); return; case 121: this.Lplay1 = ((System.Windows.Controls.TextBlock)(target)); return; case 122: this.Lplay2 = ((System.Windows.Controls.TextBlock)(target)); return; case 123: this.Lplay3 = ((System.Windows.Controls.TextBlock)(target)); return; case 124: this.Lplay4 = ((System.Windows.Controls.TextBlock)(target)); return; case 125: this.Cplay1 = ((System.Windows.Controls.TextBlock)(target)); return; case 126: this.Cplay2 = ((System.Windows.Controls.TextBlock)(target)); return; case 127: this.Cplay3 = ((System.Windows.Controls.TextBlock)(target)); return; case 128: this.Cplay4 = ((System.Windows.Controls.TextBlock)(target)); return; case 129: this.Plays4 = ((System.Windows.Controls.TextBlock)(target)); return; case 130: #line 1789 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click); #line default #line hidden return; case 131: this.textBoxWrite1 = ((System.Windows.Controls.TextBox)(target)); #line 1794 "..\..\..\MainWindow.xaml" this.textBoxWrite1.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.textBoxWrite_PreviewKeyDown); #line default #line hidden return; case 132: this.textBoxWrite2 = ((System.Windows.Controls.TextBox)(target)); #line 1801 "..\..\..\MainWindow.xaml" this.textBoxWrite2.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.textBoxWrite_PreviewKeyDown); #line default #line hidden return; case 133: #line 2062 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.normal_Checked); #line default #line hidden return; case 134: #line 2064 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.solodia_Checked); #line default #line hidden return; case 135: #line 2066 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.RadioButton)(target)).Checked += new System.Windows.RoutedEventHandler(this.solonoche_Checked); #line default #line hidden return; case 136: this.flowDocumentReader = ((System.Windows.Controls.FlowDocumentReader)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.DocumentReader = ((System.Windows.Controls.FlowDocumentReader)(target)); return; case 2: this.ImageContainer = ((System.Windows.Documents.BlockUIContainer)(target)); return; case 3: this.imag = ((System.Windows.Controls.Image)(target)); return; case 4: this.btnStackePanel = ((System.Windows.Controls.StackPanel)(target)); return; case 5: this.btnback = ((System.Windows.Controls.Button)(target)); #line 31 "..\..\..\com.rta.vsd.hh.ui\PrintPreview.xaml" this.btnback.Click += new System.Windows.RoutedEventHandler(this.btnback_Click_1); #line default #line hidden return; case 6: this.btnPrint = ((System.Windows.Controls.Button)(target)); #line 32 "..\..\..\com.rta.vsd.hh.ui\PrintPreview.xaml" this.btnPrint.Click += new System.Windows.RoutedEventHandler(this.btnPrint_Click_1); #line default #line hidden return; } this._contentLoaded = true; }
private void LoadText(string text,ref FlowDocumentReader fdr,string format) { fdr.Document.PageWidth=816; TextRange tr= new TextRange ( fdr.Document.ContentStart, fdr.Document.ContentEnd ); MemoryStream ms= new MemoryStream ( Encoding.Default.GetBytes(text) ); try { tr.Load(ms,format); } catch(ArgumentException) { tr.Text=string.Empty; ShowNotification ( app.Language.LoadTextError, Title, System.Windows.Forms.ToolTipIcon.Error ); } catch(Exception e) { tr.Text=string.Empty; ShowNotification ( e.Message, Title, System.Windows.Forms.ToolTipIcon.Error ); } tr.Select ( fdr.Document.ContentStart, fdr.Document.ContentStart ); }
/// <summary> /// Gets the current viewer of FlowDocumentReader /// </summary> /// <param name="fdr">FlowDocumentReader</param> /// <returns>CurrentViewer - can be any of IFlowDocumentViewer implementations</returns> internal static object GetFdrHost(FlowDocumentReader fdr) { Invariant.Assert(fdr != null, "Null FDR"); Decorator host = null; if (fdr.TemplateInternal != null) { host = StyleHelper.FindNameInTemplateContent(fdr, "PART_ContentHost", fdr.TemplateInternal) as Decorator; } return host != null ? host.Child : null; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.fdrReader = ((System.Windows.Controls.FlowDocumentReader)(target)); return; case 2: this.printedPage = ((System.Windows.Documents.FlowDocument)(target)); return; case 3: this.mainTbl = ((System.Windows.Documents.Table)(target)); return; case 4: this.inDate = ((System.Windows.Documents.Paragraph)(target)); return; case 5: this.dueDate = ((System.Windows.Documents.Paragraph)(target)); return; case 6: this.topShade = ((System.Windows.Controls.Image)(target)); return; case 7: this.middleShade = ((System.Windows.Controls.Image)(target)); return; case 8: this.bottomShade = ((System.Windows.Controls.Image)(target)); return; case 9: this.teethRowGroup = ((System.Windows.Documents.TableRowGroup)(target)); return; case 10: this.comment = ((System.Windows.Documents.Paragraph)(target)); return; case 11: #line 250 "..\..\..\PrintLab.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; } this._contentLoaded = true; }
/// <summary> /// Constructor. /// </summary> /// <param name="owner">Owner of the AutomationPeer.</param> public FlowDocumentReaderAutomationPeer(FlowDocumentReader owner) : base(owner) { }
/// <summary> /// Avataan tulostusdialog, jossa käyttäjä voi valita millä tulostimella tulostus suoritetaan, jonka jälkeen tulostetaan jokaisen maksun kohdde, päivämäärä sekä summa paperille /// </summary> /// <param name="target">Tapahtuman kutsuja, tässä tapauksessa Tililaskuri</param> /// <param name="e">Tapahtuman eventit, ei tarvita</param> private void SuoritaTulostaKomento(object target, ExecutedRoutedEventArgs e) { PrintDialog dialog = new PrintDialog(); Nullable<bool> result = dialog.ShowDialog(); if (result == false) return; PrintDialog printDialog = new PrintDialog(); FlowDocumentReader docreader = new FlowDocumentReader(); FlowDocument flowDocument = new FlowDocument(); foreach(Tilitapahtuma t in ListaNayttoTapahtumat) { Paragraph myParagraph = new Paragraph(); myParagraph.Margin = new Thickness(4); myParagraph.FontSize = 12; myParagraph.Inlines.Add(new Run(t.Kohde + " - " + t.Päivämäärä.Date.ToString("dd.MM.yyyy") + " - " + t.Summa)); flowDocument.Blocks.Add(myParagraph); } IDocumentPaginatorSource doc = flowDocument; DocumentPaginatorWrapper paginator = new DocumentPaginatorWrapper(doc.DocumentPaginator, new Size(dialog.PrintableAreaWidth, dialog.PrintableAreaHeight), new Size(20, 20)); printDialog.PrintDocument(paginator, this.Title); }