C# Класс SIL.FieldWorks.Common.PrintLayout.PageSetupDlg

Summary description for PageSetupDlg.
Наследование: System.Windows.Forms.Form, IFWDisposable, IPageSetupDialog
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
cbPaperSize SIL.FieldWorks.Common.Controls.FwOverrideComboBox
cboPubPageSize System.Windows.Forms.ComboBox
m_chkNonStdChoices System.Windows.Forms.CheckBox
m_fSaveBaseFontAndLineSizes bool
m_fSetFontSizeAndLineSpacing bool
m_nudBaseCharSize System.Windows.Forms.NumericUpDown
m_nudLineSpacing System.Windows.Forms.NumericUpDown
m_udmBottom SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl
m_udmGutter SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl
m_udmLeft SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl
m_udmPaperHeight SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl
m_udmPaperWidth SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl
m_udmRight SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl
m_udmTop SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl

Открытые методы

Метод Описание
CheckDisposed ( ) : void

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.

HideAllowNonStandardChoicesOption ( ) : void

Sets a value indicating whether the "Allow Non-standard Choices" checkbox is visible.

PageSetupDlg ( ) : System

Page Setup Dialog

PageSetupDlg ( IPubPageLayout pgLayout, ICmMajorObject pubOwner, IPublication publication, IPubDivision division, IPageSetupCallbacks callbacks, IHelpTopicProvider helpTopicProvider, IApp app, List pubPageSizes ) : System

Initializes a new instance of the T:PageSetupDlg class.

SetDefaultBaseFontAndLineSizes ( ) : void

Sets the default size of the base character and line spacing in millipoints. This is used when the current publication does not specify specific values (i.e., its BaseFontSize and BaseLineSpacing == 0).

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Clean up any resources being used.

SnapValueToRange ( decimal min, decimal max, decimal value ) : decimal

Ensures that the given value falls within the specified range. If the value is below the minimum, we return the minimum. If it is above the maximum, we return the maximum. Otherwise, we just return the given value.

UpdateBaseSizeControlsMinAndMax ( ) : void

Updates the min and max values for the base font size and line spacing controls.

UpdateMarginControls ( ) : void

Updates the margin controls. The current implementation does what TE needs. If this proves useless for other apps, this logic should be moved into the TE-specific subclass.

ValidateDialogSettings ( ) : PageSetupErrorType

Validates the dialog settings.

Приватные методы

Метод Описание
AddPaperSize ( string paperName, int width, int height ) : void

Adds the size of the paper.

AdjustPaperSize ( int mptWidth, int mptHeight ) : void

Adjust the paper orientation to portrait or landscape to match the paper width and paper height. And adjust the paper size selection to match the paper width and paper height.

AdjustPaperSizePreview ( ) : void

Adjusts the paper size preview panel.

Approx ( int mptSize, int mptStd ) : bool

Returns true if the given size is within 5000 millipoints of the standard.

Approx ( int size, int std, int threshold ) : bool

Returns true if the given size is within the standard.

ColumnButton_Click ( object sender, EventArgs e ) : void

Handles the Click event of the One/Two Column controls.

DisplayErrorMessage ( PageSetupErrorType error ) : void

Displays the error message.

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

InitializePaperSizes ( ) : void

Gets a list of default paper sizes for a FieldWorks application.

SaveDialogSettings ( ) : void

Saves the settings on the dialog in the database.

ScaleFontSize ( ) : void

Updates the base font size to keep it scaled consistently with the line spacing.

REVIEW: This seems to be app-specific with the use of PubPageSizeType

ScaleLineSpacing ( ) : void

Updates the base line spacing to maintain scaling consistent with character size.

SetBaseCharacterSize ( decimal value ) : void

Sets the size of the base character, snapping it to be within the minimum/maximum range.

SetBaseLineSpacing ( decimal value ) : void

Sets the base (normal) line spacing, snapping it to be within the minimum/maximum range.

SetNumberOfColumns ( int numberOfColumns ) : void

Sets the number of columns.

UpdateColumnButtonStates ( ) : void

Updates the column button images to reflect the number of columns.

UpdateTextSizeCtlStatus ( ) : void

Updates the enabled status of the text size controls.

btnHeaderFooter_Click ( object sender, EventArgs e ) : void

Handles the Click event of the btnHeaderFooter control.

btnOneColumn_PreviewKeyDown ( object sender, PreviewKeyDownEventArgs e ) : void

Handles the PreviewKeyDown event of the btnOneColumn control. Used to treat a right-arrow as a click on the other column button.

btnTwoColumn_PreviewKeyDown ( object sender, PreviewKeyDownEventArgs e ) : void

Handles the PreviewKeyDown event of the btnTwoColumn control. Used to treat a left-arrow as a click on the other column button.

cbPaperSize_SelectedIndexChanged ( object sender, System e ) : void

Called when the paper size is changed.

cboPubPageSize_SelectedIndexChanged ( object sender, EventArgs e ) : void

Handles the SelectedIndexChanged event of the cboPubPageSize control.

m_btnHelp_Click ( object sender, System e ) : void

Show help for this dialog.

m_btnOK_Click ( object sender, EventArgs e ) : void

Handles the Click event of the m_btnOK control.

m_chkNonStdChoices_CheckedChanged ( object sender, EventArgs e ) : void

Handles the CheckedChanged event of the m_chkNonStdChoices control.

m_nudBaseCharSize_ValueChanged ( object sender, EventArgs e ) : void

Handles the ValueChanged event of the m_nudBaseCharSize control.

m_nudLineSpacing_ValueChanged ( object sender, EventArgs e ) : void

Handles the ValueChanged event of the m_nudLineSpacing control.

m_udmBottom_Click ( object sender, EventArgs e ) : void

Handles the Click event of the m_udmBottom control.

m_udmBottom_TextChanged ( object sender, EventArgs e ) : void

Handles the TextChanged event of the m_udmBottom control.

m_udmFooter_TextChanged ( object sender, EventArgs e ) : void

Handles the TextChanged event of the m_udmFooter control.

m_udmGutter_TextChanged ( object sender, EventArgs e ) : void

Handles the TextChanged event of the m_udmGutter control.

m_udmHeader_TextChanged ( object sender, EventArgs e ) : void

Handles the TextChanged event of the m_udmHeader control.

m_udmLeft_TextChanged ( object sender, EventArgs e ) : void

Handles the TextChanged event of the m_udmLeft control.

m_udmPaperWidthOrHeight_Changed ( object sender, System e ) : void

Called when the paper width is changed

m_udmRight_TextChanged ( object sender, EventArgs e ) : void

Handles the TextChanged event of the m_udmRight control.

m_udmTop_TextChanged ( object sender, EventArgs e ) : void

Handles the TextChanged event of the m_udmTop control.

panelPreview_Paint ( object sender, PaintEventArgs e ) : void
pbBookFold_Click ( object sender, System e ) : void

Handles the Click event of the pbBookFold control.

pbDraft_Click ( object sender, System e ) : void

Handles the Click event of the pbDraft control.

Описание методов

CheckDisposed() публичный Метод

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.
public CheckDisposed ( ) : void
Результат void

Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

HideAllowNonStandardChoicesOption() публичный Метод

Sets a value indicating whether the "Allow Non-standard Choices" checkbox is visible.
public HideAllowNonStandardChoicesOption ( ) : void
Результат void

PageSetupDlg() публичный Метод

Page Setup Dialog
public PageSetupDlg ( ) : System
Результат System

PageSetupDlg() публичный Метод

Initializes a new instance of the T:PageSetupDlg class.
public PageSetupDlg ( IPubPageLayout pgLayout, ICmMajorObject pubOwner, IPublication publication, IPubDivision division, IPageSetupCallbacks callbacks, IHelpTopicProvider helpTopicProvider, IApp app, List pubPageSizes ) : System
pgLayout IPubPageLayout The page layout.
pubOwner ICmMajorObject The CmMajorObject that owns the publication.
publication IPublication The publication.
division IPubDivision The division. The NumColumns in the division should be /// set before calling this dialog.
callbacks IPageSetupCallbacks The callbacks used to get application-specific settings.
helpTopicProvider IHelpTopicProvider The help topic provider.
app IApp The app
pubPageSizes List The page sizes available for publication.
Результат System

SetDefaultBaseFontAndLineSizes() публичный Метод

Sets the default size of the base character and line spacing in millipoints. This is used when the current publication does not specify specific values (i.e., its BaseFontSize and BaseLineSpacing == 0).
public SetDefaultBaseFontAndLineSizes ( ) : void
Результат void

SnapValueToRange() защищенный Метод

Ensures that the given value falls within the specified range. If the value is below the minimum, we return the minimum. If it is above the maximum, we return the maximum. Otherwise, we just return the given value.
protected SnapValueToRange ( decimal min, decimal max, decimal value ) : decimal
min decimal The minimum value allowed.
max decimal The maximum value allowed.
value decimal The value.
Результат decimal

UpdateBaseSizeControlsMinAndMax() защищенный Метод

Updates the min and max values for the base font size and line spacing controls.
protected UpdateBaseSizeControlsMinAndMax ( ) : void
Результат void

UpdateMarginControls() защищенный Метод

Updates the margin controls. The current implementation does what TE needs. If this proves useless for other apps, this logic should be moved into the TE-specific subclass.
protected UpdateMarginControls ( ) : void
Результат void

ValidateDialogSettings() защищенный Метод

Validates the dialog settings.
protected ValidateDialogSettings ( ) : PageSetupErrorType
Результат PageSetupErrorType

Описание свойств

cbPaperSize защищенное свойство

Combo box containing the list of possible paper sizes
protected FwOverrideComboBox,SIL.FieldWorks.Common.Controls cbPaperSize
Результат SIL.FieldWorks.Common.Controls.FwOverrideComboBox

cboPubPageSize защищенное свойство

combobox which contains the list of possible publication page sizes
protected ComboBox,System.Windows.Forms cboPubPageSize
Результат System.Windows.Forms.ComboBox

m_chkNonStdChoices защищенное свойство

Check box that allows the user to make choices that don't follow iPub standards.
protected CheckBox,System.Windows.Forms m_chkNonStdChoices
Результат System.Windows.Forms.CheckBox

m_fSaveBaseFontAndLineSizes защищенное свойство

Flag to save base font and line height sizes (if changed)
protected bool m_fSaveBaseFontAndLineSizes
Результат bool

m_fSetFontSizeAndLineSpacing защищенное свойство

Flag that indictes both font size and line spacing are being set to default values, so do not adjust line spacing to maintain leading.
protected bool m_fSetFontSizeAndLineSpacing
Результат bool

m_nudBaseCharSize защищенное свойство

numeric up-down control for setting the base character size
protected NumericUpDown,System.Windows.Forms m_nudBaseCharSize
Результат System.Windows.Forms.NumericUpDown

m_nudLineSpacing защищенное свойство

numeric up-down control for setting the line spacing
protected NumericUpDown,System.Windows.Forms m_nudLineSpacing
Результат System.Windows.Forms.NumericUpDown

m_udmBottom защищенное свойство

up-down measure control for the bottom margin
protected SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl m_udmBottom
Результат SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl

m_udmGutter защищенное свойство

up-down measure control for the gutter
protected SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl m_udmGutter
Результат SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl

m_udmLeft защищенное свойство

up-down measure control for the inside margin
protected SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl m_udmLeft
Результат SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl

m_udmPaperHeight защищенное свойство

current paper height
protected SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl m_udmPaperHeight
Результат SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl

m_udmPaperWidth защищенное свойство

current paper width
protected SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl m_udmPaperWidth
Результат SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl

m_udmRight защищенное свойство

up-down measure control for the outside margin
protected SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl m_udmRight
Результат SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl

m_udmTop защищенное свойство

up-down measure control for the top margin
protected SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl m_udmTop
Результат SIL.FieldWorks.FwCoreDlgControls.UpDownMeasureControl