/// <summary> /// Set the color to show in this form's labels /// </summary> /// <param name="color"></param> public void SetNewColor(Color color) { lblNewColor.BackColor = color; lblRed.Text = "R: " + color.R.ToString(); lblGreen.Text = "G: " + color.G.ToString(); lblBlue.Text = "B: " + color.B.ToString(); lblHex.Text = EyedropperUtil.HexConverter(color); this.Height = 215; Show(); }
/// <summary> /// Size the picturebox to the entire form and show the preview dialog on load /// </summary> /// <param name="sender">Who sent the event</param> /// <param name="e">Event arguments</param> private void ChooseColorForm_Load(object sender, EventArgs e) { //Resize picture box picboxScreen.Width = this.Width; picboxScreen.Height = this.Height; //Get the screen and put into picture box picboxScreen.Image = EyedropperUtil.SetImageOpacity(trueScreenData, 0.75f); //Start preview form previewForm = new PreviewForm(); previewForm.Show(); }
/// <summary> /// Show the color selection form. /// </summary> /// <param name="sender">Who sent the event</param> /// <param name="e">Event arguments</param> private void btnNewColor_Click(object sender, EventArgs e) { Hide(); System.Threading.Thread.Sleep(500); new ChooseColorForm(EyedropperUtil.GetScreenshot(), this).Show(); }