public frmColorPicker() { InitializeComponent(); colorPair = new ColorPairWithTransparencyFlags(); savedColorPair = new ColorPairWithTransparencyFlags(); newColorPair = new ColorPairWithTransparencyFlags(); }
/** * frmColorPicker_Load - * * when the form loads we set the color of the pictureboxes * in the form to the color that we have saved, this displays * the last colors used in the document or the colors that are * used in the currently selected annotation. */ private void frmColorPicker_Load(object sender, EventArgs e) { if (savedColorPair.fillColorTransparent) { fillColorPictureBox.Image = global::DotNETViewerComponent.Properties.Resources.transparencySymbol100x100; } else { fillColorPictureBox.BackColor = savedColorPair.fillColor; fillColorPictureBox.Image = null; } if (savedColorPair.strokeColorTransparent) { strokeColorPictureBox.Image = global::DotNETViewerComponent.Properties.Resources.transparencySymbol100x100; } else { strokeColorPictureBox.BackColor = savedColorPair.strokeColor; strokeColorPictureBox.Image = null; } newColorPair = savedColorPair; }
/** * OKBtn_Click - * * Accepts the new colors that the user has selected */ private void OKBtn_Click(object sender, EventArgs e) { colorPair = newColorPair; this.Close(); }