public void SetSetting(PdfConcatenatorOption value) { this.textMLeft.Text = value.Margins.Left.ToString(); this.textMRight.Text = value.Margins.Right.ToString(); this.textMTop.Text = value.Margins.Top.ToString(); this.textMBottom.Text = value.Margins.Bottom.ToString(); this.comboPageSize.Text = value.PaperName; this.checkLandscape.Checked = value.Landscape; }
public void GetSetting(PdfConcatenatorOption setting) { setting.Margins.Left = float.Parse(this.textMLeft.Text); setting.Margins.Right = float.Parse(this.textMRight.Text); setting.Margins.Top = float.Parse(this.textMTop.Text); setting.Margins.Bottom = float.Parse(this.textMBottom.Text); var pageSize = ToPageSize(this.comboPageSize.Text); setting.SetPageSize(this.comboPageSize.Text, pageSize); setting.Landscape = checkLandscape.Checked; }
private void PageSetting_FormClosing(object sender, FormClosingEventArgs e) { if (e.CloseReason == CloseReason.None && this.DialogResult == DialogResult.OK) { var dummy = new PdfConcatenatorOption(); try { GetSetting(dummy); // check all values are correct. } catch (Exception) { e.Cancel = true; } } }
public void SetSetting(PdfConcatenatorOption value) { this.checkAddOutlines.Checked = value.AddOutlines; this.checkCopyOutlines.Checked = value.CopyOutlines; this.comboLocZoom.Text = PDFTagToDisplay(value.FittingStyle); }
public void GetSetting(PdfConcatenatorOption setting) { setting.AddOutlines = this.checkAddOutlines.Checked; setting.CopyOutlines = this.checkCopyOutlines.Checked; setting.FittingStyle = PDFDisplayToTag(this.comboLocZoom.Text); }