public ColorPickerForm(Color currentColor, bool isScreenColorPickerMode = false, bool checkClipboard = true, ColorPickerOptions options = null) { InitializeComponent(); ShareXResources.ApplyTheme(this); clipboardStatusHider = new ControlHider(btnClipboardStatus, 2000); IsScreenColorPickerMode = isScreenColorPickerMode; Options = options; if (Options == null) { Options = new ColorPickerOptions(); } if (Options.RecentColorsSelected) { rbRecentColors.Checked = true; } else { rbStandardColors.Checked = true; } PrepareColorPalette(); SetCurrentColor(currentColor, !IsScreenColorPickerMode); if (checkClipboard) { CheckClipboard(); } btnOK.Visible = btnCancel.Visible = !IsScreenColorPickerMode; mbCopy.Visible = btnClose.Visible = pCursorPosition.Visible = IsScreenColorPickerMode; }
public ColorPickerForm(Color currentColor, bool isScreenColorPickerMode = false, bool checkClipboard = true) { InitializeComponent(); ShareXResources.ApplyTheme(this); clipboardStatusHider = new ControlHider(btnClipboardStatus, 2000); IsScreenColorPickerMode = isScreenColorPickerMode; PrepareColorPalette(); SetCurrentColor(currentColor, !IsScreenColorPickerMode); if (checkClipboard) { CheckClipboard(); } btnOK.Visible = btnCancel.Visible = !IsScreenColorPickerMode; mbCopy.Visible = btnClose.Visible = pCursorPosition.Visible = IsScreenColorPickerMode; }