protected override void SetTunedStyleItem(CStyleItem newOwn) { CMarginStyleItem item = (CMarginStyleItem)newOwn; this.MarginSize = item.MarginSize; this.BorderStyle = item.BorderStyle; this.SetMarginColor(item.GetMarginColor()); this.TopMost = item.TopMost; }
protected override void SetStyleToForm(object style) { CMarginStyleItem item = (CMarginStyleItem)style; this.InitializeComponent(); 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; this.picSample = new PictureBox(); this.picSample.Image = this.imgScrap; this.picSample.Size = this.imgScrap.Size; this.frmPrev = new Form(); this.frmPrev.TopLevel = false; this.frmPrev.Parent = this.picPreview; this.frmPrev.Text = "sample"; this.frmPrev.Controls.Add(this.picSample); this.ResizeSample(); this.frmPrev.Show(); this.numMargin.Value = item.MarginSize; this.pictureBox1.BackColor = item.GetMarginColor(); this.chkTopMost.Checked = item.TopMost; switch (item.BorderStyle) { case 0: this.rdo3D.Checked = true; break; case 1: this.rdoSolid.Checked = true; break; case 2: this.rdoWindow.Checked = true; break; default: throw new Exception(); } this.Text = item.GetDisplayName(); this.rdoWindow_CheckedChanged(null, null); this.frmPrev.Paint += new PaintEventHandler(this.Sample_Paint); }
protected override object GetStyleFromForm() { CMarginStyleItem item = new CMarginStyleItem { MarginSize = (int)this.numMargin.Value }; item.SetMarginColor(this.pictureBox1.BackColor); if (this.rdoWindow.Checked) { item.BorderStyle = 2; } else if (this.rdoSolid.Checked) { item.BorderStyle = 1; } else if (this.rdo3D.Checked) { item.BorderStyle = 0; } item.TopMost = this.chkTopMost.Checked; return(item); }
// Token: 0x0600000E RID: 14 RVA: 0x00002CCC File Offset: 0x00000ECC protected override object GetStyleFromForm() { var cmarginStyleItem = new CMarginStyleItem { MarginSize = (int)numMargin.Value }; cmarginStyleItem.SetMarginColor(pictureBox1.BackColor); if (rdoWindow.Checked) { cmarginStyleItem.BorderStyle = 2; } else if (rdoSolid.Checked) { cmarginStyleItem.BorderStyle = 1; } else if (rdo3D.Checked) { cmarginStyleItem.BorderStyle = 0; } cmarginStyleItem.TopMost = chkTopMost.Checked; return(cmarginStyleItem); }
// Token: 0x0600000B RID: 11 RVA: 0x00002301 File Offset: 0x00000501 public MarginStyleItemPanel(CMarginStyleItem style) : base(style) { }