private void btnPickFont_Click(object sender, EventArgs e) { if (pDialog == null) pDialog = new FormOpenFontDialog(); if (pDialog.ShowDialog() != DialogResult.OK) return; pFontReadStream = pDialog.getFontFileStream(); pFontSize = this.getSize(pDialog.getFontSize()); pFontFileName = pDialog.getFontFileName(); this.comboBoxFontSize.SelectedIndexChanged -= new EventHandler(this.comboBoxFontSize_SelectedIndexChanged); this.comboBoxFontSize.SelectedItem = pDialog.getFontSize(); this.comboBoxFontSize.SelectedIndexChanged += new EventHandler(this.comboBoxFontSize_SelectedIndexChanged); redraw(); }
private void btnPickFont_Click(object sender, EventArgs e) { if (pDialog == null) { pDialog = new FormOpenFontDialog(); } if (pDialog.ShowDialog() != DialogResult.OK) { return; } pFontReadStream = pDialog.getFontFileStream(); pFontSize = this.getSize(pDialog.getFontSize()); pFontFileName = pDialog.getFontFileName(); this.comboBoxFontSize.SelectedIndexChanged -= new EventHandler(this.comboBoxFontSize_SelectedIndexChanged); this.comboBoxFontSize.SelectedItem = pDialog.getFontSize(); this.comboBoxFontSize.SelectedIndexChanged += new EventHandler(this.comboBoxFontSize_SelectedIndexChanged); redraw(); }