Exemple #1
0
        private void pickColor_Click(object sender, EventArgs e)
        {
            CPCBitmap.Document.Item item = GetSelectedItem();
            if (item == null)
            {
                return;
            }

            PhactoryHost.Database.Resource bmpResource = Plugin.ControllerEditor.Host.GetResource(item.ResourceID);
            string filename = Plugin.ControllerEditor.Host.GetFileInfo(bmpResource).FullName;

            CPCBitmap.Editor.PreviewColorPicker previewColorPicker = new CPCBitmap.Editor.PreviewColorPicker();
            previewColorPicker.SetImage(Image.FromFile(filename));
            previewColorPicker.ShowDialog(this);

            this.PanelColorMask.BackColor = Color.FromArgb(previewColorPicker.GetPickedColor());

            this.cbColorMask.Checked  = true;
            this.cbMaskBitmap.Checked = false;
            UpdateData();
            SetModified(true);
        }
Exemple #2
0
        private void pickColor_Click(object sender, EventArgs e)
        {
            CPCBitmap.Document.Item item = GetSelectedItem();
            if (item == null)
            {
                return;
            }

            PhactoryHost.Database.Resource bmpResource = Plugin.ControllerEditor.Host.GetResource(item.ResourceID);
            string filename = Plugin.ControllerEditor.Host.GetFileInfo(bmpResource).FullName;

            CPCBitmap.Editor.PreviewColorPicker previewColorPicker = new CPCBitmap.Editor.PreviewColorPicker();
            previewColorPicker.SetImage(Image.FromFile(filename));
            previewColorPicker.ShowDialog(this);

            this.PanelColorMask.BackColor = Color.FromArgb(previewColorPicker.GetPickedColor());

            this.cbColorMask.Checked = true;
            this.cbMaskBitmap.Checked = false;
            UpdateData();
            SetModified(true);
        }