Exemplo n.º 1
0
        public static bool Show(out FontHeightDefinition sizeType, out int sizeValue, int currentSize, int maxSize)
        {
            ImportTTFDialog dialog = new ImportTTFDialog(FontHeightDefinition.NominalHeight, currentSize, maxSize);
            bool            result = dialog.ShowDialog() == DialogResult.OK;

            sizeType  = dialog.SizeType;
            sizeValue = dialog.SizeValue;
            return(result);
        }
Exemplo n.º 2
0
 public ImportTTFDialog(FontHeightDefinition sizeType, int sizeValue, int maxSize)
 {
     InitializeComponent();
     rbNominalSize.Checked     = sizeType == FontHeightDefinition.NominalHeight;
     rbRealPixelHeight.Checked = sizeType == FontHeightDefinition.PixelHeight;
     udSize.Enabled            = rbNominalSize.Checked;
     udFullHeight.Enabled      = rbRealPixelHeight.Checked;
     udSize.Value         = sizeValue;
     udSize.Minimum       = 1;
     udSize.Maximum       = maxSize;
     udFullHeight.Value   = sizeValue;
     udFullHeight.Minimum = 1;
     udFullHeight.Maximum = maxSize;
     ActiveControl        = udSize;
 }