// print private void button4_Click(object sender, EventArgs e) { if (dateInizio.Enabled) { DialogResult dialogResult = MessageBox.Show("Non hai impostato le date!\nProcedere con la stampa?", "Sei sicuro?", MessageBoxButtons.YesNo); if (dialogResult != DialogResult.Yes) { return; } } List <Iscrizione> update = new List <Iscrizione>(); for (int i = 0; i < dataGridView1.Rows.Count; i++) { try { Guid id = (Guid)dataGridView1.Rows[i].Cells["ID"].Value; Iscrizione iscr = DB.instance.getIscrizione(id); update.Add(iscr); } catch { } } Printing.printLibroSoci(update, dateTimePicker1.Value, Config.Instance.QuitWordAfterPrintLibroSoci); }
public override void PrintBy(Printing.IPrinter printer) { printer.Space(_offset); var amount = _length - _offset; printer.PrintJapaneseLetter(_letter, amount); }
public override void Run(Dictionary <String, Parameter> RunParams) { List <string> targets = Proccessing.GetTargets(RunParams); if (targets.Count > 0) { SharpSploitResultList <Network.PortScanResult> scan = Network.PortScan(targets, 445, true); foreach (Network.PortScanResult scanResult in scan) { if (scanResult.IsOpen) { ServiceController serviceController = new ServiceController("Spooler", scanResult.ComputerName); try { serviceController.ServiceHandle.Close(); Printing.Success($"Admin access to {scanResult.ComputerName}"); } catch { Printing.Error($"No access to {scanResult.ComputerName}"); } } else { Printing.Error($"Port {scanResult.Port} is not open on {scanResult.ComputerName}"); } } } else { Printing.Error("Need to specify a ComputerName or IPAddress"); } }
void PrintHelp(string executableName) { Console.WriteLine($"Usage: {executableName} <command> [<args>]"); Console.WriteLine(); Console.WriteLine("Available commands are:"); var printedGroups = new HashSet <string>(StringComparer.OrdinalIgnoreCase); foreach (var avail in _availableCommands.OrderBy(c => c.Metadata.Name)) { if (avail.Metadata.SubCommand != null) { if (!printedGroups.Contains(avail.Metadata.Name)) { Printing.Define($" {avail.Metadata.Name}", "<sub-command>", 13, Console.Out); printedGroups.Add(avail.Metadata.Name); } } else { Printing.Define($" {avail.Metadata.Name}", avail.Metadata.HelpText, 13, Console.Out); } } Console.WriteLine(); Console.WriteLine($"Type `{executableName} help <command>` for detailed help"); }
void printDocument_PrintPage(object sender, PrintPageEventArgs e) { if (pageCount < 0) { pageCount = Printing.getPageCount(grtArguments); } e.Graphics.DrawRectangle(new System.Drawing.Pen(System.Drawing.Color.Red), 0, 0, e.PageSettings.PaperSize.Width - 1, e.PageSettings.PaperSize.Height - 1); e.Graphics.DrawRectangle(new System.Drawing.Pen(System.Drawing.Color.Green), e.PageBounds); IntPtr hdc = e.Graphics.GetHdc(); if (Printing.printPageHDC(grtArguments, pageNumber++, hdc, e.PageSettings.PaperSize.Width, e.PageSettings.PaperSize.Height) < 1) { e.HasMorePages = false; } else { e.HasMorePages = pageNumber < pageCount; } e.Graphics.ReleaseHdc(); }
public override void Execute() { printDocument = new PrintDocument(); printDocument.OriginAtMargins = true; printDocument.BeginPrint += new PrintEventHandler(printDocument_BeginPrint); printDocument.PrintPage += new PrintPageEventHandler(printDocument_PrintPage); Dictionary <String, Object> paperSettings = Printing.getPaperSettings(grtArguments); printDocument.DefaultPageSettings.Landscape = (string)paperSettings["orientation"] == "landscape"; // Sizes must be given in inch * 100 (sigh). int paperWidth = (int)Math.Round((double)paperSettings["width"] / 0.254); int paperHeight = (int)Math.Round((double)paperSettings["height"] / 0.254); PaperSize paperSize = new PaperSize("Ignored anyway", paperWidth, paperHeight); if ((bool)paperSettings["marginsSet"]) { printDocument.DefaultPageSettings.Margins = new Margins((int)paperSettings["marginLeft"], (int)paperSettings["marginRight"], (int)paperSettings["marginTop"], (int)paperSettings["marginBottom"]); } System.Windows.Forms.PrintPreviewDialog preview = new System.Windows.Forms.PrintPreviewDialog(); preview.Icon = new System.Drawing.Icon("images/icons/MySQLWorkbench.ico"); preview.Document = printDocument; preview.UseAntiAlias = true; preview.ShowDialog(); }
mitemFilePrint_Click(object sender, EventArgs e) { // Display dialog to select printer & port. PAGESETUPDLGSTRUCT psd; psd = new PAGESETUPDLGSTRUCT(); PrintSetupDlg.InitDlgStruct(ref psd, hwndForm); int iErr = PrintSetupDlg.ShowDialog(ref psd); if (iErr == 0) { // Either error... string strErr = PrintSetupDlg.GetErrorString(); if (strErr != "Ok") { MessageBox.Show(strErr, "PrintGdi"); } // ...Or user clicked <Cancel> return; } IntPtr hdcPrinter = IntPtr.Zero; IntPtr hfont = IntPtr.Zero; IntPtr hfontOld = IntPtr.Zero; try { // Connect to printer by creating a DC. hdcPrinter = Printing.CreatePrinterDC(ref psd); if (hdcPrinter != IntPtr.Zero) { // Select font. hfont = GdiFont.Create(tboxInput.Font.Name, (int)tboxInput.Font.Size, 0, hdcPrinter); hfontOld = GdiGraphics.SelectObject(hdcPrinter, hfont); // Print PrintJob_Gdi.PrintText(tboxInput, hdcPrinter); } else { throw new System.Exception(); } } catch { MessageBox.Show("Error connecting to printer.", "PrintGdi"); } finally { // Cleanup GdiGraphics.SelectObject(hdcPrinter, hfontOld); GdiGraphics.DeleteObject(hfont); Printing.DeleteDC(hdcPrinter); // Clean up resources associated with print dialog. PrintSetupDlg.Close(ref psd); } }
public void Index(vwReportIndex model) { int statusContract = 0; int statusClinic = 0; int statusMBAnalysis = 0; int statusClinicMaterials = 0; if (model.selectedClinic[0] == "ALL") { statusClinic = 1; } if (model.selectedClinicMaterial[0] == "ALL") { statusClinicMaterials = 1; } if (model.selectedContract[0] == "ALL") { statusContract = 1; } if (model.selectedMBAnalysis[0] == "ALL") { statusMBAnalysis = 1; } IEnumerable <vwTotalInfoForReport> obj = dbm.vwTotalInfoForReports.ToList(); if (statusContract != 1) { //var obj = db.Samples.Where(o => o.SamplePaymentTypeID == 2 && arr.Contains(o.SampleID)) obj = obj.Where(o => model.selectedContract.Contains(o.ContractID.ToString())).ToList(); } if (statusClinic != 1) { //var obj = db.Samples.Where(o => o.SamplePaymentTypeID == 2 && arr.Contains(o.SampleID)) obj = obj.Where(o => model.selectedClinic.Contains(o.ClinicContractID.ToString())).ToList(); } if (statusClinicMaterials != 1) { //var obj = db.Samples.Where(o => o.SamplePaymentTypeID == 2 && arr.Contains(o.SampleID)) obj = obj.Where(o => model.selectedClinicMaterial.Contains(o.ClinicMaterialID.ToString())).ToList(); } if (statusMBAnalysis != 1) { //var obj = db.Samples.Where(o => o.SamplePaymentTypeID == 2 && arr.Contains(o.SampleID)) obj = obj.Where(o => model.selectedMBAnalysis.Contains(o.MBAnalysisTypeID.ToString())).ToList(); } obj = obj.Where(o => o.DatetimeDelivery >= DateTime.Parse(model.dateStart) && o.DatetimeDelivery <= (DateTime.Parse(model.dateEnd)).AddDays(1)); Printing objPrinter = new Printing(); string resAddress = objPrinter.PrintReport(obj); Response.ContentType = "application/text"; Response.AddHeader("Content-Disposition", @"filename=""report_" + DateTime.Now.ToString() + ".xls"); Response.TransmitFile(@resAddress); }
private void printToolStripMenuItem_Click(object sender, EventArgs e) { if (!is_shown) { ShowHide( ); } Printing.DataGridView2Print(datagrid_storage); }
public HomeController(Printing print, Saving save) { _print = print; _save = save; bool p = _print.FeatureEnabled; bool s = _save.FeatureEnabled; }
protected EulerProblem(Printing printing) { _printing = printing; var start = DateTime.UtcNow; Calculate(); var done = DateTime.UtcNow; Timing = done - start; }
private void OnPrinting(int current) { var args = new PrintingEventArgs { CurrentPage = current }; Printing?.Invoke(this, args); Thread.Sleep(1500); }
public override void Run(Dictionary <String, Parameter> RunParams) { string Parameters = null; DCOM.DCOMMethod Method = DCOM.DCOMMethod.MMC20_Application; if (RunParams.TryGetValue("Parameters", out Parameter parameters)) { Parameters = parameters.Value[0]; } if (RunParams.TryGetValue("Method", out Parameter method)) { string value = method.Value[0]; switch (value) { case "MMC20": Method = DCOM.DCOMMethod.MMC20_Application; break; case "ShellWindow": Method = DCOM.DCOMMethod.ShellWindows; break; case "ShellBrowserWindow": Method = DCOM.DCOMMethod.ShellBrowserWindow; break; case "ExcelDDE": Method = DCOM.DCOMMethod.ExcelDDE; break; default: Printing.Error($"{value} is not a valid method"); break; } } if (RunParams.TryGetValue("ComputerName", out Parameter computer)) { if (RunParams.TryGetValue("Command", out Parameter command)) { foreach (string cmd in command.Value) { DCOM.DCOMExecute(computer.Value, cmd, Parameters, null, Method); } } else { Printing.Error("No command specified"); } } else { Printing.Error("No Computer Name specified."); } }
private void btnPrint_Click(object sender, EventArgs e) { string sPrinterName = Utility.XmlReadParam(CONFIG_FILE_PATH, "/Configuration/Printer/Name"); if (sPrinterName != null) { Printing.PrintLabel2(sPrinterName, txtArticleNumber.Text, txtBoxNo.Text, txtLabelName.Text, txtQuantityPerBox.Text, txtWorkOrder.Text); } }
public void ProtectWithPrintRestrictions( [Values( FileAuthentication.Password /*, * Ignore: http://stackoverflow.com/questions/40045745/itextsharp-object-reference-error-on-pdfstamper-for-certificate-protected-file * FileAuthentication.CertificateFile, * FileAuthentication.CertificateStore*/)] FileAuthentication protectAuth, [Values( Printing.None, Printing.LowResolution, Printing.HighResolution)] Printing printing) { string inputFilePath = ResourceHelpers.WriteResourceToFile("Twenty57.Linx.Components.Pdf.Tests.ChangeProtection.Resources.Protect.pdf", this.inputDirectory); string outputFilePath = Path.Combine(this.outputDirectory, "Protect.pdf"); FunctionDesigner designer = ProviderHelpers.CreateDesigner <ChangeProtectionProvider>(); ConfigureInputFileFunctionValues(designer, FileAuthentication.None, inputFilePath); ConfigureProtectFunctionValues(designer, protectAuth, Encryption.AES256, true, true, printing: printing); designer.Properties[Pdf.Common.PropertyNames.OutputFilePath].Value = outputFilePath; var tester = new FunctionTester <ChangeProtectionProvider>(); tester.Execute(designer.GetProperties(), designer.GetParameters()); bool allowDegradedPrinting = false; bool allowPrinting = false; switch (printing) { case Printing.None: break; case Printing.LowResolution: allowDegradedPrinting = true; break; case Printing.HighResolution: allowDegradedPrinting = true; allowPrinting = true; break; default: throw new NotSupportedException("Invalid Printing specified."); } PdfComparer.AssertProtection(outputFilePath, protectAuth, this.authenticationManager, true, true, expectedAllowDegradedPrinting: allowDegradedPrinting, expectedAllowPrinting: allowPrinting); if (protectAuth == FileAuthentication.Password) { using (var permissionsAuthHelper = new AuthenticationManager(permissionsPassword)) { PdfComparer.AssertProtectionAllRights(outputFilePath, FileAuthentication.Password, permissionsAuthHelper, true, true); } } }
public static byte[] ClearPrinter(Printing.PrinterSettings settings) { //^MMT: Tear off Mode. ^PRp,s,b: print speed (print, slew, backfeed) (2,4,5,6,8,9,10,11,12). //~TA###: Tear off position (must be 3 digits). ^LHx,y: Label home. ^SD##x: Set Darkness (00 to 30). ^PWx: Label width //^XA^MMT^PR4,12,12~TA000^LH0,12~SD19^PW750 stringCounter = 0; printerSettings = settings; return Encoding.GetEncoding(850).GetBytes(string.Format("^XA^MMT^PR{0},12,12~TA{1:000}^LH{2},{3}~SD{4:00}^PW{5}", settings.PrintSpeed, settings.AlignTearOff, settings.AlignLeft, settings.AlignTop, settings.Darkness, settings.Width+settings.AlignLeft)); }
private void saveButton_Click(object sender, EventArgs e) { saveFileDialog1.Filter = "Jpeg Image|*.jpg"; if (saveFileDialog1.ShowDialog() == DialogResult.OK) { System.Threading.Thread.Sleep(500); Printing p = new Printing(this, saveFileDialog1.FileName); MessageBox.Show("Сохранение завершено успешно"); } }
public override void Run(Dictionary <String, Parameter> RunParams) { if (tokens.GetSystem()) { Printing.Success("Successfully became SYSTEM"); } else { Printing.Error("Failed to get SYSTEM"); } }
private void PrintLabel1() { string sPrinterName = Utility.XmlReadParam(CONFIG_FILE_PATH, "/Configuration/Printer/Name"); if (sPrinterName != null) { string sDateTime = String.Format("{0:D2}/{1:D2}/{2:D2}", DateTime.Now.Day, DateTime.Now.Month, DateTime.Now.Year % 100); string sBatch = Printing.GenerateBatch(labelMachineNumber.Text, System.DateTime.Now); Printing.PrintLabel(sPrinterName, labelProductLabel.Text, labelArticleNumber.Text, sBatch, labelBoxNumber.Text, labelWorkOrder.Text, sDateTime, labelGood.Text); } }
public override void Run(Dictionary <String, Parameter> RunParams) { if (tokens.RevertToSelf()) { Printing.Success("Successfully reverted to self"); } else { Printing.Error("Failed to revert to self. We're stuck forever."); } }
public static void SolveSystem(double[,] matrix) { Console.WriteLine("Исходная матрица:"); Printing.printMatrix(matrix); Console.WriteLine("Матрица, приведенная к диагональному виду:"); matrix = createDiagonalView(matrix); Printing.printMatrix(matrix); Console.WriteLine("Корни:"); var roots = getRoots(matrix); printRoots(roots); }
public static void SolveSystem(double[,] matrix) { Console.WriteLine("Исходная матрица:"); Printing.printMatrix(matrix); var coefficientsMatrix = getCoefficients(matrix); Console.WriteLine("Матрица коэффициентов (a, b, c, d, u, v):"); printCoefficients(coefficientsMatrix); var rootsMatrix = getRoots(coefficientsMatrix); printRoots(rootsMatrix); }
private void btPrint_Click(object sender, EventArgs e) { CDTControl.Printing pr = new Printing(dsData.Tables[1], "Re_inDoiQua"); if (Config.GetValue("isDebug").ToString() == "1") { pr.Preview(); } else { pr.Print(); } }
public override void Printing_PrintPage(object sender, PrintPageEventArgs e) { e.Graphics.DrawImage(Properties.Resources.Certificate_Template, new PointF(0, 0)); // Rectangle rect = new Rectangle(e.PageBounds.Width / 3 - 30, e.PageBounds.Height / 3 + 50, 550, 380); InitBodyRect(e); string first = Printing.Indention + "This is to certify that " + Printing.MrOrMrs(SexOption.Text) + " " + Printing.GetFullName(firstName, middleName, lastName, extension) + " has appeared in my office." + Printing.LineSpace + Printing.Indention + "This certification is issued to " + Printing.MrOrMrs(SexOption.Text) + " " + lastName.Text + (string.IsNullOrEmpty(extension.Text) ? "" : " " + extension.Text) + " for whatever legal intent it may serve " + Printing.HimOrHer(SexOption.Text) + "." + Printing.LineSpace + Printing.Indention + "Issued this " + IssuedOn.customFormat() + " Barangay Poblacion, Kalibo, Aklan."; e.Graphics.DrawString(first, Printing.font, Brushes.Black, rect); DrawDebugRecs(rect, e); Printing.DrawCap(e, o.captName); }
static void Main(string[] args) { var p = new Printing(); var s = new Saving(); Console.WriteLine($"Printing is {(p.FeatureEnabled ? "on" : "off")}"); Console.WriteLine($"Saving is {(s.FeatureEnabled ? "on" : "off")}"); Console.ReadLine(); }
public override void Printing_PrintPage(object sender, PrintPageEventArgs e) { base.Printing_PrintPage(sender, e); string _name = Printing.GetName(firstName, middleName, lastName, extension); string text = "To whom it may concern:" + Printing.LineSpace + Printing.Indention + "This is to certify that " + _name + ", " + age.Value + " years old, " + sex.Text + ", " + civilStatus.Text + ", Filipino and a resident of " + address.Text + " belong to an indigent family in this Barangay." + Printing.LineSpace + Printing.Indention + "This certification is issued upon the request of " + sex.MrMrs() + " " + lastName.Text + " of legal age who would like to seek Educational Assistance from the " + institution.Text + " in behalf of their immediate family members." + Printing.LineSpace + Printing.Indention + "Issued this " + IssuedOn.customFormat() + " Barangay Poblacion, Kalibo, Aklan."; e.Graphics.DrawString(text, Printing.font, Brushes.Black, rect); DrawDebugRecs(rect, e); Printing.DrawCapSb(e, o.captName, offiicerOption.Text); }
public override void Printing_PrintPage(object sender, PrintPageEventArgs e) { base.Printing_PrintPage(sender, e); string _name = Printing.GetFullName(firstText, middleText, lastText, extText); string text = "To whom it may concern:" + Printing.LineSpace + Printing.Indention + "This is to certify that " + _name + ", " + Age.PrintAge() + ", Filipino, " + CStatusOption.Text + " and a resident of " + Address.Text + ", belongs to an indigent family in this Barangay." + Printing.LineSpace + Printing.Indention + SexOption.HeShe(true) + " is asking for utmost humanitarian consideration and possible Legal Assistance." + Printing.LineSpace + Printing.Indention + "This certification is issued upon the request of " + SexOption.MrMrs() + " " + lastText.Text + " in support to " + SexOption.HisHer() + " request for Legal Assistance from the Public Attorney's Office (PAO)." + Printing.LineSpace + Printing.Indention + "Issued this " + IssuedOn.customFormat() + " Barangay Poblacion, Kalibo, Aklan."; e.Graphics.DrawString(text, Printing.font, Brushes.Black, rect); DrawDebugRecs(rect, e); Printing.DrawCapSb(e, o.captName, officerOption.Text); }
void PrintHelp(string executableName, string topLevelCommand) { Console.WriteLine($"Usage: {executableName} {topLevelCommand} <sub-command> [<args>]"); Console.WriteLine(); Console.WriteLine("Available sub-commands are:"); foreach (var avail in _availableCommands.Where(c => c.Metadata.Name == topLevelCommand).OrderBy(c => c.Metadata.SubCommand)) { Printing.Define($" {avail.Metadata.SubCommand}", avail.Metadata.HelpText, 13, Console.Out); } Console.WriteLine(); Console.WriteLine($"Type `{executableName} help {topLevelCommand} <sub-command>` for detailed help"); }
public override void Run(Dictionary <String, Parameter> RunParams) { if (RunParams.TryGetValue("Command", out Parameter command)) { foreach (string cmd in command.Value) { Printing.CmdOutput(Shell.PowerShellExecute(cmd)); } } else { Printing.Error("No command specified"); } }
public override void Printing_PrintPage(object sender, PrintPageEventArgs e) { base.Printing_PrintPage(sender, e); string name = Printing.GetFullName(firstText, middleText, lastText, extText); string text = "To whom it may concern:" + Printing.LineSpace + Printing.Indention + "This is to certify that " + SexOption.MrMs() + " " + name + " " + Age.Text + " years old, " + CStatusOption.Text + ", and a resident of " + Address.Text + "." + Printing.LineSpace + Printing.Indention + "Further certify that " + SexOption.MrMs() + " " + name + " is " + caseText.Text + ". This was confirmed upon the visit of one of our Barangay Staff." + Printing.LineSpace + Printing.Indention + "This certification is hereby issued upon the request of " + SexOption.MrMs() + " " + lastText.Text + " in support to her request for Social Security System (SSS) requirements." + Printing.LineSpace + Printing.Indention + "Issued this " + IssuedOn.customFormat() + " Barangay Poblacion, Kalibo, Aklan."; e.Graphics.DrawString(text, Printing.font, Brushes.Black, rect); DrawDebugRecs(rect, e); Printing.DrawCapSb(e, o.captName, officerOption.Text); }
public override void Printing_PrintPage(object sender, PrintPageEventArgs e) { base.Printing_PrintPage(sender, e); string name = Printing.GetFullName(firstName, middleName, lastName, ext); string text = ToWhom + Printing.LineSpace + Printing.Indention + "This is to certify that " + name + ", " + Age.GetYears() + " old, Filipino is a resident of " + Address.Text + "." + Printing.LineSpace + Printing.Indention + "This further certifies that " + name + " was bitten by a stray dog last " + dtIncident.Value.ToString("MMMM dd, yyyy") + "." + Printing.LineSpace + Printing.Indention + "This certification is issued upon the request of " + sex.HisHer() + " " + Relation.Text + " " + reqSexOption.MrMs() + " " + By.Text + " in support to " + reqSexOption.HisHer() + " claim for the Medical/Financial Assistance from " + Institution.Text + "." + Printing.LineSpace + Printing.Indention + "Issued this " + IssuedOn.customFormat() + " Barangay Poblacion, Kalibo, Aklan."; e.Graphics.DrawString(text, Printing.font, Brushes.Black, rect); DrawDebugRecs(rect, e); Printing.DrawCapSb(e, o.captName, officerOption.Text); }
public override void Printing_PrintPage(object sender, PrintPageEventArgs e) { base.Printing_PrintPage(sender, e); string name = firstName.Text + " " + middleName.Text + " " + lastName.Text + (string.IsNullOrEmpty(ext.Text) ? "" : " " + ext.Text); string text = "To whom it may concern:" + Printing.LineSpace + Printing.Indention + "This is to certify further that " + sexOption.MrMs() + " " + name + " belongs to an indigent family in this barangay and is asking for utmost humanitarian consideration and possible assistance from the " + institution.Text + " for " + forWhat.Text + ", in behalf of " + sexOption.HisHer() + " " + relations.Text + " " + inBehalf.Text + "." + Printing.LineSpace + Printing.Indention + "This certification is issued upon the request of " + name + " in support to " + sexOption.HisHer() + " claim for the assistance extended to their family." + Printing.LineSpace + Printing.Indention + "Issued this " + issuedOn.customFormat() + " Barangay Poblacion, Kalibo, Aklan."; e.Graphics.DrawString(text, Printing.font, Brushes.Black, rect); DrawDebugRecs(rect, e); Printing.DrawCapSb(e, o.captName, officerOption.Text); }
void Printing.IPrintable.PrintBy(Printing.IPrinter printer) { int pageNumber = 0; int lineNumberInPage = 0; foreach (var line in _lineEnum) { if (lineNumberInPage >= _numberOfLines) { printer.PageBreak(); lineNumberInPage = 0; ++pageNumber; Progress(pageNumber); } line.PrintBy(printer); printer.LineFeed(_leading); printer.CarriageReturn(); ++lineNumberInPage; } Progress(pageNumber + 1); }
void Printing.IPrintable.PrintBy(Printing.IPrinter printer) { if (_heading != null) { printer.SetOutlineHere(_heading.Level, _heading.Title); } foreach (var t in _texts) { t.PrintBy(printer); } }
public override void PrintBy(Printing.IPrinter printer) { }
public override void PrintBy(Printing.IPrinter printer) { printer.Space(_offset); var letter = _text; var amount = _length - _offset; printer.PrintLatinText(letter, amount); }
public abstract void PrintBy(Printing.IPrinter printer);
private void PrintRuby(Printing.IPrinter printer, Printing.PrinterMemento restoreStart) { var restoreEnd = printer.StorePositionAndFont(); try { restoreStart(); float bodyFontSize = printer.FontSize; float rubyFontSize = bodyFontSize / 2; //TODO: 設定を統一するか、書式情報として運搬 printer.LineFeed(-(bodyFontSize + rubyFontSize) / 2); printer.FontSize = rubyFontSize; Array.ForEach(_rubyText, x => x.PrintBy(printer)); } finally { restoreEnd(); } }
public override void PrintBy(Printing.IPrinter printer) { var restoreStart = printer.StorePositionAndFont(); Array.ForEach(_baseText, x => x.PrintBy(printer)); printer.Space(_appendingLength); PrintRuby(printer, restoreStart); }
public override void PrintBy(Printing.IPrinter printer) { Printing.PrinterMemento restoreStart = null; bool canAddEmphasisDots = CanAddEmphasisDots(); if (canAddEmphasisDots) restoreStart = printer.StorePositionAndFont(); _decoratee.PrintBy(printer); if (!canAddEmphasisDots) return; var restoreEnd = printer.StorePositionAndFont(); { restoreStart(); var baseFontSize = printer.FontSize; printer.LineFeed(-baseFontSize / 2 - correction); printer.Space(_decoratee.Offset); printer.PrintJapaneseLetter(sesami, baseFontSize); } restoreEnd(); }
public Problem28(Printing printing) : base(printing) { }
public Problem125(Printing printing) : base(printing) { }