private void A(object obj, PrintEventArgs printEventArgs) { this.A = 0; this.a = this.A() - 1; this.A = 0f; this.A = new s1[this.A.E().B()]; for (int i = 0; i < this.A.Length; i++) { this.A[i] = this.A.E().B(i).f(); } if (printEventArgs.PrintAction != PrintAction.PrintToPreview) { PrinterSettings printerSettings = this.A.PrinterSettings; PrintRange printRange = printerSettings.PrintRange; PrintRange printRange2 = printRange; if (printRange2 != PrintRange.SomePages) { if (printRange2 != PrintRange.CurrentPage) { return; } this.A = (this.a = this.a()); return; } else { this.A = printerSettings.FromPage - 1; this.a = printerSettings.ToPage - 1; } } }
private void A(h2 h, p1 p) { this.A = h; string str = h.e() ? "" : "Projekt "; this.Text = this.A + " " + str + h.b(); this.A.Items.Clear(); int startPage = 0; int num = 0; foreach (p1 current in h.E()) { if (current == p) { startPage = num; } this.A.Items.Add(string.Concat(new object[] { "", ++num, ": ", current.b() })); } this.A.InvalidatePreview(); this.A.StartPage = startPage; this.a(); }
private static u1 A() { if (u1.A == null) { u1.A = new u1(); } return(u1.A); }
private void a(object obj, PrintEventArgs printEventArgs) { s1[] array = this.A; for (int i = 0; i < array.Length; i++) { s1 s = array[i]; s.Dispose(); } this.A = null; }
public static void A(Form owner, h2 h, p1 p) { if (u1.A(h)) { h.d(DateTime.Now); u1 u = u1.A(); u.A(h, p); u.ShowDialog(owner); } }
private u1() { this.B(); this.Font = d2.a().Font; this.A = this.Text; this.A.AutoZoom = true; this.A.DefaultPageSettings.Landscape = false; this.A.DefaultPageSettings.Margins.Top = 60; this.A.DefaultPageSettings.Margins.Left = 60; this.A.DefaultPageSettings.Margins.Bottom = 60; this.A.DefaultPageSettings.Margins.Right = 60; this.A.UseEXDialog = true; this.A.AllowPrintToFile = false; this.A.AllowCurrentPage = true; this.A.AllowSomePages = true; }
private void B() { ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(u1)); this.A = new MenuStrip(); this.A = new ToolStripButton(); this.a = new ToolStripButton(); this.B = new ToolStripButton(); this.b = new ToolStripButton(); this.A = new ToolStripComboBox(); this.A = new PrintDocument(); this.A = new PrintDialog(); this.A = new PageSetupDialog(); this.A = new PrintPreviewControl(); this.A.SuspendLayout(); base.SuspendLayout(); this.A.Items.AddRange(new ToolStripItem[] { this.A, this.a, this.B, this.b, this.A }); this.A.Location = new Point(0, 0); this.A.Name = "topMenu"; this.A.Size = new Size(474, 27); this.A.TabIndex = 0; this.A.Text = "toolStripTop"; this.A.Image = (Image)componentResourceManager.GetObject("btnPrint.Image"); this.A.ImageTransparentColor = Color.Magenta; this.A.Name = "btnPrint"; this.A.Size = new Size(78, 20); this.A.Text = "Drucken..."; this.A.Click += new EventHandler(this.A); this.a.Image = (Image)componentResourceManager.GetObject("btnSettings.Image"); this.a.ImageTransparentColor = Color.Magenta; this.a.Name = "btnSettings"; this.a.Size = new Size(113, 20); this.a.Text = "Seite einrichten..."; this.a.Click += new EventHandler(this.a); this.B.DisplayStyle = ToolStripItemDisplayStyle.Image; this.B.Image = (Image)componentResourceManager.GetObject("btnPrev.Image"); this.B.ImageTransparentColor = Color.Magenta; this.B.Name = "btnPrev"; this.B.Size = new Size(23, 20); this.B.Text = "<<"; this.B.Click += new EventHandler(this.B); this.b.DisplayStyle = ToolStripItemDisplayStyle.Image; this.b.Image = (Image)componentResourceManager.GetObject("btnNext.Image"); this.b.ImageTransparentColor = Color.Magenta; this.b.Name = "btnNext"; this.b.Size = new Size(23, 20); this.b.Text = ">>"; this.b.Click += new EventHandler(this.b); this.A.Name = "cbPages"; this.A.Size = new Size(200, 23); this.A.SelectedIndexChanged += new EventHandler(this.C); this.A.PrintPage += new PrintPageEventHandler(this.A); this.A.QueryPageSettings += new QueryPageSettingsEventHandler(this.A); this.A.EndPrint += new PrintEventHandler(this.a); this.A.BeginPrint += new PrintEventHandler(this.A); this.A.Document = this.A; this.A.UseEXDialog = true; this.A.Document = this.A; this.A.AutoZoom = false; this.A.Dock = DockStyle.Fill; this.A.Document = this.A; this.A.Location = new Point(0, 27); this.A.Name = "previewControl"; this.A.Size = new Size(474, 540); this.A.TabIndex = 1; this.A.Zoom = 0.46535500427716; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = AutoScaleMode.Font; base.ClientSize = new Size(474, 567); base.Controls.Add(this.A); base.Controls.Add(this.A); this.DoubleBuffered = true; base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); base.Name = "PrintManager"; base.ShowInTaskbar = false; this.Text = "Druckvorschau"; this.A.ResumeLayout(false); this.A.PerformLayout(); base.ResumeLayout(false); base.PerformLayout(); }
private void A(object obj, PrintPageEventArgs printPageEventArgs) { Graphics graphics = printPageEventArgs.Graphics; p1 p = this.A.E().B(this.A); s1 s = this.A[this.A]; s.f(graphics); graphics.DrawRectangle(new Pen(Color.Black), printPageEventArgs.MarginBounds); bool flag = p.E(); string str = flag ? "Project" : "Projekt"; string text = flag ? "File" : "Datei"; string text2 = flag ? "Author" : "Ersteller"; string text3 = flag ? "Diagram" : "Diagramm"; string text4 = flag ? "Created" : "Erstellt"; string text5 = flag ? "Modified" : "Geändert"; string text6 = str + ": " + this.A.b(); if (!string.IsNullOrEmpty(this.A.f())) { string text7 = text6; text6 = string.Concat(new string[] { text7, "\n", text, ": ", Path.GetFileName(this.A.f()) }); } if (!string.IsNullOrEmpty(this.A.E())) { string text8 = text6; text6 = string.Concat(new string[] { text8, "\n", text2, ": ", this.A.E() }); } string text9 = text6; text6 = string.Concat(new string[] { text9, "\n", text3, ": ", s.A().b() }); string text10 = p.J().ToString("dd.MM.yy"); if (!string.IsNullOrEmpty(text10)) { string text11 = text6; text6 = string.Concat(new string[] { text11, "\n", text4, ": ", text10 }); } string text12 = p.j().ToString("dd.MM.yy"); if (!string.IsNullOrEmpty(text12)) { string text13 = text6; text6 = string.Concat(new string[] { text13, " ", text5, ": ", text12 }); } Font font = global::c.C.A(); StringFormat stringFormat = new StringFormat(); SizeF sizeF = graphics.MeasureString(text6, font, new Point(0, 0), stringFormat); Rectangle rect = new Rectangle(printPageEventArgs.MarginBounds.Location, sizeF.ToSize()); int num = 3; rect.Width += num * 2; rect.Height += num * 2; rect.X += printPageEventArgs.MarginBounds.Width - rect.Width; rect.Y += printPageEventArgs.MarginBounds.Height - rect.Height; graphics.DrawRectangle(new Pen(Color.Black), rect); Point p2 = new Point(rect.X + num, rect.Y + num); graphics.DrawString(text6, font, global::c.C.A, p2); Rectangle marginBounds = printPageEventArgs.MarginBounds; marginBounds.Height -= rect.Height; if (this.A == 0f && !K1.A().A().SeparatePrintPageScaling) { this.A = 3.40282347E+38f; s1[] array = this.A; for (int i = 0; i < array.Length; i++) { s1 s2 = array[i]; float val = 0f; Point point; s2.g(marginBounds, ref val, out point, false); this.A = Math.Min(this.A, val); } } B1 b = p.G(s, graphics, a1.Paper, false); s.H(marginBounds, this.A, b); printPageEventArgs.HasMorePages = (++this.A <= this.a); }