Example #1
0
        protected override void SetTunedStyleItem(CStyleItem newOwn)
        {
            COpacityStyleItem item = (COpacityStyleItem)newOwn;

            this.Opacity  = item.Opacity;
            this.Absolute = item.Absolute;
        }
Example #2
0
        protected override object GetStyleFromForm()
        {
            COpacityStyleItem item = new COpacityStyleItem();

            if (this.rdoFixed.Checked)
            {
                item.Opacity = (int)this.numOpacity.Value;
            }
            else
            {
                item.Opacity = (int)this.numOpacity2.Value;
            }
            item.Absolute = this.rdoFixed.Checked;
            return(item);
        }
Example #3
0
        // Token: 0x060004B3 RID: 1203 RVA: 0x0001FFBC File Offset: 0x0001E1BC
        protected override object GetStyleFromForm()
        {
            var copacityStyleItem = new COpacityStyleItem();

            if (rdoFixed.Checked)
            {
                copacityStyleItem.Opacity = (int)numOpacity.Value;
            }
            else
            {
                copacityStyleItem.Opacity = (int)numOpacity2.Value;
            }
            copacityStyleItem.Absolute = rdoFixed.Checked;
            return(copacityStyleItem);
        }
Example #4
0
        protected override void SetStyleToForm(object style)
        {
            COpacityStyleItem item = (COpacityStyleItem)style;

            this.InitializeComponent();
            this.Text = item.GetDisplayName();
            this.numOpacity.Minimum   = 1M;
            this.numOpacity.Maximum   = 100M;
            this.numOpacity.Value     = 100M;
            this.barOpacity.Minimum   = 1;
            this.barOpacity.Maximum   = 100;
            this.barOpacity.Value     = 100;
            this.numPreview.Minimum   = 1M;
            this.numPreview.Maximum   = 100M;
            this.numPreview.Value     = 100M;
            this.numOpacity2.Minimum  = -99M;
            this.numOpacity2.Maximum  = 99M;
            this.numOpacity2.Value    = 0M;
            this.barOpacity2.Minimum  = -99;
            this.barOpacity2.Maximum  = 0x63;
            this.barOpacity2.Value    = 0;
            this.rdoFixed.Checked     = item.Absolute;
            this.rdoIncrement.Checked = !item.Absolute;
            if (item.Absolute)
            {
                this.numOpacity.Value = item.Opacity;
                this.numPreview.Value = item.Opacity;
            }
            else
            {
                this.numOpacity2.Value = item.Opacity;
            }
            this.rdoFixed_CheckedChanged(this, null);
            this.cm          = new ColorMatrix();
            this.cm.Matrix00 = 1f;
            this.cm.Matrix11 = 1f;
            this.cm.Matrix22 = 1f;
            this.cm.Matrix33 = (float)(this.numPreview.Value / 100M);
            this.cm.Matrix44 = 1f;
            this.ia          = new ImageAttributes();
            this.ia.SetColorMatrix(this.cm);
            this.imgBackground = new Bitmap(this.picPreview.Width, this.picPreview.Height, PixelFormat.Format24bppRgb);
            using (Graphics graphics = Graphics.FromImage(this.imgBackground))
            {
                graphics.CopyFromScreen(new Point(0, 0), new Point(0, 0), this.imgBackground.Size);
            }
            this.imgScrap = SETUNA.Resources.Image.SampleImage;
        }
Example #5
0
 public OpacityStyleItemPanel(COpacityStyleItem item) : base(item)
 {
 }