Beispiel #1
0
/// <summary>
/// Set values for popup
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>

        private void ScalePopup_Popup(object sender, EventArgs e)
        {
            if (Qm.Query.PrintScale > 0)             // scale to percentage
            {
                ScaleAdjustToOption.CheckState = CheckState.Checked;
                ScaleFitToOption.CheckState    = CheckState.Unchecked;
                ScaleAdjustToSpinner.Value     = Qm.Query.PrintScale;
                ScaleFitToSpinner.Value        = 1;
                ScaleFitToSpinner.Focus();
            }

            else             // fit-to a number of pages
            {
                ScaleFitToOption.CheckState    = CheckState.Checked;
                ScaleAdjustToOption.CheckState = CheckState.Unchecked;
                ScaleFitToSpinner.Value        = -Qm.Query.PrintScale;
                ScaleAdjustToSpinner.Value     = (int)(PrintControl.PrintingSystem.Document.ScaleFactor * 100);             // show pct also
                ScaleAdjustToSpinner.Focus();
            }
        }
Beispiel #2
0
 private void ScaleAdjustToOption_Click(object sender, EventArgs e)
 {
     ScaleAdjustToOption.CheckState = CheckState.Checked;
     ScaleAdjustToSpinner.Focus();
 }