Exemple #1
0
        private void okButton_Click(object sender, EventArgs e)
        {
            PageSettings settings = new PageSettings();

            settings.paper_type    = WbContext.get_paper_sizes()[paperSizeCombo.SelectedIndex].name;
            settings.margin_top    = double.Parse(topMarginText.Text);
            settings.margin_bottom = double.Parse(bottomMarginText.Text);
            settings.margin_left   = double.Parse(leftMarginText.Text);
            settings.margin_right  = double.Parse(rightMarginText.Text);
            if (landscapeRadio.Checked)
            {
                settings.orientation = "landscape";
            }
            else
            {
                settings.orientation = "portrait";
            }

            WbContext.set_page_settings(settings);

            Close();
        }